top of page
Occlusion Tracing

FMOD comes with an occlusion solution built in. Unfortunately, through profiling we found it was not going to be performant enough for what we were doing and pretty limited to begin with.

My solution was a custom occlusion trace function I created in C++. This would be called whenever it was needed, and could also be called by methods that natively didn't support audio occlusion. (FMOD only allowed occlusion to be supported by the FMOD component) This also added debugging capabilities to see what objects were being occluded properly, and which were not.

The problem with the native functionality is that enabling occlusion forces the component to calculate a trace every single tick to determine if an object should be occluded or not. With our rewritten approach, it would only cast an occlusion check explicitly whenever we wanted it to. This way we could strike a balance between audio accuracy and performance since we could reduce the occlusion's tick rate.

In addition to the frequency of the occlusion, we were able to disable occlusion if the listener was outside of attenuation range of the occluded object. That way, it wouldn't be trying to perform calculations constantly when the player wouldn't be able to hear it anyways.

bottom of page