It is possible for the game to use AK::SoundEngine::SetGameObjectAuxSendValues in conjunction with Spatial Audio rooms. This is achieved as follows:ĪK::SpatialAudio::SetPortal(MOCKPORTAL, mockPortal)
The key is that Spatial Audio needs to be told explicitly that the meadow and the forest are connected, and this is done by connecting them with a disabled portal. In this case it would be zero, or close to zero. You can create such a room by ensuring its transmission loss represents the occlusion at the interface. Therefore, it cannot rely on portals and portal diffraction to propagate sound. It could be implemented as a separate room, but it has no door. This space with no trees likely has reverberation characteristics that are different from deep inside the forest. Then, they need to call AK::SpatialAudio::SetPortalObstructionAndOcclusion for each of these portals in order to safely declare in-room obstruction with the listener.Ĭonsider a meadow surrounded by a forest. Therefore, games should also run their obstruction algorithms between the listener and the Portals of the Room in which it is. For this purpose, the game should call AK::SoundEngine::SetObjectObstructionAndOcclusion.įurthermore, Portals to adjacent rooms should be considered like sound emitters in the listener's Room. This can be properly modeled by affecting the dry/direct signal path only, and not the auxiliary send, which means that Obstruction is the proper mechanism. Since in-room obstruction between an emitter and the listener happens in the same room, by definition, we assume that the obstacle will not cover the listener or emitter integrally, and that the sound will reach the listener through its reflections in the room. This is beneficial because ray-casting is usually much more expensive than the algorithm used by Spatial Audio for computing propagation paths. With Spatial Audio Rooms and Portals though, you don't need to do this for all emitters, but only those that are in the same Room as the listener.
This section provides some tips on how to implement obstruction on the game side in conjunction with Rooms and Portals. Games typically employ ray-casting, with various degrees of sophistication, to carry out this task. The representation of geometry, methods, and the desired level of details for computing in-room obstruction is highly game-engine specific. If one does not wish to send geometry to Spatial Audio for the purpose of obstruction calculation, obstruction in the same room must be handled on the game side. Obstruction of sound emitted from the same room as that of the listener can be handled by using Geometric Diffraction (see Using the Geometry API for Simulating Diffraction and Transmission and Combining the Geometric APIs with Rooms and Portals) but it is not covered by Spatial Audio Rooms and Portals alone. Refer to Spatial Audio Concepts for a review of these acoustic concepts.
Refer to section Modeling Obstacles Within a Room for more detail on how to use same-room obstruction with Spatial Audio. Under no circumstances should the game call AK::SoundEngine::SetObjectObstructionAndOcclusion with a room ID as the game object parameters, as the results are undefined. You can also apply obstruction on the sound path between an emitter and a nearby portal, a listener and a nearby portal or a pair of consecutive portals with the help of AK::SpatialAudio::SetGameObjectToPortalObstruction and AK::SpatialAudio::SetPortalToPortalObstruction. For the occlusion of portal openings, the game may use the Spatial Audio API AK::SpatialAudio::SetPortalObstructionAndOcclusion. If you wish to implement your own solution for obstruction (for example, one driven by game-side raycasting), in conjunction with obstruction set from Spatial Audio, the game may use the sound engine API AK::SoundEngine::SetObjectObstructionAndOcclusion. Additionally, rooms will utilize Wwise Occlusion to model transmission of sound through walls. Rooms with at least one propagation path to the listener via open Portals will simulate diffraction using either Obstruction or the Diffraction built-in game parameter.
In the context of Wwise Spatial Audio, sound propagation from other rooms is entirely managed by the Rooms and Portals abstraction. Combining Rooms and Portals with Obstruction and Occlusion