next up previous contents
Next: 10.6 Bump Mapping with Up: 10. Lighting Techniques Previous: 10.4 Other Lighting Models

10.5 Global Illumination

The lighting models described thus far have been relatively simple. The subtleties of real lighting are often captured using a global illumination model. Global illumination models using radiosity or ray tracing are generally too computationally complex to perform in real-time. However, if the objects and light sources comprising the environment are static it is possible to perform the global illumination calculations as a preprocessing step and then display the results interactively. Such an approach is both practical and useful for applications such as architectural walkthroughs. The technique is typically employed for diffuse illumination solutions since view-independent (ideal) diffuse illumination can be represented as a single value (color) at each object vertex.

In [99] Walter, et. al. describe a method for rendering global illumination solutions which contain view-independent directionally variant lighting effects using the specular term in the OpenGL lighting model to approximate the directionally varying lighting information and the emissive term to approximate the directionally invariant illumination (i.e., diffuse illumination). In this method, a set of OpenGL lights are treated as a set of basis functions which are summed together while the object is rendered to yield a more general directional distribution. The OpenGL light parameters such as position or intensity coefficients have no relationship to the light sources in the original model, but instead serve as a compact representation for the directional illumination of an object. Each rendered object has its own set of lights which are called virtual lights.

The method works on a global illumination solution which stores a number of samples of the directionally varying illumination at each object vertex. The parameters for the virtual lights of a particular object are determined using a fitting procedure consisting of a number of heuristics. The main idea is to produce a set of solutions for a number of specular exponent values and then choose the exponent value which minimizes the mean-squared error using a least squares method. A solution at a given exponent value is determined as follows:

1.
Choose a specular exponent value.
2.
Find the vertex on the object with the largest directional radiance.
3.
Choose a light direction to align the specular lobe with this brightest direction.
4.
Choose an intensity coefficient to match the radiance at the point on the object.
5.
Compute the specular contribution at other points on the object and subtract from the radiance.
6.
Repeat steps 2-5 using updated object radiance until all lights have been used.
7.
At each vertex compute the specular and emission coefficients using a least squares fit.

Once the lighting parameters have been determined the model is rendered using the glLight() and glMaterial() commands to set the directional light parameters and specular exponent for each object and the glMaterial() command to set the specular reflectance and and emitted intensity at each vertex. The rendering speed for the model is limited by the geometric complexity of the model and the ability of the OpenGL implementation to deal with multiple light sources and material changes at each vertex. Rendering performance may be improved by rendering in multiple passes to limit the number of active lights or the number of material parameter changes in each pass. For example, using glColorMaterial() and glColor() to change only the emitted intensity or specular reflectance in each pass and framebuffer blending to sum the results together.


next up previous contents
Next: 10.6 Bump Mapping with Up: 10. Lighting Techniques Previous: 10.4 Other Lighting Models
David Blythe
1999-08-06