Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Rasterisation
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Conversion of a vector-graphics image to a raster image}}{{refimprove|date=September 2018}} [[File:Raster graphic fish 20x23squares sdtv-example.png|thumb|right|200px|Raster graphic image]] In [[computer graphics]], '''rasterisation''' ([[British English]]) or '''rasterization''' ([[American English]]) is the task of taking an [[Digital image|image]] described in a [[vector graphics]] format (shapes) and converting it into a [[raster image]] (a series of [[pixel]]s, dots or lines, which, when displayed together, create the image which was represented via shapes).<ref name="Worboys1995">{{cite book|author=Michael F. Worboys|title=GIS: A Computer Science Perspective|url=https://books.google.com/books?id=duT2fcnQeJMC&pg=PA232|date=30 October 1995|publisher=CRC Press|isbn=978-0-7484-0065-2|pages=232–}}</ref><ref name="Chang2007">{{cite book|author=Kang-Tsung Chang|title=Programming ArcObjects with VBA: A Task-Oriented Approach, Second Edition|url=https://books.google.com/books?id=1DOY9xuxcosC&pg=PA91|date=27 August 2007|publisher=CRC Press|isbn=978-1-4200-0918-7|pages=91–}}</ref> The rasterized image may then be displayed on a [[computer display]], [[video display]] or [[computer printer|printer]], or stored in a [[bitmap]] file format. Rasterization may refer to the technique of drawing [[3D model (computer graphics)|3D models]], or to the conversion of 2D [[rendering primitive]]s, such as [[polygon]]s and [[line segment]]s, into a rasterized format. == Etymology == The term "rasterisation" comes {{ety|de|Raster|grid, pattern, schema|la|[[Rastrum|rāstrum]]|scraper, rake}}.<ref>{{OEtymD|raster}}</ref><ref>{{L&S|rastrum|ref}}</ref> == 2D images == === Line primitives === {{Main|Line drawing algorithm}} [[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 (graphics)|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|pixel shader]] (which in modern [[GPUs]] is completely [[Shading language|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]]. This is because there is no motivation for modifying the techniques for rasterization used at render time <ref>{{Cite web |title=Rasterization: a Practical Implementation |url=https://www.scratchapixel.com/lessons/3d-basic-rendering/rasterization-practical-implementation/overview-rasterization-algorithm.html |access-date=2023-10-06 |website=www.scratchapixel.com}}</ref> and a special-purpose system allows for high efficiency. === Triangle rasterization === [[File:Top-left triangle rasterization rule.gif|thumb|right|Rasterizing triangles using the top-left rule]] [[Polygon mesh|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]]<ref>{{cite web |title=Rasterization Rules (Direct3D 9) |url=https://docs.microsoft.com/en-us/windows/win32/direct3d9/rasterization-rules |website=Microsoft Docs |access-date=19 April 2020}}</ref> and many [[OpenGL]] implementations (even though the specification doesn't define it and only requires a consistent rule<ref>{{cite book |title=OpenGL 4.6 |page=478 |url=https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf}}</ref>). == Quality == [[File:Line pixel subpixel aa.gif|thumb|right|Pixel precision (left) vs sub-pixel precision (middle) vs anti-aliasing (right)]] The quality of rasterization can be improved by [[spatial anti-aliasing|antialiasing]], which creates "smooth" edges. [[sub-pixel resolution|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.<ref>{{cite web |title=PlayStation rasterization issues |url=https://www.libretro.com/index.php/mednafenbeetle-psx-pgxp-arrives/#more-45256 |website=Libretro |date=4 October 2016 |access-date=19 April 2020}}</ref> ==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 vector]] for conversion in the opposite direction * [[Triangulated irregular network]], a vector source for topography data, often rasterized as a (raster) [[digital elevation model]]. * [[Display list]] * [[Spatial anti-aliasing]] == References == {{reflist}} == External links == *[http://www.drdobbs.com/parallel/184404919 Michael Abrash’s articles on computer graphics] *[https://msdn.microsoft.com/en-us/library/windows/desktop/ff476882(v=vs.85).aspx Microsoft’s DirectX API] *[http://www.opengl.org OpenGL API] *[http://mathworld.wolfram.com/topics/MatrixTypes.html Matrices (including transformation matrices) from MathWorld] *[https://www.scratchapixel.com/lessons/3d-basic-rendering/rasterization-practical-implementation/rasterization-stage.html Rasterization, a Practical Implementation] {{Graphics Processing Unit}} [[Category:Shading]] [[Category:Computer graphics]] [[Category:3D computer graphics]] [[Category:Television terminology]] [[Category:Video]] [[Category:Video signal]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Ety
(
edit
)
Template:Graphics Processing Unit
(
edit
)
Template:L&S
(
edit
)
Template:Main
(
edit
)
Template:OEtymD
(
edit
)
Template:Refimprove
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)