Problem with Distance Attenuation in Steam Audio/FMOD/Unity

Hey guys,

i spent the last days trying to set up Steam Audio as an FMOD integration in Unity.
Building banks and Audio Spatialization seem to work. But changes to the distance attenuation in the Steam Audio effect in FMOD seem to have no or very limited / confusing effect.

If in the Steam Spatializer Effect in FMOD Studio I select any Distance Attenuation Curve, that is not the logarithmic curve (the one just above the “off” - button) then no matter what maximum distance I choose, in Unity the sound will always fade out at about 20 units distance between listener and source. Note that I am not overwriting this setting in the FMOD Studio Event Emitter. On the other hand, if I select the logarithmic curve, then the sound will be audible everywhere in my Unity Scene, no matter the distance between source and listener, and no matter which maximum distance i set.

As I said I can hear the spatialization of the audio in Unity and changing effects in the master track of my Event in FMOD for testing purposes also impacts the sound as expected. So banks are indeed getting built.

In Unity I have everything Set-Up correctly as far as I can tell, at least I get no errors. I didn´t find any information on which listeners and sources should be attached, so I played around attaching FMOD and/or Steam listeners/sources to the corresponding game Objects (listener is always camera , source is a test gameobject, i test by moving the camera/test object while in Playmode). If you have any Infos on which sources and listeners have to be attached (including built-in Unity Components), please share them with me - sorry if I am missing something here.

Any Info is much appreciated!

Thanks in Advance!

Unity 2021.3.11f1
FMOD 2.02.13
Steam 4.1.4

Hi,

It’s likely that the event’s distance macro control is overriding the Steam Audio Spatializer’s distance setting. You can see this event macro in the far right side of the audio track’s plugin deck, though based on your screenshot, you’ll need to expand it by clicking on the “Macros” column to the right of the Panner and Output meter.

If you set the distance macro to match the setting in the Steam Audio Spatializer, does that resolve your issue?

Hey,

thank you very much for your answer. I can´t test this issue at the moment but will when I get the chance.
I read up on macros in the manual now (https://www.fmod.com/docs/2.01/unity/user-guide.html) and I understand there is no option to deactivate the macros per se? Would that mean, that the values set in the distance attenuation of the Steam Audio effect are essentially meaningless? If so, I can´t seem to get the idea behind the concept entirely.

Sorry if I´m missing something.
Thanks again for your patience.

Best Regards!

I agree that it seems weird - from a brief investigation, I believe that this is an issue on Steam Audio’s end.

Essentially, the Steam Audio Spatializer plugin checks to see whether the event macro distance setting is set, and defaults to using it instead of the plugin’s setting. However, if FMOD Studio detects that a plugin in an event has a min/max distance setting, then it will create and set an event macro for min/max distance. As such, the event will never not have a min/max distance setting, which means the Steam Audio Spatializer will never use its own min/mix distance setting.

If you feel so inclined, I would recommend creating an issue regarding this on the Steam Audio GitHub page.

I think i will not be able to test this any time soon, since I am using DearVR for my current Project (I really hope you guys are going to cooperate in the future =) ).

But thanks for - most probably - finding the issue for me.
I am marking this as solved.

Best Regards!

1 Like

I’m having the same problem. Changing the macro distances or the Steam spatializer makes no difference. I have checked that the distance attestation is not being overridden in Unity.

Hi,

What exact versions of FMOD Studio, Steam Audio, and Unity are you using?

I’m on Unity 6000.0.23f1, Fmod 2.03.08, and Steam Audio 4.7.0.

I’m testing in an empty project, with Fmod and Steam Audio packages correctly installed. All the other features of Steam Audio seem to work (reflections, occlusion, transmission, even pathing (to an extent).
I have checked the min max settings with curve based or physics based options on the steam spatialiser in Fmod, the event macros, and the attenuation override in Unity. Nothing seems to affect the min/max distance attenuation.

EDIT: Here’s a link to a bare bones demo scene:

Thanks for your patience!

So, the behavior I’m observing is consistent with my previous comment i.e. that the event-level macro controls the min and max distance. The lack of attenuation you may be observing is likely a result of using the “inverse” attenuation curve, which doesn’t actually reach silence at max distance. This is especially apparent if you reduce difference between min and max distances when using that curve type.

I suspect that if you swap to any other curve, you’ll be able to more clearly hear the difference in attenuation that you’re expecting. You should be able to test this yourself via Live Update by changing the curve type and distances while your Unity project is playing in editor.