Game Development Reference
In-Depth Information
Figure 26-8. Reflected waves
The degree to which sound waves are reflected has to do with the characteristics of the
material from which they bounce. Smooth, hard surfaces will tend to reflect more of
the sound energy, while softer, irregular surfaces will tend to absorb more energy and
scatter the waves that are reflected. These characteristics lend a certain quality to the
ultimate sound the listener hears. The same sound played in a tiled bathroom will have
a distinctly different quality than if it were played in a room with carpet, drapes, and
tapestries. In the bathroom the sound may sound echoic, while in the carpeted room it
may sound muted. Somewhere in between these two types of rooms, the sound may
reverberate. Reverberation is a perceived prolonging of the original sound due to re‐
flections of the sound within the space.
In your games, it would be prohibitively expensive (computationally speaking) to try
to model various sound sources interacting with all the walls and objects in any given
space within the game in real time. Such computations are possible and are often used
in acoustic engineering and noise control applications, but again, it's too costly for a
game. What you can do, however, is mimic the reflective or reverberant qualities of any
given space in your game environment by adjusting the reverberation of your sound
sources. One approach is to record sound effects with the quality you're looking for to
represent the space in which that sound effect would apply. For example, you could
record the echoic sound of dripping water in a stone room to enhance the atmosphere
of a dungeon.
Alternatively, if you're using a system such as OpenAL and if the reverberation special
effect is available on your sound card, you can assign certain reverberation character‐
istics to individual sound sources to mimic specific environments. This sort of approach
falls within the realm of environmental modeling, and the OpenAL Effects Extension
Search Nedrilad ::

Custom Search