Version

menu_open
Wwise SDK 2022.1.12
Rooms and Portals Overview

Here is the outline of this page:

Summary of Sound Propagation Features

The table below summarizes the features of Spatial Audio Rooms and Portals by grouping them in terms of acoustic phenomena, describing what Spatial Audio does for each, and how sound designers can incorporate them in their project.

Acoustic PhenomenonSpatial AudioSound Design in Wwise
Diffraction of direct path
  • Calculates indirect sound paths that drive diffraction values
  • Modifies the game object position to simulate the perceived angle of incidence of the diffracted sound
  • Assigns diffraction values to volumes and filters via diffraction curves in the Attenuation ShareSet, project obstruction curves, or built-in RTPCs
Diffuse field (reverb)
  • Send to room's auxiliary bus
  • Constant power transitions
  • Reverb, bus volume and game-defined send offset on Actor-Mixer
Room coupling: reverb spatialization and diffraction of adjacent room's diffuse field
  • Calculates the propagation of the diffuse field through portals
  • Room object positioning and spread
  • Send to listener's room's auxiliary bus
  • Assigns diffraction values to volumes and filters via diffraction curves in the Attenuation ShareSet, project obstruction curves, or built-in RTPCs
  • Volume, filtering, or any property on Bus
  • 3D panning of busses, reverb, bus volume and game-defined send offset of Auxiliary Bus to other busses
Transmission
  • Drives transmission loss values according to the room and surfaces the sound path goes through
  • Assigns transmission loss values to volumes and filters via transmission curves in the Attenuation ShareSet, project occlusion curves, or built-in RTPCs

Modeling Sound Propagation from Other Rooms

With Spatial Audio Rooms and Portals, sound propagation in Rooms other than that of the listener is managed by the Rooms and Portals abstraction. An emitter in another Room reaches the listener via Portals, and their associated diffraction, and via transmission through rooms' "walls". Ensure that the Enable Diffraction and Transmission box is checked in the Positioning tab of each sound that need to be propagated.

Diffraction

For each emitter in adjacent Rooms, Spatial Audio computes a diffraction angle from the Shadow Boundary, from the closest edge of the connecting Portal. For more information, see Diffraction. This diffraction angle, which may go to up to 180 degrees, is then mapped to a coefficient between 0 and 100%, and given to the Wwise user for driving corresponding audio transformations, by one of two means. It can set the diffraction value on the emitter game object or set the value of the Diffraction built-in game parameter.

The diffraction value on the emitter game object is used to drive curves in the Authoring. By default, the project obstruction curves are used. They can be authored in the Project Settings' Obstruction/Occlusion tab and will impact Volume, LPF, and HPF to emulate volume and frequency-dependent behaviors. Project obstruction curves impact all the sounds in a project, which makes them less flexible. However, custom Diffraction curves can be created in an Attenuation ShareSet applied to the sound.

Alternatively, the Diffraction built-in parameter can be used. To do so, create a game parameter and set its Bind to Built-in Parameter drop-down menu to Diffraction. Values pushed to this game parameter are scoped by game object, so they are unique for each emitter. You may then use it with an RTPC to control any property of your Actor-Mixer. Output Bus Volume and LPF are privileged over the base Volume and LPF because they should apply to the direct signal path only, and not to the auxiliary send to the Room's reverb.

Warning: Compared to curves, using a built-in parameter requires more manipulations. Built-in game parameters also only apply on a single value for all positions of a game object. When multiple values are set, the smallest is taken. Recall that multiple game object positions are used when a Room has more than one Portal, so a built-in parameter is not recommended for this scenario.

The Rooms' diffuse energy is also included in the sound propagation model of Spatial Audio as the output of Rooms' Auxiliary Busses. Spatial Audio computes diffraction for this too ("wet diffraction"). Spatial Audio assumes that the diffuse energy leaks out of a Room perpendicular to its Portals. Thus, it computes a diffraction angle relative to the Portal's normal vector. This diffraction value can be used in Wwise exactly like with emitters' dry path. When using the built-in game parameter, it should be used with an RTPC on the room's auxiliary bus, typically on the bus's Output Bus Volume and Output Bus LPF. The bus's Output Bus Volume property should be favored over the Bus Volume property for the same reason as with Actor-Mixers: it should not affect the auxiliary send path that is used for coupling this reverb to the reverb of the listener's room.

Virtual Positioning and Diffraction Through Portals

