Facebook Logo Twitter Logo RSS Logo
Issue: Volume: 23 Issue: 7 (July 2000)

Shadows Beyond a Doubt




Diana Phillips Mahoney

Most real-world shadows don't have well-defined edges, but rather are characterized by diffuse bound aries. Accurately reproducing such "soft" shadows digitally is a notoriously difficult task. It requires determining the visibility be tween every surface point and every light source in a scene. Typically, this is done by tracing rays from each point on an object's surface to every point on the light source and counting the number of rays that are blocked. Achieving high-quality shadows in this manner requires tracing hundreds of rays for each surface point and light source-an often prohibitive task because of its computational intensity.

The soft shadows from this digital plant were created using three different techniques. The rendering at left was achieved with a standard raytracer. The rendering in the middle, created with a new technique that uses precomputed textures, produces some banding artifacts, but is faster and thus allows interactive rendering. The image on the right, created using a new "coherence-based" approach, is not interactive, but it produces soft shadows indistinguishable from conventional raytracers at a fraction of the computational cost.

In an effort to reduce the amount of computation required to generate high-quality soft shadows, computer graphics researchers Maneeshe Agrawala and Ravi Ramamoorthi at Stanford University in conjunction with Alan Heirich and Laurent Moll of Compaq Computer Corp. have developed and combined two separate image-based techniques that build on an existing algorithm used to generate "hard" shadows.




The new techniques perform the requisite shadow calculations against image-based representations, or pictures, of the scene geometry rather than against the actual polygonal geometry. These image-based representations, called shadow maps, store information about the depth complexity of only those parts of a scene visible from a given light source. Consequently, the necessary calculations are independent of the geometric scene complexity.

The first technique relies on layers of images called layered-attenuation maps, in which soft-shadow textures and depth information are precomputed. As the image is displayed, the software selects the proper attenuation based on the location of the light source and displays the precomputed soft shadows at several frames per second. The benefit of precomputation is that it enables interactive rendering rates. The tradeoffs are undersampling and banding artifacts.

The second technique combines image-based raytracing and so-called "coherence" techniques to address the sampling and image-quality problems, but it is not interactive, and thus is useful for high-resolution prerendered animations. This approach precomputes shadow maps from a few points on the light source, then traces shadow rays through the shadow maps to shade the surface points. A coherence-based algorithm is then implemented to sample the visibility where changes in visibility are most likely.

The underlying rationale behind the coherence-based ap proach is that the visible portion of a light source does not change significantly for surface points close to each other. Thus, calculating for each would be somewhat redundant and would add little to the end result. This technique can produce soft shadows at a fraction of the computational cost of conventional raytracers.
An extreme test-case for the soft-shadowing algorithms, this flower comprises numerous long, thin triangles that are much smaller than a pixel. While the "head" of the flower suffers aliasing effects because of the hardware rendering used in the interacti




The researchers have shown that both image-based techniques can be used in concert to create an interactive lighting environment. With the layered attenuation map method, users can interactively set the viewing transformation and position the light source and geometry, after which coherence-based raytracing can be employed to generate the final, high-quality images. Agrawala notes that the system is not yet able to exploit frame-to-frame coherence in rendering animations, such as would be required in an interactive virtual or game environment. "Our approaches were developed with the assumption that the scene geometry remains static from frame to frame, although the camera is free to move." The researchers are investigating the possibility of extending the algorithms in this regard.

Various components of the image-based soft-shadowing technique have already been tapped for commercial development, says Agrawala. "Compaq is exploring implementation of the display phase of our real-time layered attenuation map method on its hardware-based image-compositing architecture [called Sepia]. And our coherence-based raytracing algorithm has been implemented in Pixar's PhotoRealistic RenderMan."

Diana Phillips Mahoney is chief technology editor of Computer Graphics World.
Back to Top
Most Read