Advanced Features of Ambiences

Overview

Radius

Each AmbientVolume has a radius. As you get closer to an area, the ambience will begin to fade in at a certain distance away from the perimeter of the area shape. That distance is controlled by setting the radius in the AmbientVolume properties.

Nesting

Ambiences can be nested. For example, you may want the sounds of a jungle to be cancelled as you enter a small building in the middle of the jungle.

  • Create a large area shape (the jungle) and a smaller area shape inside it (the building).
  • Link a separate, unique AmbientVolume to each area shape.
  • Click the areas shapes and assign a Group ID of 1 or higher to each. Assigning the same Group ID to both areas causes them to interact with respect to their ambient sounds. This setting is found in the parameters of the area shape entity.
  • Also, assign a priority to both areas. The higher priority shape will cause the ambient sound of the lower priority shape to cancel out when the player enters the higher priority shape. This setting is found in the Shape Parameters for the area shape entity. In the case of a building in a jungle, you can give the ambience for the small building a priority of 2 and the jungle a priority of 1.
Note

The radius of the higher priority shape is used when cross fading between nested AmbientVolumes. For example, if the jungle has a radius of 20, but the small building has a radius of 1, the jungle sound will fade out over a distance of one meter, when the player walks into the building. However, when the player walks out of the jungle into an unrelated ambience, the jungle sound will fade out over a distance of 20 meters.

Environment

Ambience can be set to respond to the “environment” parameter in the ReverbVolume entity.
By adding the parameter “environment_listener” or “environment_sound” to the FMOD event, it will pass the “environment” value from the ReverbVolume entity to allow modification in real time with FMOD effects.

The “environment_listener” parameter passes the “environment” value of the ReverbVolume based on the listener position.

The “environment_sound” parameter passes the “environment” value of the ReverbVolume based on the sound entity position.

  • Create a sound event using the FMOD Designer Tool
  • Add the parameter “environment_listener” or “environment_sound” with a range of 0 – 3.
  • Add an effect from FMOD (e.g. pitch) and draw the effect curve as desired.
  • Adjust the Environment value in the ReverbVolume entity

The image below shows the ReverbVolume entity properties.

The image below shows the environment_listener parameter on an ambience used in an AmbientVolume entity.

When the listener is in an area with the ReverbVolume environment value=1, the sound is unmodified. When the listener is in an area with the ReverbVolume environment value=2, the sound is pitched down by 9 semitones and also reduced in volume by 9dB.

The image below shows the “environment_sound” parameter on a gunfire event used in a SoundEventSpot entity.

When the sound is placed in an area with the ReverbVolume environment value=1, it plays unmodified. When the sound is placed in an area with the ReverbVolume environment value =2, it will reduce its pitch by 3 semitones.

Response

Ambiences can be set to respond to gunfire and explosions (for example, if you would like to have birds in the ambience when there is no battle, but only hear wind when there is fighting).

  • Using the FMOD Designer tool, create a sound event for an ambience, as described above.
  • The event should have a second parameter called battle. Set it to be the control parameter, which gives the battle parameter the exclusive right to fade between sound definitions (in this example, ambience_camp_area and wind_some_debris_loop).
  • The image below shows two stereo ambiences; one with animals, one without. During battle, the battle parameter is located near 1.0, thus playing the wind sound. If there is no battle, it gradually slides back to 0.0 and birds fade back in.

Time of Day

Ambiences can be set to change according to the dynamic day/night cycle. For example, during the day, a jungle ambience will have more bird calls, while at night, it probably should have more insect noises instead.

  • Add a third parameter called daylight. Daylight is not the same as the day/night cycle; instead, it's when the sun is up or down, so this transition is rather quick.
  • Create a second layer for the night ambience. To do this, copy/paste the first layer, and then choose new ambiences for the night layer.
  • As you can see in the image, the daylight parameter is highlighted. Now you will be able to add a volume effect to each layer, and also a specific fade curve. During the day, the parameter is close to 1.0, thus playing the day ambience at full volume. As the sunlight reduces, it gradually slides to 0.0 and the night ambience fades in while the day ambience fades out.
  • Note that every parameter (spread, battle, and daylight) has its own slider and is independent from all the other parameters.