When the Spatial Audio's initialization setting AkSpatialAudioInitSettings::bCalcEmitterVirtualPosition is set, the position of the emitters located in Rooms that are adjacent to the listener is modified such that they seem to appear from the diffracted angle, if applicable. In the screenshot of the 3D Game Object Profiler, below, the listener (Listener L) is on the right of the Portal and the "real" emitter is on the lower left (Emitter E, without orientation vectors). Spatial Audio thus repositions the emitter to the upper left, so that the apparent position seems to come from the corner, all while respecting the traveled distance. The listener is about 45 degrees into the shadow zone of the Portal edge, resulting in a diffraction factor of 27%, as written at the junction between the two line segments.

When there are multiple Portals connecting two Room, Spatial Audio may assign multiple positions to an emitter (one per Portal). The MultiPosition_MultiDirection mode is used, so that enabling or disabling a Portal does not affect the perceived volume of other Portals.

Transmission

Sound transmission between rooms is modeled separately for the wet path and for the dry path. Here, the dry path is referred to as Source Transmission and the wet path as Room Transmission

In a manner similar to diffraction, the resulting transmission loss value can be auralized using either of two methods, via the curves or via the Transmission Loss built-in parameter.

By default, the project occlusion curves are used for transmission. They can be authored in the Project Settings' Obstruction/Occlusion tab and will impact Volume, LPF, and HPF to emulate volume and frequency-dependent behaviors. Project occlusion curves impact all the sounds in a project, which makes them less flexible. However, custom Transmission curves can be created in an Attenuation ShareSet applied to the sound.

Note: Using curves to simulate transmission loss is preferred over an RTPC, because it provides greater accuracy when modeling both transmission and diffraction. This is due to the fact that RTPCs can not be applied to individual sound paths, therefore any parameter mapped to a transmission loss RTPC will also affect any potential diffraction paths originating from an emitter.

Source Transmission

When an emitter is in a different room than the listener, and has no direct line of sight through a portal, Spatial Audio models sound transmission through walls by applying a transmission loss factor to the game object. Transmission loss between rooms is calculated from the Room settings' AkRoomParams::TransmissionLoss parameter, by taking the maximum value between the listener's Room and the emitter's Room. If a sound emitter is blocked by one or more geometric surfaces, then the transmission loss factor of the geometry (as defined by AkAcousticSurface::transmissionLoss) is applied. In the case that there is more than one surface between the emitter and listener, then the maximum transmission loss factor is taken. Likewise, if a sound is both blocked by geometry, and is in a different room from the listener, it is the maximum value of all transmission loss contributors that is applied.

Room Transmission

In addition to sound transmission of individual emitters within a room, Spatial Audio models sound transmission of the room itself. This includes the contribution of the diffuse reverb field, as well as any room tones that may be playing inside a room, transmitting through walls.

As is the case with source transmission, the room's transmission loss is calculated as the greater of the transmission loss factors when comparing the source room and the listener's room. Authoring room transmission for room tones uses the sound's Transmission Loss curves on its Attenuation ShareSet, the Occlusion curves in the Wwise Project Settings in the case that there is no Attenuation ShareSet, or the Transmission Loss built-in parameter. Authoring room transmission for the diffuse reverb field instead uses the Transmission Loss curves on the room's auxiliary bus Attenuation ShareSet, the Occlusion curve in the Wwise Project Settings in the case that there is no Attenuation ShareSet, or the Transmission Loss built-in parameter.

We recommend using the Project Settings' Occlusion curves to author the room's diffuse reverb field. This is because we don't recommend adding an Attenuation ShareSet on the room auxiliary bus. Sounds can author the auxiliary send volume attenuation in their own Attenuation ShareSets using the distance-driven Auxiliary Send volumes curve. If there is an Attenuation ShareSet on the room's Auxiliary Bus, its distance-driven volume curve will be applied on the sound in addition to the sound's Auxiliary Send volumes curve. If you cannot use the Project Settings' Occlusion curves and must have custom Transmission Loss curves, make sure to have a flat curve as the distance-driven volume curve of the added Attenuation ShareSet on the room's Auxiliary Bus.

Note: To enable room transmission, it is necessary to define a shape for the room so that the room has a source and an extent. The room shape is calculated from the bounding box surrounding the geometry associated with the room. To set up room transmission via the API, refer to Setting up Room Geometry.

Room Coupling

