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.

http://arts.ucsc.edu/EMS/Music/tech_background/TE-01/teces_01.html (Downloaded as Powerpoint file)

Monday, 13 October 2008

Non Repeating Game Sound - Crysis

Non - Repeating Ambiances Within Crysis
In this article i will look at several different sections of the game, concentrating on the non repeating nature of the ambiances. throughout the game there are many different levels, all of which offer a different ambience to set the scene and also make the gameplay more realistic.

A non-repetitive ambiance is basically many layers of sounds that are not playing as a loop. these sounds can be triggered by an aspect of the gameplay but in the cases i will be looking at the sounds are randomised.
creating ambiances in this way not only gives the game more 'realism' but also allows the sound designer to build an impressive ambiance using up less memory. in this diagram you can see a very simple representation of how the layers could be called for playback within the game. the background track would always be playing, this would be the low rumble heard in the first section of the video. this is most likely to be 1 looped sound, as it has no variation and simply serves the purpose of letting the player know they are outside.

The middle distance sounds depicted in the diagram could be those of the distant bird sounds in the first section of the video or those of the waves hitting the shore in the night time section. these sounds are no doubt repeated after a period of time, but the way in which they are randomised covers this fact up. In the case of the waves hitting the shore in the night clip, there could be 4 different small loops containing wave sounds. Only one of these loops can be playing at any time, but one has to be playing.

The close-up sounds; ie the birds, frogs and flies, will again be short clips that are triggered in a random manner. Each of the sounds plays back with a probability of 6.5% making the random feel of these sounds much greater than those of the middle ground. it is possible that within crysis it is not imperative that these sounds be playing all the time, so there could be a short randomised delay between the triggering of each sound.

This effect could be accomplished in the Unreal 3 Editor quite simply like this:

The ambiance within the Crysis examples no doubt has many more layers than i have shown in the example. Also with the addition of the OpenAL and EAX 5.0 software, the sound designers have been able to add real time effects to the sounds for greater variation. Effects include Pitch and Volume variation and also some filtering of certain frequencies.

Something Cool!
One of the features of the suit worn by the character in the game is 'Cloak Mode', then the player enters the cloaked mode the sound is changed by filtering out all of the top end frequencies (4000Hz and above). This filtering of the sound gives the player a slightly more 'closed off' feeling really giveng the impression of being cloaked. Below i have cut out 2 sections of the audio from the video and have viewed them in the frequencies view in Adobe Audition. the top picture is Uncolaked and the bottom picture is Cloaked.

This effect adds another aspect to the variation of the sound in the game, as the player can cloak or uncloak at any time.

Sunday, 12 October 2008

Ugly Game Sound?

When you play Dirt for the first time it is very obvious that there has been a lot of attention paid to the engine sounds of the vehicles; infact Codmasters boasts that they have recorded over 12 hours of actual engine footage, to give the cars the most realistic sound ever. But is this the way forward in terms of making the sound of the overall game the most realistic it has ever been?

There is no doube that the last game in the series to bear the Colin McRae title is the best one yet, but i think the sound could have been vastly improved in certain areas, to overall improve the sound and 'realism' of the rest of the game.

1/ Firstly and most obvious is the lack of sound information given to the player about the surface they are on. As you can see in the first section of the video below, there is no road noise from the dirt track that the vehicle is travelling along. Not only this but, when the vehicle leaves the ground, or crashes into the undergroath, the sound doesnt have the immediate impact that you would expect.
2/Impacts with trees and other foliage doesnt always trigger a sound, and when they do its generally a very weak snapping sound which is repeated, this can be seen in the video (1:50) when i crashed off the mountain side and hit 3 separate trees. Each of these collisions triggered a sound, but it was the same sound in all 3 cases.
3/ Sounds from the inside view, have a nice spacy feel to them but during impacts some of the sounds are a little distant, resulting in a less simulation feel to the overall game.
4/ Although a lot of care and attention has been paid to the engine recordings, i find them to be a little 'dry' this might just be a personal feeling, but there is very little change in feel of pitch to the engine which gets quite tiresome during the longer races.

Possible Improvents:
With regard to the fact that the Colin McRae Dirt engine supports Craetive EAX 5.0, which affords it upto 127 audio tracks allong with direct OpenAL support, for spatialistin sounds and also adding real time effects and reverbs to sounds. this could have been put to better use in this game.

1/ No or little road sound. firstly i would have added surface sounds to give feel to the track the player is driving on. These sounds could have been looped or somehow tied into games engine so that a real time surface sound track was being generated. secondly to asdd more of a feeling of speed to the gameplay i would have added some stone chipping sounds, these sould have amplitude and slight pitch modulation added to them to give a louder more aggressive thud when the car is travelling quickly.

2/ Impacts with trees and foliage. These sounds could be enhanced quite simply by adding a collision model to the trees and foliage and triggering a sound when the car comes itco contact with them. the sounds that would be played could be kept to a minimun in terms of size as they would not need to be too high quality. this is an example of how this could be achieved in unreal KISMET very simply.3/ Simply boost the gain of the impacts and add some extra sounds to give the impacts more volume.

I think the sound designers could have improved on these points quite easily. it may have been the case that there was simply no more space for sound after using such a high volume of real engine sounds; but in my opininon they sould have cut back on the amount of space devoted to these engine sounds and concentrated on creating a better all round sound for the game.

Still an awesome game though!

Ref :
Codemasters GDC 2007 On Youtube (All Videos)