Graphics Reference
In-Depth Information
Light source
p
Shadow ray
x
Viewpoint
Figure 1.10 Shadows are determined by tracing a shadow ray to the light; the point is in shadow if the
ray hits any surface before it hits the light.
tracing faithfully simulates mirror reflection and refraction, and direct illumina-
tion of diffuse objects illuminated by point light sources. However, it has some
fundamental limitations that make it unsuitable for photorealistic rendering of
general scenes. The main drawback is that it does not account for indirect illumi-
nation. Global illumination requires integration over the entire hemisphere above
the surface. In Whitted's algorithm, radiance at a diffuse surface is determined
from only one direction: that of the light source. Indirect illumination coming
from light reflected off other surfaces is not considered.
The lack of indirect illumination is a major drawback, because diffuse inter-
reflection is a primary component of global illumination and is key to photoreal-
ism. For example, shadows appear entirely black in the absence of indirect illumi-
nation. In real environments shadows are merely darker than their surroundings.
A very simple trick to mitigate dark shadows is to add a constant ambient value to
each pixel. The ambient value is a rough approximation—a guess, really—to the
average indirect illumination throughout the scene. Although it falls well short
of the expectations of photorealism, the ambient term is remarkably effective for
such a simple trick.
Shadows raise another limitation of Whitted-style ray tracing—it only handles
point and directional light sources. Each surface point is either totally illuminated
or totally in shadow, so the shadow boundaries in the rendered image appear to
have sharp edges. In reality, light sources have a nonzero surface area, so surface
points that “see” part of the light are partially illuminated. This causes real shad-
ows to have blurred or “soft” edges in the transition between fully lit and totally
shadowed areas. Whitted-style ray tracing does not capture this effect.
Ray tracing can be extended to solve these problems by tracing more rays
at each surface intersection. For example, the reflection integral can be approx-
imated by tracing many rays over the hemisphere above the intersection point
 
Search WWH ::




Custom Search