HOME

TheInfoList



OR:

In
computer graphics Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
, rasterisation (
British English British English is the set of Variety (linguistics), varieties of the English language native to the United Kingdom, especially Great Britain. More narrowly, it can refer specifically to the English language in England, or, more broadly, to ...
) or rasterization (
American English American English, sometimes called United States English or U.S. English, is the set of variety (linguistics), varieties of the English language native to the United States. English is the Languages of the United States, most widely spoken lang ...
) is the task of taking an
image An image or picture is a visual representation. An image can be Two-dimensional space, two-dimensional, such as a drawing, painting, or photograph, or Three-dimensional space, three-dimensional, such as a carving or sculpture. Images may be di ...
described in a
vector graphics Vector graphics are a form of computer graphics in which visual images are created directly from geometric shapes defined on a Cartesian plane, such as points, lines, curves and polygons. The associated mechanisms may include vector displ ...
format (shapes) and converting it into a
raster image upright=1, The Smiley, smiley face in the top left corner is a raster image. When enlarged, individual pixels appear as squares. Enlarging further, each pixel can be analyzed, with their colors constructed through combination of the values for ...
(a series of
pixel In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a Raster graphics, raster image, or the smallest addressable element in a dot matrix display device. In most digital display devices, p ...
s, dots or lines, which, when displayed together, create the image which was represented via shapes). The rasterized image may then be displayed on a
computer display A computer monitor is an output device that displays information in pictorial or textual form. A discrete monitor comprises a visual display, support electronics, power supply, housing, electrical connectors, and external user controls. T ...
, video display or printer, or stored in a
bitmap In computing, a bitmap (also called raster) graphic is an image formed from rows of different colored pixels. A GIF is an example of a graphics image file that uses a bitmap. As a noun, the term "bitmap" is very often used to refer to a partic ...
file format. Rasterization may refer to the technique of drawing 3D models, or to the conversion of 2D rendering primitives, such as
polygon In geometry, a polygon () is a plane figure made up of line segments connected to form a closed polygonal chain. The segments of a closed polygonal chain are called its '' edges'' or ''sides''. The points where two edges meet are the polygon ...
s and
line segment In geometry, a line segment is a part of a line (mathematics), straight line that is bounded by two distinct endpoints (its extreme points), and contains every Point (geometry), point on the line that is between its endpoints. It is a special c ...
s, into a rasterized format.


Etymology

The term "rasterisation" comes .


2D images


Line primitives

Bresenham's line algorithm is an example of an algorithm used to rasterize lines.


Circle primitives

Algorithms such as the midpoint circle algorithm are used to render circles onto a pixelated canvas.


3D images

