Making use of non-audio information, audio systems like reverb can be created.
Original post: June 2015
This game I’ve beenworking on has a Dynamic Airflow System, allowing voids to pull objects and actors from the non-void interiors of a SpAcE sTaTiOn! This is being used to simulate open airlock / hull breaches on said space station, adding a particularly fun force to experience.
did not code these magical laser cubes, so I can’t tell you how to
make this part… BUT I am
able to hijack it for audio reasons!
volume generates cells within the space / meshed out room it resides.
decided to try taking this cell # info, and convert it to the sounds
for Accurate Reverb™!
Preparing the Events in FMOD
FMOD Studio, I created six Reverb Returns sorted by the size of the
I then laid out Sends to each one, enveloping as shown:
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.
also see a LowPass Effect sitting there. This is for distance based
occlusion, which I’ll make another post on soon.]]*
We can select and Copy over all these sends with included Envelope
changes AND the Parameter itself to other Events!
that I have these in all applicable events, time to get things
rolling in the Blueprints!
Getting the Cell count is easy.
Lucky grab: the variable is already there!
the AirVolume [the malleable box for placing saturated
air], 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
then Cast to theParent Actors that would have
FMOD events [This part could potentially become huge, file under
“Might Bite in the Butt”]:
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 to avoid obscene redundancy [If we
When the airvolumes are
overlapping, I combine their cell counts. this is for oddly shaped
in each of the Parent Actors that might have FMOD Events, I created
one Function, and two Int Variables.
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 ingeneral.
Here is the function:
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.
Sincethis is a child actor (or the parent itself), dragging off shouldlist the Apply Cells Function, and from the Int inputs, you can getthe Vars from the parent.
with this, We are done!
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.
a little test run around showing this in effect: