Dynamic or Static Lighting Computations

One question we have not addressed is exactly when we carry out the lighting calculations. This answer is partially dependent on the rendering technique we use for drawing the polygons (covered in the next section); it is also partially dependent on whether we want static lighting or dynamic lighting. Static lighting is lighting which does not change throughout the course of a user's interaction with the virtual environment. In such a case, we compute light intensities in a preprocessing stage and store these light intensities in some format needed by our rendering technique; storing one color per polygon, or one color per vertex, or one color per lumel in a light map are all possible means of saving the computed light intensities. Then, when drawing the interactive 3D scene, we do not need to worry about computing any light intensities; the light has already been "burned into" or "painted onto" our geometry, and only needs to be drawn using an appropriate rendering technique.

Dynamic lighting is lighting that changes while a user is interacting with the 3D environment. Dynamic lighting implies a change in any factor affecting any of the lighting equations used. Such factors include surface geometry, surface orientation, surface attributes, light position, light attributes, and lighting parameters. Based on the new parameters, we dynamically recompute the illumination for all affected parts of all geometry, and store the new illumination values with the geometry for later use by the light rendering process. By defining lights to only have a certain area of influence (such as a sphere), we can limit the amount of geometry that dynamic light affects and therefore limit the amount of computation that needs to be done when this dynamic light changes intensity.

Was this article helpful?

0 0

Post a comment