next up previous contents
Next: 10.2.1 2D Texture Light Up: 10 Lighting Techniques Previous: 10.1.4 Phong Shading by   Contents


10.2 Light Maps

A light map is a texture map applied to a material to simulate the effect of a local light source. Like specular highlights, it can be used to improve the appearance of local light sources without resorting to excessive tessellation of the objects in the scene. A excellent example of an application using lightmaps is the interactive PC game Quake$^{TM}$. This game uses light maps to simulate the effects of local light sources, both stationary and moving, to great effect.

Using lightmaps usually requires a multipass algorithm, unless the objects being mapped are untextured. A texture simulating the light's effect on the object is created, then applied to one or more objects in the scene. Appropriate texture coordinates are generated, and texture transformations can be used to position the light, and create moving or changing light effects. Multiple light sources can be generated with a combination of more complex texture maps and/or more passes to the algorithm.

Light maps are often luminance textures, which are applied to the object using GL_ MODULATE as the value for GL_ TEXTURE_ENV_MODE. Colored lights can also be simulated by using an RGB texture.

Light maps can often produce satisfactory lighting effects at lower resolutions than normal textures. It is often not necessary to produce mipmaps; choosing GL_ LINEAR for the minification and magnification filters is sufficient. Of course, the minimum quality of the lighting effect is a function of the intended application.



Subsections
next up previous contents
Next: 10.2.1 2D Texture Light Up: 10 Lighting Techniques Previous: 10.1.4 Phong Shading by   Contents
2001-01-10