FMODAudioComponent occlusion

Hi,

I’ve been trying to get Unreal 5’s FMODAudioComponent occlusion to work, but have come across a small problem. It seems that the line which detects whether or not something is occluded starts from the FMODAudioComponent’s owner’s location, and not from the component’s location. Even if I move the fmod component into clear view of the player on a specific instance of a blueprint, its Occlusion parameter will still be set to 1 if the line of sight to the root component of the blueprint is blocked by something, creating an unrealistic occlusion situation.

For example, if I have a large blueprint where only one part of it emits a sound, placing a volume between the listener and the sound-making part itself doesn’t change the occlusion parameter. Instead, placing it between the blueprint instance’s location and the listener does.

If this is intended behaviour, would you mind explaining why? A programmer has just looked at the code with me, and it seems that for measuring attenuation, the owner’s location is indeed used, so perhaps this is what is causing the problem. Hopefully we can change the code ourselves to use just the correct component’s location, but to me it seems like this should be the default behaviour.

Thanks!

This appears to be a bug, it should be using the position of the FMODAudioComponent instead of the owner’s location.

I have created a task to address this for an upcoming release, but in the meantime it does look to be just a small change required to address it.

1 Like

Thanks for the response - much appreciated.

Hey - any thoughts on this? I just came across this problem and was about to write a new post on it, before finding I’d already mentioned this earlier this year!

This is still causing problems for me because I am now also trying to place and constrain audio emitters on a spline which follows the player (like on a river). Unfortunately the sound’s occlusion is always calculated from the spline’s origin point, and so any blueprint which has an FMOD component which can either move, or which might need to be placed in a different position on an instance-by-instance basis will never have a correct occlusion calculation carried out.

This issue was fixed recently, in 2.02.23, which FMOD version are you using?

I’m on 2.03.01, and I recently debugged it with another coder on our team and the conclusion we came to was that it is still a problem. We used UE5’s Collision Debugger, and we saw that lines for the occlusion calculation were being drawn always from the player to the spline’s origin point and not to any other point along the spline.

Ok the fix went out in 2.02.23 & 2.03.02

* Unreal       - FMODAudioComponents Occlusion and Velocity is now based off the
                 component instead of the actor.

https://www.fmod.com/docs/2.03/api/welcome-revision-history.html

1 Like