Game Development Reference
In-Depth Information
precomputed incident light information, we are usually forced to discard or
compress this information.
Another option is whether the precalculated illumination includes direct
lighting, indirect light, or both. This decision can often be made on a
per-light basis. The earliest examples of lightmapping simply calculated
the direct light from each light in the scene for each patch. The primary
advantage of this was that it allowed for shadows, which at the time were
prohibitively expensive to produce in real time. (The same basic idea is
still useful today, only now the goal is usually to reduce the total number of
real-time shadows that must be generated.) Then the view could be moved
around in real time, but obviously, any lights that were burned into the
lightmaps could not move, and if any geometry moved, the shadows would
be “stuck” to them and the illusion would break down. An identical runtime
system can be used to render lightmaps that also include indirect lighting,
although the o ine calculations require much more finesse. It is possible
for certain lights to have both their direct and indirect lighting baked into
the lightmaps, while other lights have just the indirect portion included in
the precalculated lighting and direct lighting done at runtime. This might
offer advantages, such as shadows with higher precision than the lightmap
texel density, improved specular highlights due to the correct modeling of
the direction of incidence (which is lost when the light is burned into the
lightmaps), or some limited ability to dynamically adjust the intensity of
the light or turn it off or change its position. Of course, the presence of
precalculated lighting for some lights doesn't preclude the use of completely
dynamic techniques for other lights.
The lightmapping techniques just discussed work fine for static geome-
try, but what about dynamic objects such as characters, vehicles, platforms,
and items? These must be lit dynamically, which makes the inclusion of
indirect lighting challenging. One technique, popularized by Valve's Half
Life 2 [28,47], is to strategically place light probes at various locations in the
scene. At each probe, we render a cubic environment map o ine. When
rendering a dynamic object, we locate the closest nearby probe and use
this probe to get localized indirect lighting. There are many variations on
this technique—for example, we might use one environment map for diffuse
reflection of indirect light, where each sample is prefiltered to contain the
entire cosine-weighted hemisphere surrounding this direction, and a differ-
ent cubic map for specular reflection of indirect light, which does not have
this filtering.
10.8
Skeletal Animation
The animation of human creatures is certainly of great importance in video
games and in computer graphics in general. One of the most important
 
Search WWH ::




Custom Search