Rasterisation
In computer graphics, rasterisation or rasterization is the task of taking an image described in a vector graphics format and converting it into a raster image. The rasterized image may then be displayed on a computer display, video display or printer, or stored in a bitmap file format. Rasterization may refer to the technique of drawing 3D models, or to the conversion of 2D rendering primitives, such as polygons and line segments, into a rasterized format.
Etymology
The term "rasterisation" comes.2D images
Line primitives
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. 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 is often carried out by fixed function hardware within the graphics pipeline. 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
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- leaves no holes between the triangles, so that the rasterized area is completely filled. 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.
- its center lies completely inside the triangle, or
- its center lies exactly on the triangle edge that is, either the top or left edge.
This rule is implemented e.g. by Direct3D and many OpenGL implementations.