Note:This will not cover audio scripting--please refer to the "Sound" section under "Programming".
- General Manual on Sound in Unity
- Manual on Handling Audio Files in Unity
- Manual on Integrating Audio Trackers (i.e. FMOD) in Unity
Definition: Reverb Zones are spherical predetermined areas in a scene that give a specific kind of reverb to all sounds in the area. For instance, if the setting of the world/game is in a forest but eventually leads into a cave, a reverb zone would tell the world/game when to employ the "cave-like" reverb and when to employ the "forest-like" reverb (See Fig. 1). File:ReverbZoneDiagram.jpg
Note: Steps 1-9 aren't required to create a reverb zone--but it's a great way to establish a visualization for teammates to refer to. It might seem a little much, but it'll pay off once you really start mapping sounds throughout the world/game.
- In the Hierarchy window, click the Create button and then select Sphere.
- In the Inspector window, select the Sphere Collider tab and delete it. This will eliminate most problems with objects and players walking in and out of the sphere.
- Set the size of the desired zone for the Minimum Distance (the distance from the center of the sphere where the reverb will begin to attenuate [aka the radius]) of the reverb zone under the Scale tab in the Inspector window.
- Duplicate the sphere and increase its scale to set a Maximum Distance (the radius of this sphere will determine where the reverb will stop altogether) of the reverb zone under the Scale tab in the Inspector window.
- Create a new material for the minimum distance sphere by clicking the Materials folder (if you've created one) under the Project window, select the Create button, and select Material.
- In the Inspector window, select the drop down menu for Shader and select Transparent -> Diffuse so that the sphere will be transparent.
- Below Shader, use the Main Color option to set a color for the inner sphere and decrease the A(lpha) slider to increase transparency.
- Attach the now colored/transparent sphere to the minimum distance sphere and presto--you now have a visualization for the minimum distance of your reverb-zone-to-be.
- Repeat steps 5-8 for the maximum distance sphere. Make sure that the two spheres are different colors. In the end, the visualization should look something like Fig. 2. File:ReverbZoneVisualization.png
- In the Hierarchy window, create a new game object to parent both min and max distance spheres to. Example: By dragging and dropping both spheres onto a new game object called "ReverbZone", then adding any properties to "ReverbZone" will include the two spheres as well.
- After parenting the two spheres to a new game object, highlight that game object and add a reverb zone by selecting Component -> Audio -> Audio Reverb Zone in the top menu.
- Make sure both spheres and the reverb zone are aligned by making the Position (located in the Inspector window for all objects) the same for all three game objects.
- In the Inspector window for the reverb zone, have the Min Distance and Max Distance match the radius of the minimum and maximum spheres, respectively.
- Done! Now you can start tweaking the settings for the reverb itself under Reverb Preset, where a variety of presets for reverb zones representing certain environments can be found. By selecting the User present, you will be able to customize your own reverb using the following sliders.
Note: You can also add reverb zones to an audio source by simply selecting it in the Hierarchy window and selecting Component -> Audio -> Audio Reverb Zone (See Fig. 3). File:NakedReverbZone.jpg
- Room - Room effect level at low frequencies in mB. Ranges from -10000.0 to 0.0. Default is 0.0.
- Room HF - Room effect high-frequency level re. low frequency level in mB. Ranges from -10000.0 to 0.0. Default is 0.0.
- Room LF - Room effect low-frequency level in mB. Ranges from -10000.0 to 0.0. Default is 0.0.
- Decay Time - Reverberation decay time at low-frequencies in seconds. Ranges from 0.1 to 20.0. Default is 1.0.
- Decay HFRatio - Decay HF Ratio : High-frequency to low-frequency decay time ratio. Ranges from 0.1 to 2.0. Default is 0.5.
- Reflections - Early reflections level relative to room effect in mB. Ranges from -10000.0 to 1000.0. Default is -10000.0.
- Reflections Delay - Late reverberation level relative to room effect in mB. Ranges from -10000.0 to 2000.0. Default is 0.0.
- Reverb - Late reverberation level relative to room effect in mB. Ranges from -10000.0 to 2000.0. Default is 0.0.
- Reverb Delay - Late reverberation delay time relative to first reflection in seconds. Ranges from 0.0 to 0.1. Default is 0.04.
- HFReference - Reference high frequency in Hz. Ranges from 20.0 to 20000.0. Default is 5000.0.
- LF Reference - Reference low-frequency in Hz. Ranges from 20.0 to 1000.0. Default is 250.0.
- Room Rolloff - Determines how the reverb effect will attenuate as the player moves farther away from the reverb zone.
- Diffusion - Reverberation diffusion (echo density) in percent. Ranges from 0.0 to 100.0. Default is 100.0.
- Density - Reverberation density (modal density) in percent. Ranges from 0.0 to 100.0. Default is 100.0.