Simulating a tunnel environment with Reverb Zones

Once you have created your level's geometry, and the scene is looking just the way you want it to, you might want your sound effects to correspond to that look. Sound behaves differently depending on the environment it is projected, so it can be a good idea to make it reverberate accordingly. In this recipe, we will address this acoustic effect by using Reverb Zones.

Getting ready

For this recipe, we have prepared a package containing a basic level named reverbZoneLevel and the signal prefab. The package is in the 0423_06_03 folder.

How to do it...

Follow these steps to simulate the sonic landscape of a tunnel:

  1. Import the reverbZones package into your Unity project.
  2. In the Project view, open the reverbZoneLevel level, inside the 06_03 ReverbZones folder. This is a basic scene featuring a first-person camera and a tunnel.
  3. Now drag signalPrefab from the Project view into the Hierarchy view. That should add a sound-emitting object to the scene. Place it in the center of the tunnel.
    How to do it...
  4. Make five copies of the signalPrefab game object and distribute them across the tunnel (leaving a copy just outside each entrance), as shown here:
    How to do it...
  5. In the Hierarchy view, click Create to add an Audio Reverb Zone to the scene. Now place it in the center of the tunnel.
  6. Select the Reverb Zone game object. In the Inspector view, change the Reverb Zone component parameters to these values: Min Distance: 3; Max Distance: 9; Preset: StoneCorridor:
    How to do it...
  7. Play the scene and walk through the tunnel. You should hear the audio reverberate when inside the Reverb Zone area.

How it works...

Once positioned, the Audio Reverb Zone applies an audio filter to all audio sources within its radius.

There's more...

Here are more options for you to try.

Attaching the Audio Reverb Zone component to audio sources

Instead of creating an Audio Reverb Zone game object, you could attach it to the sound emitting object (in our case, signalPrefab) as a component by navigating to Component | Audio | Audio Reverb Zone. In this case, the Reverb Zone would be individually set up around the object.

Making your own Reverb settings

Unity comes with several Reverb presets. We have used StoneCorridor, but your scene could ask for something less intense (such as Room) or more radical (such as Psychotic). If those presets still won't be able to recreate the effect you have in mind, change it to User and edit the parameters as you wish.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.93.141