next up previous contents
Next: 11.3.4 Soft Shadows by Up: 11.3.3 Shadow Maps Previous: 11.3.3 Shadow Maps   Contents

11.3.3.1 Shadow Map Trade-offs

Shadow maps have an advantage, being an image space technique, that they can be used to shadow any object that can be rendered. You do not have to find the silhouette edge of the shadowing object, or clip the object being shadowed. This is similar to the argument made for depth buffering vs. an object-based hidden surface removal technique, such as depth sort.

The same image space drawbacks are also true. Since the shadow map is point sampled, then mapped onto objects from an entirely different point of view, aliasing artifacts are a problem. When the texture is mapped, the shape of the original shadow texel does not necessarily map cleanly to the pixel. Two major types of artifacts result from these problems; aliased shadow edges, and self-shadowing ``shadow acne'' effects.

These effects ca not be fixed by simply averaging shadow map texel values. These values encode distances. They must be compared against r values, and generate a Boolean result. Averaging the texel values results in distance values that are simply incorrect. What needs to be blended are the Boolean results of the $r$ and texel comparison. The SGIX_shadow extension does this, blending four adjacent comparison results to produce an alpha value. Other techniques can be used to suppress aliasing artifacts:

  1. Increase shadow map/texture spatial resolution. Silicon Graphics supports off-screen buffers on some systems, called a p-buffer, whose resolution is not tied to the window size. It can be used to create a higher resolution shadow map.

  2. Jitter the shadow texture by modifying the projection in the texture transformation matrix. The $r$/texel comparisons can then be averaged to smooth out shadow edges.

  3. Modify the texture projection matrix so that the $r$ values are biased by a small amount. Making the $r$ values a little smaller is equivalent to moving the objects a little closer to the light. This prevents sampling errors from causing a curved surface to shadow itself. This $r$ biasing can also be done with polygon offset.

One more problem with shadow maps should be noted. It is difficult to use the shadow map technique to cast shadows from a light surrounded by objects. This is because the shadow map is created by rendering the entire scene from the light's point of view. It's not always possible to come up with a transform to do this, depending on the geometric relationship between the light and the objects in the scene.


next up previous contents
Next: 11.3.4 Soft Shadows by Up: 11.3.3 Shadow Maps Previous: 11.3.3 Shadow Maps   Contents
2001-01-10