Confusion about Occlusion

image

Hi, i am trying to get occlusion working using the fmod core api and im finding it a bit confusing. The image above is what ive tried, based off the little documentation I could find on it. I am trying to add the occlusion to act as the wall seperating the outside of a scene to inside. Can anyone point me towards what i might be missing? Thanks

That looks correct to me. Are you using the Core or Studio API? Geometry occlusion only works with the Core API- to use it with FMOD Studio you would need to poll System::getGeometryOcclusion and use the direct and reverb values to drive an FMOD Studio parameter controlling volume, filters etc to create an occluded sound.
System::getGeometryOcclusion can also be a good way to debug your geometry, if you place your geometry between your playing channel and listener and find that the direct and reverb are still 0.f then your geometry might not be where you think it is. In such cases, try matching the geometry of your world by using global vertex positions in your polygon instead of their local position, and leave transform, position and rotation as their default values.

I am using the Core API, and yeah I thought everything looked sound but couldnt ever get it working. I flew around the scene and didnt ever come across any audible occlusion, so surely it wasnt placed extremely far away from the world origin?. So now i am attempting to build the FMOD Geometry based off the vertices loaded in from an OBJ loader so the main model of the scene itself is occluded. I could not get this working either however, there was still just no audible occlusion.

If it helps, I have checked that the listener position is correct (on the camera). When I use getGeometryOcclusion both values are still 0 afterwards. Something I have noticed is that the FMOD::Geometry object always seems to be NULL, even right after running the createGeometry function, is this normal?

A NULL value for the Geometry object is certainly suspicious, is System::createGeometry returning FMOD_OK?
Can you please provide a code snippet of your CreateFmodGeometry method?

Yeah createGeometry returns FMOD_OK, my call to createGeometry is within a function in my audio engine, which in this instance is being called from within the OBJ loader (as a last ditch effort to try and get occlusion working with the geometry engine), here is my implementation


That all looks fine to me, and you are using a left-handed coordinate system in your game?
I think I am going to need a reproduction to assist any further with this, would it be possible for you to upload a reproduction to your FMOD Profile?

Okay no worries, by a reproduction do you mean my entire solution? or just a reproduction of this certain issue? I’m happy to do either or

Also yes the solution uses DirectX and is left handed

In this case just a reproduction of this issue would be good, but if you are short on time then the whole project is fine too.