Using 3D Sound:
3D sound is a setting within the AudioSource Component of a GameObject. 3D Sound allows an Audio Listener (usually attached to a camera) to process the sound’s position relative to the camera to provide stereo panning (left and right speaker variances) and volume falloff features (decreasing volume the further an object is from the Listener).
Triage features a variety of patients on gurneys that move independently. For the viewer to get the feeling for the gurneys taking up the space before them, we can make the AudioSources on each gurney 3D. To set an Audiosource to be 3D, we just need to turn the Spatial Blend up (below):
Now, expand the 3D Sound Settings menu item:
If you play the game with a sound on loop, you may notice – depending on your camera setup – that ther audio produced by the object is quiet. The bottom graph represents the volume falloff range. Just like distant noises are quiet, sounds further from the camera will lose their volume. The Volume Falloff Graph lets you adjust the falloff curve. By default, you can choose a logarithmic or linear curve, but for the distance of my camera to the scene, I just need to create a little extra volume at the 50-80 units of distance from the scene, as we can see below:
Lastly, 3D Sound can be used on all objects that exist outside the player’s head. For example, music, radios and weapon sounds don’t need 3D sound, becausund effects like reverb for atmosphe they’re ‘in the player’s head’ (but can still use soere). AudioSources have separate options for stereo panning for a cheap 3D sound (if you want weapons, radios, etc to be slightly off-centre, as per below).
Creating Atmosphere with Sound
Audio is very important in setting the mood and tone of a scene. Typical audio setups rely on a series of audio layers in order to achieve the intended atmosphere. For example: How many sounds make up a cafe scene in a movie? You can have noises from outside the cafe, idle chatter and sounds from within the cafe, dialogue from all intended characters, and a soundtrack on top. Each layer has its own volume and effect adjustments to level out the scene.
For Triage’s mood, it needs extra layers of audio for atmospherics. For example, on top of the audio and music already present in the game, it needs an atmospheric track, and for the volume and effects to be levelled out amongst the scene.
To start, I will add an atmosphere track to the scene, called AtmosphericSFX.
I will then drag my atmosphere track, Corridoor onto it, and set to it Play on Awake and Loop:
Balancing out the Volume
As a rule of thumb, I tend to prefer that dialogue is louder than all other tracks in a scene. Since, however, there is no dialogue, I think that the music should take centre-stage, and the atmospheric and gurney sounds should be quieter. For this, I wiull leave the music volume at 1, but adjust AtmosphericFX and Gurney AudioSources to 0.5
Defining the SoundScape
Lastly, hospitals are very sterile environments with very little carpet or soft areas. Hard edges and surfaces bounce sound around the place, creating reverb. Different to an echo, reverb effects trail sound instead of repeating it. Unity allows you to set up Reverb Zones to define areas where reverb is necessary for AudioSources that use it.
Once created, use the properties to position and size it to fill up the scene. Every sound created within (and setup to use Reverb) will reverb as per the component’s properties
Lastly, select an appropriate preset for the Reverb Zone. Because hospitals have little to no soft or fabric surfaces, I think that the Bathroom preset is appropriate, but this will differ in taste from person-to-person:
Take advantage of Unity’s audio effects to enhance your intended mood. We went from having only two tracks of sound to three, and applied effects to bring the scenery and audio together. A game should sound similar to how it looks, and sounding the way players expect will combine the atmosphere of the two disciplines.