Rasterization is one of the typical techniques of rendering 3D models. Compared with other rendering techniques such as ray tracing, rasterization is extremely fast and therefore used in most realtime 3D engines. However, rasterization is simply the process of computing the mapping from scene geometry to pixels and does not prescribe a particular way to compute the color of those pixels. The specific color of each pixel is assigned by a
pixel shader In computer graphics, a shader is a computer program that calculates the appropriate levels of light, darkness, and color during the rendering of a 3D scene—a process known as '' shading''. Shaders have evolved to perform a variety of s ...
(which in modern GPUs is completely programmable). Shading may take into account physical effects such as light position, their approximations or purely artistic intent. The process of rasterizing 3D models onto a 2D plane for display on a computer screen (" screen space") is often carried out by fixed function (non-programmable) hardware within the
graphics pipeline The computer graphics pipeline, also known as the rendering pipeline, or graphics pipeline, is a framework within computer graphics that outlines the necessary procedures for transforming a three-dimensional (3D) scene into a two-dimensional (2 ...
. This is because there is no motivation for modifying the techniques for rasterization used at render time and a special-purpose system allows for high efficiency.


Triangle rasterization

Polygons are a common representation of digital 3D models. Before rasterization, individual polygons are typically broken down into triangles; therefore, a typical problem to solve in 3D rasterization is rasterization of a triangle. Properties that are usually required from triangle rasterization algorithms are that rasterizing two adjacent triangles (i.e. those that share an edge) # leaves no holes (non-rasterized pixels) between the triangles, so that the rasterized area is completely filled (just as the surface of adjacent triangles). And # no pixel is rasterized more than once, i.e. the rasterized triangles don't overlap. This is to guarantee that the result doesn't depend on the order in which the triangles are rasterized. Overdrawing pixels can also mean wasting computing power on pixels that would be overwritten. This leads to establishing rasterization rules to guarantee the above conditions. One set of such rules is called a top-left rule, which states that a pixel is rasterized if and only if # its center lies completely inside the triangle. Or # its center lies exactly on the triangle edge (or multiple edges in case of corners) that is (or, in case of corners, all are) either ''top'' or ''left'' edge. A ''top'' edge is an edge that is exactly horizontal and lies above other edges, and a ''left'' edge is a non-horizontal edge that is on the left side of the triangle. This rule is implemented e.g. by
Direct3D Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware ...
and many
OpenGL OpenGL (Open Graphics Library) is a Language-independent specification, cross-language, cross-platform application programming interface (API) for rendering 2D computer graphics, 2D and 3D computer graphics, 3D vector graphics. The API is typic ...
implementations (even though the specification doesn't define it and only requires a consistent rule).


Quality

The quality of rasterization can be improved by antialiasing, which creates "smooth" edges. Sub-pixel precision is a method which takes into account positions on a finer scale than the pixel grid and can produce different results even if the endpoints of a primitive fall into same pixel coordinates, producing smoother movement animations. Simple or older hardware, such as PlayStation 1, lacked sub-pixel precision in 3D rasterization.


See also

* Font rasterization * Sub-pixel resolution *
Image tracing In computer graphics, image tracing, raster-to-vector conversion or raster vectorization is the conversion of raster graphics into vector graphics. Background An image does not have any structure: it is just a collection of marks on paper, grai ...
*
Hidden-surface determination In 3D computer graphics, hidden-surface determination (also known as shown-surface determination, hidden-surface removal (HSR), occlusion culling (OC) or visible-surface determination (VSD)) is the process of identifying what Computer representat ...
* Bresenham's line algorithm for a typical method in rasterization *
Scanline rendering Scanline rendering (also scan line rendering and scan-line rendering) is an algorithm for visible surface determination, in 3D computer graphics, that works on a row-by-row basis rather than a polygon-by-polygon or pixel-by-pixel basis. All of ...
for line-by-line rasterization *
Rendering (computer graphics) Rendering is the process of generating a physically-based rendering, photorealistic or Non-photorealistic rendering, non-photorealistic image from input data such as 3D models. The word "rendering" (in one of its senses) originally meant the ...
for more general information *
Graphics pipeline The computer graphics pipeline, also known as the rendering pipeline, or graphics pipeline, is a framework within computer graphics that outlines the necessary procedures for transforming a three-dimensional (3D) scene into a two-dimensional (2 ...
for rasterization in commodity graphics hardware *
Raster image processor A raster image processor (RIP) is a component used in a printing system which produces a raster image also known as a bitmap. Such a bitmap is used by a later stage of the printing system to produce the printed output. The input may be a page ...
for 2D rasterization in printing systems *
Vector graphics Vector graphics are a form of computer graphics in which visual images are created directly from geometric shapes defined on a Cartesian plane, such as points, lines, curves and polygons. The associated mechanisms may include vector displ ...
for the source art *
Raster graphics upright=1, The Smiley, smiley face in the top left corner is a raster image. When enlarged, individual pixels appear as squares. Enlarging further, each pixel can be analyzed, with their colors constructed through combination of the values for ...
for the result * Raster to vector for conversion in the opposite direction * Triangulated irregular network, a vector source for topography data, often rasterized as a (raster)
digital elevation model A digital elevation model (DEM) or digital surface model (DSM) is a 3D computer graphics representation of elevation data to represent terrain or overlaying objects, commonly of a planet, Natural satellite, moon, or asteroid. A "global DEM" refer ...
. * Display list * Spatial anti-aliasing


References


External links


Michael Abrash’s articles on computer graphicsMicrosoft’s DirectX APIOpenGL API
{{Graphics Processing Unit Shading Computer graphics 3D computer graphics Television terminology Video Video signal