The diffuse energy of adjacent rooms penetrating into the listener's room through Portals can be seen as sources located at these Portals and, as such, they should also contribute to exciting the listener's room. In other words, they should send to the Auxiliary Bus of the listener's Room. As written earlier, you can do this by checking the Enable Game-Defined Sends check box on the adjacent Room's auxiliary bus. You may tweak the amount that is sent to other rooms' reverb with the Game-Defined Send Offset.

Multiple Room Traversal

Sound propagation also works across multiple rooms. The Room tree is searched within SpatialAudio when looking for propagation paths. Circular connections are avoided by stopping the search when Rooms have already been visited. The search depth may be limited by Spatial Audio's initialization setting AkSpatialAudioInitSettings::uMaxSoundPropagationDepth (default is 8).

Room Game Object Behavior

Spatial Audio registers one game object to Wwise per Room, under the hood.

Warning: This game object's position and aux send values should not be manipulated directly.

When the listener is in a Room, the Room's game object is moved such that it follows the listener. Thus, the distance between the Room and the Listener object is approximately 0. However, its orientation is maintained to that which is specified in the Room settings (AkRoomParams). See Setting Up a Room Auxiliary Bus in Wwise for a discussion on the orientation of 3D busses.

When the listener is outside of a Room, that Room's game object adopts the position(s) of its Portal(s). More precisely, it is placed in the back of the Portals, at the location of the projection of the listener to the Portals' tangent, clamped to the Portals' extent. This can be verified by looking at the Room's game object, as seen in the screenshot of the 3D Game Object Profiler, above, in section Virtual Positioning and Diffraction Through Portals.

For multiple Portals, a Room's game object is assigned multiple positions, in MultiPosition_MultiDirection mode, for the same reason as with emitters.

When transitioning inside a Portal, the "in-Room" and "Portal" behaviors are interpolated smoothly.

Room Tones

The Room Game Object's primary purpose is to spatialize reverb (the emitter's "wet path"), however it is possible to leverage the spatialization behavior of Rooms and Portals (described in Room Game Object Behavior) and post events directly on the Room Game Object to implement room tones. For setting up room tones in Wwise, refer to Setting Up a Room Tone in Wwise. For posting events refer to Posting Events on Room Game Objects.

Portal Spread and Aperture

The spread of a sound in Wwise determines the width of the sound field that is constructed when a 3D sound is panned onto an Audio Bus. For most sounds, spread is defined in Wwise by a curve in the attenuation settings of the sound. However, for sounds played on Room Game Objects (i.e. room tones) and for the reverb sent to a Room Auxiliary bus, it is not necessary to define such a curve, because Spatial Audio calculates the spread automatically.

Furthermore, if a sound has a spread curve defined in the attenuation settings in Wwise, and that sound traverses one or more portals, its final spread value is subject to the Aperture value of those portals. The Aperture value can be thought of as an upper-limit placed on the spread of a sound, and simulates the constriction of the sound field as the sound passes through the portal.

The spread of a sound emitter can be visualized in the Game Object 3D Viewer in Wwise, with the following settings:

  • Obstruction/Occlusion Data must be selected in the Profiler Settings dialog box prior to capturing data.
  • Show Spread Cones must be selected in the Game Object 3D Viewer Settings dialog box.

The Game Object Spread and portal Aperture values can also be viewed in the Obs/Occ tab of the Advanced Profiler.

Game Object Spread

Game objects may have a Spread value that is calculated by Spatial Audio if they are Radial Emitters.

For Room Game Objects, the Spread value is the same as the Aperture value, and it is calculated by approximating the solid angle that each portal subtends on the listener. Note that a Room Game Object has a unique spread value per portal (recall each portal is rendered as a unique sound position).

Portal Aperture

The Aperture value for a Game Object is calculated on a per-path basis, and is the result of the minimum spread value for all portals traversed in a particular sound path. In the case of Room Game Objects, Spread and Aperture take on the same value.

Spread Calculation Summary

For a given sound position and listener pair, the final spread value is calculated as follows:

  • The sound's spread curve is evaluated at the distance between the sound position and the listener.
  • If no spread curve exists, the spread value is determined by the game object's radius (see AK::SpatialAudio::SetGameObjectRadius). If no radius is given, and no spread curve is defined, the spread is take as 0%.
  • The sound's Aperture value is calculated from all portals in the sound position's path. Multiple portals' Apertures are combined by taking the minimum value.
  • The sound's spread (originating from the spread curve or the Game Object's Spread) and Aperture are combined by taking the lesser of the two. This is the final spread value passed to the panner in the Sound Engine.

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise