This is a prototype in C# within Unity with FMOD.
To simulate occlusion, 9 raycasts detect obstacles between the audio emitter and the listener.
The NavMesh is used to smooth out the occlusion parameter, calculate diffraction angles, and model "portals" (or "gates").
First test, with 1 raycast for each audio source
Then I tried to add more raycasts, expecting better results
I started to work on simple occlusion models, then I took references from different games (Quantum break, Overwatch, Infrared) and audio programmers, such as Rhys Anthony.
The distance of the path is used as factor of the percentage of occlusion detected by all the raycasts.
Occlusion value range is set from 0 to 100
With 9 raycasts, we get 100/9 = 11.11% of occlusion per occluded ray.
We compare the path length to the max attenuation distance of the audio source. In this case, 25 meters. If the path is 10 meters long we get 10/25 = 0,4.
This is the factor we add to the basic occlusion value got by raycasting.
If all the rays are occluded, and the path length is 10, then the occlusion parameter is set to 40
The diffraction angles (dry, and wet) are calculated by using the closest valid corner found on the path between the emitter and the listener, on the listener side.
Instead of using geometrical volumes, as it is made in Wwise rooms and portals, here we use the corner position from the navmesh to instantiate a game object that will be our gate (the red sphere).
This game object handles a FMOD transceiver set to "Receive".
The audio source handles a transceiver set to "Send".
Depending on the diffraction dry parameter (range set from 0 to 180), a balance is made between the audio emitter's level and the gate's level, simulating diffraction. The diffraction wet parameter is driving reverb send.
This prototype can be done with Wwise too, but for personnal purpose and experimentations I used FMOD. Alternatives to the transceivers can be found through Wwise 3D busses or multipositioning feature.