Graphics Reference
In-Depth Information
Fig. 12.1 A rasterizer projects triangles from within a scene ( a ) towards a raster (grid) on the
screen ( b )
12.2.1
Perspective Drawing and Rendering
When a renderer projects an image on your screen, it is described as “drawing to
screen.” The time it takes to do this is the screen draw time. When you look at the
result, it is easy to mistake the result for the product of a process similar to what an
architect or artist might use to make a perspective drawing of a building. What a
renderer does is similar, but in some ways is almost the opposite of a perspective
drawing. To understand this, let us look at how perspective projection is accom-
plished with traditional tools.
12.2.2
Rasterization
A rasterizer projects 3D coordinates from the scene against each axis of a two dimen-
sional plane that represents the camera, or screen, to determine their location in 2D
space (Fig. 12.1 ). Each location corresponds to a pixel. Lighting calculations performed
within the 3D scene are used to determine the colors of any given point in the scene, and
these values are projected forward to pixels in the fi nal rendered image (Bikker 2012 ).
12.2.3
Raytracing
A ray tracer projects from each pixel on the screen back into the 3D scene, and
checks for collisions with scene objects or effects. This is the opposite projection
direction of a rasterizer (Fig. 12.2 ). When rays collide with objects, a color value is
Search WWH ::




Custom Search