This game i'm working on has a dynamic airflow system, allowing voids to pull objects and actors from the non-void air volumes. This is being used to simulate open airlock / hull breaches on a space station (Prepare to ragdoll out into the spess).
I did not create these volumes, so I can't tell you how to make this part... but I am able to hijack it for audio reasons! Each volume generates cells within the space / meshed out room it resides.
I decided to try taking this cell # info, and convert it to the sounds for Accurate Reverb™!
Preparing the Events in FMOD
In FMOD Studio, I created six Reverb Returns sorted by the size of the room.
I then laid out Sends to each one, enveloping as shown.
You'll see I put on a long Release for the AHDSR. For some reason without this, the one shots would cut the reverb too soon, killing the effect! I'm not sure if that counts as an FMOD Bug or what, but keep an eye out for that.
[[You'll also see a LowPass Effect sitting there. This is for distance based occlusion, which I'll make another post on soon.]]
Luckily We can select and Copy over all these sends with included Envelope changes AND the Parameter itself to other Events!
Now that I have these in all applicable events, time to get things rolling in the Blueprints!
Getting the Cell count is easy. the variable is already there!
From the AirVolume, I have it detect all things within it's boundaries. I scaled down the detection range a bit, so as to keep the applications within the right range (the box extends further than i'd like, so this fixes that).
From here I go into a small Function.
I then Cast to the parent Actors that would have FMOD events.
You'll want to use Parent Actors, because you can have some scripts that would be globally usable for all Children Actors under it. saving a lot of time, and avoiding copying things so damn much.
Now in each of the Parent Actors that might have FMOD Events, I created 1 Function, and two Ing Variables.
Now inside the Function, I created 4 Inputs:
FMOD Audio Component Reference, both normal and as an array,
Note: Cell and Travel Are also the Variables made for the parent actor in general.
Here is the function:
Now with this in place, I can now take this function on any child actors I need, and it'll work whether there's just 1, or 16 events. I have this next bit happening under the Tick Event in the blueprints. this way, if the actor is moving room to room its sounds will take the volume's different reverb sizes dynamically.
Since this is a child actor (or the parent itself), dragging off should list the Apply Cells Function, and from the Int inputs, you can get the Vars from the parent.
So with this, We are done!
This works pretty well as a general room size reverb system goes. I plan to figure out how to find the X,Y,Z ratios of the Air Cells to end up simulating a hallway effect.
Here's a little test run around showing this in effect.