After gathering all the relevant data from both the occlusion and obstruction systems, the next step is to interpret this data for use with FMOD parameters. The values used to modify occlusion and obstruction processing effects are calculated using various metrics obtained from the previously discussed ‘update’ functions.

To calculate the occlusion value, a ratio of the sum of line trace hits to the number of line traces cast is used, dependent on occlusion quality. This ratio, represented as a decimal percentage, is then returned to be applied to the appropriate middleware parameter. In the case of an active dynamic occlusion state, the occlusion value is set to 1 for a ‘blocked’ state and 0 for a ‘clear’ state.

Calculating an obstruction value requires obtaining more metrics to achieve a consistent and accurate approximation, primarily path length and the sum of diffracted angles (Shores, 2021). Similar to how the occlusion value is calculated, a decimal value is gathered from the path length and the user-defined maximum path length, which is then used in a weighted average with the sum of diffracted angles divided by the maximum diffraction value.

The following values are required to calculate this final obstruction value.

- Emitter to Listener Distance [A] = 100
- Path length [B] = 400
- Diffracted angles [Ci] = 45, 45, 90
- Max path length multiplier [D] = 5
- Max diffraction value [E] = 180
- Distance weight [F1] = 0.5 (F2 = Remainder)

This list of values and keys corresponds to the following equations, which summarize the previously discussed computations required to determine an overall obstruction value.

After completing these features, I ran into an issue where occlusion values were not represented accurately when obstruction was not being calculated. This issue was resolved by setting both the occlusion and obstruction values to the current occlusion value when the ‘Calculate Obstruction’ option was disabled. This solution was simple and functional, but however provides suboptimal audio results when used with an audio event configured to be used with both occlusion and obstruction.