3D Animation Workshop: Lesson 91: Lightmaps in Pulse 3D | 2 | WebReference

3D Animation Workshop: Lesson 91: Lightmaps in Pulse 3D | 2


Lesson 91 - Lightmaps in Pulse 3D - Part 2

One of the most important methods for speeding up realtime rendering is "pre-lighting" objects and scenes. There are a number of methods, some of them quite sophisticated, for creating texture maps that make a surface look like it's been lit. Lightscape, for example, has excellent tools for computing the effects of complex lighting, and then effectively "painting" the illumination on the surfaces. That way the lights can be removed from the scene, the surfaces still look like they've been lit.

Vertex color is a very important method for creating persuasive lighting patterns that "stick" to the surface of objects, without the need for lights. Colors are assigned to the individual vertices of objects, and the surfaces render their assigned colors, even in absence of light sources. The following image shows a box with colors assigned to the vertices. Note how the colors blend between the vertices.

But a completely different way of simulating quality lighting has been emerging in realtime graphics. The idea is so simple that it takes some convincing to see that it really works. The concept is of "environmental light maps."

An environment map is an image that is intended to completely enclose a scene. It can serve two purposes. It may be used to render a convincing background. For example, it's common to wrap an image of a starry sky to an infinite sphere surrounding a scene set in outer space. This kind of spherical environment map gives the impression that the scene extends in every direction.

A second purpose for an environment map is to create a basis for reflections on the surface of an object. For example, a reflective chrome surface on a bumper will not look convincing unless the viewer sees reflected imagery. A spherical map-perhaps of the sky-can provide the necessary source of reflections. Often you'll see both uses at once. The environmental map will be rendered to provide an all-enclosing background, and will also be used for reflections on shiny surfaces.

But environmental maps can be used to simulate lighting as well, and Pulse has done an excellent job of implementing this exciting technique. Take a look at the simple grayscale image below. Imagine it wrapped around a gigantic sphere. A model of a baby's head is placed in the middle of this sphere and is rendered lighter or darker depending of the shade of the surrounding pixels on the map. The result is remarkably subtle, and requires no lighting computations. The mapping computations are extremely fast.


This whole thing is quite amazing in its simplicity, so take some time to think it through. The sphere amounts to a lighting environment from the point of view of the object. In this case, the light is coming from above front-left. If light is should be coming from below, you can use an image that is lighter on the bottom.


To Continue to Part 3, or Return to Part 1, Use Arrow Buttons

Created: Apr. 24, 2000
Revised: Apr. 24, 2000

URL: http://webreference.com/3d/lesson91/2.html