Rasterisation
This article needs additional citations for verification. (September 2018) |
In
Etymology
The term "rasterisation" comes from
2D images
Line primitives
Bresenham's line algorithm is an example of an algorithm used to rasterize lines.
Circle primitives
Algorithms such as Midpoint circle algorithm are used to render circle onto a pixelated canvas.
3D images
Rasterization is one of the typical techniques of rendering 3D models. Compared with other rendering techniques such as
The process of rasterizing 3D models onto a 2D plane for display on a
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[6] and many OpenGL implementations (even though the specification doesn't define it and only requires a consistent rule[7]).
Quality
The quality of rasterization can be improved by
See also
- Font rasterization
- Sub-pixel resolution
- Image tracing
- Hidden-surface determination
- Bresenham's line algorithm for a typical method in rasterization
- Scanline rendering for line-by-line rasterization
- Rendering (computer graphics) for more general information
- Graphics pipeline for rasterization in commodity graphics hardware
- Raster image processor for 2D rasterization in printing systems
- Vector graphics for the source art
- Raster graphics for the result
- Raster to vectorfor conversion in the opposite direction
- Triangulated irregular network, a vector source for topography data, often rasterized as a (raster) digital elevation model.
- Display list
References
- ISBN 978-0-7484-0065-2.
- ISBN 978-1-4200-0918-7.
- ^ Harper, Douglas. "raster". Online Etymology Dictionary.
- Perseus Project.
- ^ "Rasterization: a Practical Implementation". www.scratchapixel.com. Retrieved 2023-10-06.
- ^ "Rasterization Rules (Direct3D 9)". Microsoft Docs. Retrieved 19 April 2020.
- ^ OpenGL 4.6 (PDF). p. 478.
- ^ "PlayStation rasterization issues". Libretro. 4 October 2016. Retrieved 19 April 2020.