Sound propagation for Riverside-like SoundFX

Yes, you are correct that the built-in 3D sound support is designed for spherical emitters only.

It’s probably easiest for you to perform your custom wall-of-sound attenuation in code and then feed that to the event via a parameter. You can setup that parameter to automate the event’s master volume appropriately.

For example, you could create a parameter called “WallDistance”, with a range from say 0 to 200 meters. Have this parameter automate the event’s master volume with a curve just like the regular inverse-square fall-off. In game, you calculate the distance from the listener to the nearest point on the wall and call Studio::EventInstance::setParameterValue(“WallDistance”, distance_to_listener).

As for direction, you can still rely on FMOD’s 3D Panner to take care of this. Call Studio::EventInstance::set3DAttributes and pass it the nearest point on the wall. Just make sure you turned off the built-in distance attenuation, since you will be doing that yourself via the “WallDistance” parameter.

2 Likes