Tuesday 28 October 2008

Sound Propagation in Games

Far Cry 2 - Fire

Sound propagation is a term used to describe how sound reacts to a given space. We know that sound travels through the air as a linear wave, the wave forces the air molecules to vibrate allowing the sound to travel. Sound propagation is not simply the reduction in volume as a listener moves away from a sound, it relates to the way the sound reflects and diffracts off certain surfaces. In terms of games, replicating the propagation of sound accurately is important, as it adds to the overall impression of 'realism' that the game creates.

The volume of a sound will obviously reduce as the listener moves further from it, and vice versa. The volume of the sound source will not react in a linear fashion, for a given radius the volume of the sound will react in a logarithmmic fashion. For instance as you can see in the rough graph i have made below, as the player/Listener moves slightly from the source there will be a very slight reduction in the volume of the sound, as the player reaches a certain point the sound will tail off very quickly. This happens as the energy of the sound wave dissipates and in simple terms cannot force the vibration of the air molecules any more.



The Game:



In the video you can plainly see how the players distance from the fire affects the sound, this is done by setting the radius of the sound and applying the diffusion properties to the sound cue. within the Unreal 3 Editor there are 5 possible settings for the propagation of the sound, in the second video i have shown the difference between the linear distance model and also the logarithmic. As i mentioned earlier the propagation of sound is not just the varying volume with distance from the source, but also hos the sound reaches the player, through reflections and reverborations. I found that this was quite hard to demonstrate in a video but during gameplay the effect is very good.


The propagation of sound can help you to pinpoint the location of an attacker in an area where there is no direct line of sight (Or sound) ie. when the path between you is blocked by a building or trees.

References:
http://hyperphysics.phy-astr.gsu.edu/Hbase/Sound/sprop.html#c1
http://arts.ucsc.edu/EMS/Music/tech_background/TE-01/teces_01.html
http://216.239.59.104/search?q=cache:91Wfsp1WWs4J:ftp://128.112.136.56/pub/people/funk/talks/gdc03/archive/cdrom.ppt+sound+propagation+on+games&hl=en&ct=clnk&cd=7&gl=uk (Downloaded as Powerpoint file)

No comments: