Applying Reverb to a Rectangular Room in Unity

Unity offers a very simple way to add environmental reverb to a defined space: the built-in Reverb Zone. It allows you to apply a reverb effect to sounds based on the player's position in the world, and is very simple to set up and use in environments where precise spatial control isn't required. However, by design, Reverb Zones are always spherical. But what about rectangular shapes such as rooms?
If you use a spherical reverb zone in a rectangular space, it will likely fail to fully cover the interior. You might try extending the radius to reach the corners, but then the effect can bleed outside the room's boundaries. Things can easily get messy.
A Practical Alternative: Trigger + Mixer Snapshot
Instead of trying to stretch a sphere to fit a box, you can recreate the effect using Unity's Audio Mixer Snapshots and a trigger collider.
Here's how you can set it up:
Create a Cube GameObject that represents the room area.
Add a Box Collider component and set it to Is Trigger.
Create a script that detects when the player enters or exits the trigger. Here's a simple example:
public class ReverbTrigger : MonoBehaviour
{
public AudioMixerSnapshot reverbSnapshot;
public AudioMixerSnapshot drySnapshot;
public float transitionTime = 0.5f;
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
reverbSnapshot.TransitionTo(transitionTime);
}
}
private void OnTriggerExit(Collider other)
{
if (other.CompareTag("Player"))
{
drySnapshot.TransitionTo(transitionTime);
}
}
}
Before applying the script, go to your Audio Mixer and create two snapshots:
One default ("dry") mix.
One snapshot that increases the send level of a specific group (e.g., footsteps) into a Reverb Send bus.
To set up the Reverb Send bus:
In the Audio Mixer, create a new group and name it something like "Reverb Send".
Add the built-in SFX Reverb effect to this group. (You can tweak the parameters of the reverb, they're pretty much the same as the ones in the Reverb Zone.)
In the group that handles footsteps (or any other target sound), add a Send effect.
In the Reverb Send group, add a Receive effect, but before the SFX Reverb effect. This is necessary so that the Reverb Send group can accept audio routed from the source.
In the Send effect on the source group (e.g. footsteps group), select the corresponding Receive target (your Reverb Send group).
In the dry snapshot, set the send level to -80 dB (effectively off). In the reverb snapshot, raise the send level to allow signal to pass through the reverb.
Now, you're ready to assign the reverbSnapshot
and drySnapshot
references in the Inspector on the Cube GameObject where you placed the script. You can also change the transitionTime
if you like. (This value defines how long it takes to smoothly blend between the current mixer state and the target snapshot.)
With this setup, you can apply reverb exactly where you want, in any shape you want. You're not limited to spheres, and the reverb doesn’t bleed into adjacent spaces.
Summary
Unity’s built-in Reverb Zones are easy to use but limited by their spherical shape. For more precise control, especially in rooms or hallways, use a trigger zone with mixer snapshots. It gives you the flexibility of working with any shape, and also control on the routing.
Subscribe to my newsletter
Read articles from Omer Faran directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
