Rasterisation

Source: Wikipedia, the free encyclopedia.
(Redirected from
Rasterizer
)
Raster graphic image

In

rendering primitives, such as polygons and line segments
, into a rasterized format.

Etymology

The term "rasterisation" comes from

Latin rāstrum 'scraper, rake'.[3][4]

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

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

screen space") is often carried out by fixed function (non-programmable) hardware within the graphics pipeline. This is because there is no motivation for modifying the techniques for rasterization used at render time [5]
and a special-purpose system allows for high efficiency.

Triangle rasterization

Rasterizing triangles using the top-left rule

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)

  1. 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
  2. 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

  1. its center lies completely inside the triangle. Or
  2. 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

Pixel precision (left) vs sub-pixel precision (middle) vs anti-aliasing (right)

The quality of rasterization can be improved by

PlayStation 1, lacked sub-pixel precision in 3D rasterization.[8]

See also

References

  1. .
  2. .
  3. ^ Harper, Douglas. "raster". Online Etymology Dictionary.
  4. Perseus Project
    .
  5. ^ "Rasterization: a Practical Implementation". www.scratchapixel.com. Retrieved 2023-10-06.
  6. ^ "Rasterization Rules (Direct3D 9)". Microsoft Docs. Retrieved 19 April 2020.
  7. ^ OpenGL 4.6 (PDF). p. 478.
  8. ^ "PlayStation rasterization issues". Libretro. 4 October 2016. Retrieved 19 April 2020.

External links