Graphics Reference
In-Depth Information
Light source
Diffuse surface
Specular surface
Image plane
Viewpoint
Figure 1.9 Whitted-style recursive ray tracing. Rays are traced from the viewpoint through pixels on
the image plane. When a ray hits a diffuse surface, the illumination is calculated from the
light source; at a reflective/refractive surface, secondary rays are traced.
reflection and refraction rays. If an object has a perfectly specular (mirrored) sur-
face, the radiance comes from tracing the reflected ray at the surface intersection.
When an object exhibits Fresnel reflection with transparency, separate rays are
traced for the reflected and refracted paths, and the resulting radiance is the sum
of the two values weighted by the reflectance and transmittance as described in
Section 1.2.6.
The radiance carried by the ray at the intersection with a nonspecular surface
is computed from Equation (1.10) with a modification to account for occlusion
(shadowing):
Φ
, ω , ω )(
· ω )
, ω )=
L r (
x
f r (
x
n
V
(
x
,
p
)
r 2 .
(1.19)
4
π
The new term V
is the visibility function ; it is 0 if points x and p do not see
each other, and 1 otherwise. Consequently, the radiance L r (
(
x
,
p
)
is zero if the
light source at point p is not visible from the surface point x .Otherwise, L r (
x
, ω )
, ω )
is the radiance from direct illumination on the surface, and its value is added to
the value of the pixel.
The visibility function V
x
is computed by tracing a special shadow ray
from x to p (or vice versa). This shadow ray is traced merely to see if it hits an
object in between x and p ; which object is hit first and how it is shaded are not
considered ( Figure 1.10 ) . Shadow rays are therefore less expensive computation-
ally.
The first practical implementation of a recursive ray-tracing algorithmwas de-
veloped by Turner Whitted [Whitted 79], and basic recursive ray tracing is there-
fore known as Whitted-style or simply Whitted ray tracing. 5 Whitted-style ray
(
x
,
p
)
5 Whitted-style ray tracing is sometimes called classical ray tracing . The term is avoided in this
book, to avoid ambiguity with ray-tracing methods used in optics that are centuries old.
 
Search WWH ::




Custom Search