i
i
i
i
i
i
i
i
9.1. Shadows 359
scheme, since each object has one and only one shadow map associated
with it.
Flagship Studios developed a system for “Hellgate: London” that blends
these two ideas [296]. Three shadow maps are generated. One shadow map
adjusts to the view’s focus and frustum and includes just the animated
(and/or breakable) objects in the scene. The second map is associated
with a grid section of the level, selected by the view position. It covers
a much larger area and includes only static objects. Finally, a third map
covers the whole level’s static objects. See Figure 9.24.
To access these maps, the object being rendered is checked to see if it
fully fits inside the second, grid-based shadow map. If so, this map is used,
else the full level map is accessed. In this way, nearby objects will use the
map with a higher sampling rate. The first map, of the animated objects, is
also accessed, for all objects rendered. Whichever z-depth result retrieved
from the two maps is lower is the one used for shadow determination. One
advantage of this system is that by separating out the animated objects to
their own map, the grid shadow map is regenerated only when the viewer
moves to a new grid section. The level map is generated only once. Nearby
animated objects are usually the focus of attention, and by this scheme,
these will cast the highest quality shadows.
Lloyd et al. [784, 785] introduce a scheme called z-partitioning and show
how it can help with shadow sample distribution. Engel [312] and Zhang et
al. [1404] independently researched the same idea, which the latter group
calls parallel split shadow mapping.
4
The idea is to divide the view frus-
tum’s volume into a few pieces by slicing it parallel to the view direction.
See Figure 9.25. As depth increases, each successive volume should have
about two to three times the depth range of the previous volume [312, 1404].
For each volume, the light source makes a frustum that tightly bounds it
and then generates a shadow map. Lloyd et al. discuss how this method
can be combined with LiSPSM. By using texture atlases or arrays, the
different shadow maps can be treated as one large texture, thus minimiz-
ing texture cache access delays [312]. Zhang et al. [1405] give a thorough
explanation of how to implement this rendering algorithm efficiently. A
comparison of the quality improvement obtained is shown in Figure 9.26.
Valient [1289] also provides implementation details and presents a method
of avoiding shimmer artifacts as objects transition from one shadow map
to another. Deferred shading can be used with CSM, computing the effects
of all shadow maps and saving the results in a separate channel for later
evaluation [312, 887]. The “sunlight occlusion” buffer in Figure 7.48 on
page 280 is an example.
4
Tadamura et al. [1237] introduced the basic idea seven years earlier, but it did not
have an impact until these researchers explored its usefulness in 2006.