Shadow Generation for Realtime Simulation

Nate Robins


Shadows are an important visual cue for perception of spatial relationships between objects. The addition of shadows greatly increases the visual realism of the scene. Unfortunately, generation of general shadows presents a significant problem in terms of efficient calculation. In realtime simulation, where maintaining a specific frame-rate is important, resolution of any inefficient computation is even more mandatory. This project will survey two different shadow algorithms in order to compare them for efficiency in a realtime situation such as a Virtual Reality application. The two algorithms under analysis are shadow buffers [3] and shadow textures [1].
The focus of the project will be the implementation of the above two techniques for producing shadows. Both methods can be generalized to generate either soft shadows or hard shadows. Soft shadows appear more realistic than hard shadows, so are desirable for more realistic simulation. I will implement the generalized algorithms in order to eventually compare the visual difference between hard & soft shadows in a realtime system. The goal of the project will be to implement a technique for generating shadows quickly that can easily be incorporated into a realtime simulation system. This project is a starting point for a new type of realistic visual simulation system which hybridizes radiosity and scan converting methods.


Shadow Buffer [3]
The traditional shadow buffer algorithm renders into a framebuffer the scene from the point of view of the light (hence the name shadow buffer). Then the scene is rendered from the point of view of the eye and depth values are compared to those in the shadow buffer. If the values are less than those in the shadow buffer, that pixel is in shadow, and it is appropriately darkened. In order to do soft shadows with this method, several scenes must be rendered, each from a slightly different point of view from the light. The resulting images can then be composited quickly using an accumulation buffer for example.
Shadow Textures [2]
The shadow textures method creates texture maps for each receiver polygon in a scene and uses those texture maps in place of lighting effects if the polygon is in shadow. It is designed to create soft shadows, but can be limited to generating only hard shadows as well.


[1] Paul Heckbert, Michael Herf. Simulating Soft Shadows with Graphics Hardware. CMU-CS-97-104, CS Dept, Carnegie Mellon U., Jan. 1997.
[2] Paul Heckbert, Michael Herf. Fast Soft Shadows. SIGGRAPH '96 Visual Proceedings, page 145. Aug. 1996.
[3] William Reeves, David Salesin, Robert Cook. Rendering Antialiased Shadows with Depth Maps. Computer Graphics, Volume 21, Number 4, July 1987.
[4] James Blinn. Me and My (Fake) Shadow. Jim Blinns Corner, pages 53-61, January 1988.
[5] Foley, et al. Computer Graphics Principles and Practice pages 745-753, Addison Wesley, Second Edition 1990.
[6] David Blythe, Tom McReynolds. Programming with OpenGL: Advanced Rendering. SIGGRAPH '96 Course Notes. August 1996.