Game Development Reference
In-Depth Information
This usually has to be done for each ray of light; the process is called ray tracing .Ray
tracing is impractical for much real-time game rendering because it takes up too
much processor time. Some of the newer games on very high-powered systems use
ray tracing in a limited form. In the absence of true reflections, game developers
have come up with a few tricks that simulate reflective surfaces.
Specularity
Specularity is a surface property that helps define an object as shiny or dull. Shiny
objects have well-defined highlights. These highlights are direct reflections of the
light source. By placing a well-defined highlight on an object, you generally give
the object a shiny appearance, even without a complete reflection.
Environment Maps
Some surfaces need more than just a specular highlight to look right. A shiny car,
for example, needs to reflect its surroundings. One way developers have created
the look of reflections without resorting to the time-consuming process of ray
tracing is by using an environment map. An environment map is a texture that gets
rendered onto a surface as a reflection. The texture is usually a close approxima-
tion of the environment the object is in, and it can be changed from time to time
as an object moves. Figure 1.18 shows an example of an environment map.
Figure 1.18
An environment map
Rendered Reflections
Another trick for achieving reflective qualities in games is to build the reflection
geometry. This method only works on flat surfaces, such as floors, but it is very
effective in giving a scene a realistic reflection. Take a look at how this is done. The
lamp shown in Figure 1.19 is sitting on a tile floor. There is an exact duplicate of
the lamp directly below the lamp, but upside down. The floor is semitransparent
so the lower model shows through the floor. The effect makes the floor look reflec-
tive and the objects move completely accurately for the reflection. This process
obviously takes more polygons to create, but the effect is sometimes worth the
extra geometry.
Search WWH ::




Custom Search