next up previous contents
Next: 10.6 Bump Mapping with Up: 10.5 Global Illumination Previous: 10.5.1 Virtual Light Technique   Contents

10.5.2 Combining OpenGL Lighting with Radiosity

Radiosity solutions produce accurate global illumination solutions for diffuse reflections. They are computationally expensive, but viewer independent, so their usefulness tends to be limited to static scenes. They also don't model specular reflections, so separate processing must be done to add them. The hardware lighting equations supported by OpenGL are fast, and provide adequate realism for direct lighting of objects. A hybrid solution combines the best of both radiosity and OpenGL lighting. This technique creates realistic scenes with both diffuse and specular reflections that is viewer dependent and insensitive to small changes in object position.

Computing radiosity is a recursive process. Each step consists of processing each surface, computing the incoming radiosity from each visible surface in the scene, then updating the emitted radiosity of the surface. This process is repeated until the radiosity values of the surfaces converge. The first step of this process consists of setting the radiosity of the illumination sources of the room. Thus the first radiosity iteration computes the contributions of surfaces directly illuminated from the scene's light sources.

The hybrid approach computes the radiosity equation, then subtracts out the radiosity contributes from this first step. What's left is the indirect illumination caused by object inter-reflection. The objects in the scene are colored using this radiosity result, then lit using standard OpenGL lighting techniques. The OpenGL lighting provides the missing direct illumination to the scene. The lighting equation is parameterized to provide no ambient illumination, since the radiosity computations supply a more accurate solution.

This technique has several advantages. Since normal OpenGL lighting provides the direct specular and diffuse lighting, the viewer dependent parts of the scene can be rendered quickly, once the initial radiosity computations have been completed. The radiosity results themselves are more robust, since they only contribute lighting effects from object inter-reflections. Viewed as light sources, objects in the scene tend to have large areas, so the amount of incident light falling on any given object is fairly insensitive to its position in the scene. These effects are also a smaller percentage of the total lighting contribution, so they will still ``look right'' longer as the object moves. The direct part of the lighting contribution is still taking object position into account.

At some point in a dynamic scene, the radiosity errors will become noticeable, so the radiosity equations will have be recomputed. Since the errors accumulate more slowly, this cost can be amortized over a larger number of frames. Small objects can move significantly without large error, especially if they are not very near large objects in the scene. Other techniques mentioned in these notes can also be combined with this one to improve the realism of OpenGLs direct illumination, since the radiosity contribution and the direct illumination contribution are orthogonal. See [25] for more details on this technique.


next up previous contents
Next: 10.6 Bump Mapping with Up: 10.5 Global Illumination Previous: 10.5.1 Virtual Light Technique   Contents
2001-01-10