Complex ambience audio geometry


I’m building a level which has the following structure:

I want to create non-rectangular shape for audio collider to play ambience. I have room 1 ambience, which I also want to play in vent shaft, but muffled (which I can do with a snapshot).
But if I create 2 colliders in a reversed T-shape to cover both room 1 and vent, it starts playing ambience from the beginning. If I use one audio collider, it will cover room 1, vent and room 2, which has to have other ambience playing there.

Is there a certain workaround for that without using stuff like raycasting? I really want to wipe room 1 ambience when player is in room 2, so it does not use any resources.

There are a large number of different ways you could do this… But given that you’re already using snapshots, the simplest might be to create a snapshot that reduces the volume of your room 1 ambiance to -oo dB while the player is in room 2.

You probably don’t need to worry about room one’s ambiance consuming resources, as the FMOD Engine automatically “virtualizes” any event instance whose volume is reduced to -oo. Virtual event instances are excluded from the mix and their instruments are not processed, so they do not consume resources as they would if they were still “real.” When the events because audible again, FMOD will automatically make them real. (You can read more about virtualization in our white paper on the topic.)

I’m also researching custom shapes creation with ProBuilder tool.

Snapshot solution works fine, but the reason why I don’t want to use snapshot for this, is that it will require me to create 2 different mixer buses for basically same sound entities, and later on I’ll have to keep track of what goes where.