i
i
i
i
i
i
i
i
9.9. Precomputed Lighting 417
Photon mapping is often used together with ray tracing. Ray tracing is
appliedinthefinal gather phase, where rays are shot from each rendered
location to collect indirect illumination (from the photon maps) and direct
illumination (from the light sources).
GPU implementations of these methods have been developed [383, 472,
1039, 1215], but are not yet fast enough to be used in real-time applications.
Rather, the motivation is to speed up offline rendering.
An interesting development is the invention of new global illumination
algorithms designed specifically for the GPU. One of the earliest of these
is “Instant Radiosity” [641], which, despite its name, has little in common
with the radiosity algorithm. The basic idea is simple: Rays are cast out-
ward from the light sources. For each place where a ray hits, a light source
is placed and rendered with shadows, to represent the indirect illumination
from that surface element. This technique was designed to take advantage
of fixed-function graphics hardware, but it maps well onto programmable
GPUs. Recent extensions [712, 1111, 1147] have been made to this algo-
rithm to improve performance or visuals.
Other techniques have been developed in the same spirit of representing
bounce lighting with light sources, where the light sources are stored in
textures or splatted on the screen [219, 220, 221, 222].
Another interesting GPU-friendly global illumination algorithm was
proposed by Sloan et al. [1190]. This technique was discussed on page 385
in the context of occlusion, but since it models interreflections as well, it
should be counted as a full global illumination algorithm.
9.9 Precomputed Lighting
The full global illumination algorithms discussed in the previous section
are very costly for all but the simplest scenes. For this reason, they are
usually not employed during rendering, but for offline computations. The
results of these precomputations are then used during rendering.
There are various kinds of data that can be precomputed, but the most
common is lighting information. For precomputed lighting or prelighting
to remain valid, the scene and light sources must remain static. Fortu-
nately, there are many applications where this is at least partially the case,
enabling the use of precomputed lighting to good effect. Sometimes the
greatest problem is that the static models look much better than the dy-
namic (changing) ones.
9.9.1 Simple Surface Prelighting
The lighting on smooth Lambertian surfaces is fully described by a single
RGB value—the irradiance. If the light sources and scene geometry do