Graphics Reference
In-Depth Information
Fig. 12.2
Unlike a rasterizer, a raytracer projects a ray through every pixel of the screen (
b
) into
the scene until it collides with a triangle (
a
), and from there a path to the light source (
c
) is found
returned to the screen. If the object it collides with is semi-transparent, the ray con-
tinues into the scene until it strikes another object, and its value is used to modify
the color of the placeholder pixel generated at the fi rst collision. It continues to do
this until it strikes an opaque pixel or reaches a saturation point. The same is true of
refl ections and refractions. For either of these events, when a ray strikes a surface
that is refractive or refl ective, a placeholder fl ag is added to the pixel, and the ray
will bounce within the scene, striking other objects that successively modify the
value of the placeholder pixel, until a fi nal value is arrived at.
12.2.4
Render Speed
Of the two systems, rasterization is much faster on current game consoles, but when
scenes have an extremely large number of triangles, ray tracers can become faster.
The reason is that performance of a rasterizer decreases rapidly based on the num-
ber of triangles in a scene, but with a ray tracer, image size is the most relevant limit-
ing factor. At a certain resolution and triangle count, the two systems perform at
about the same frame rate, but ray tracers become faster at higher triangle counts.
Of the two, ray tracing generates higher quality solutions that include such things as
refl ections, refractions, and clean shadows. Rasterizers require a number of faked
solutions to arrive at similar results.
12.2.5
Path Tracing and Radiosity
Path tracing
and
radiosity
are two methods to achieve a similar objective: accurate
bounced light in a render. The results of both are very realistic, but of the two, path
Search WWH ::
Custom Search