Version

menu_open
Wwise Unreal Integration Documentation
Rooms and Portals

In a realistic acoustic environment, sounds coming from an enclosed space will transmit through the walls, and will also come out from openings, such as doors and windows. Spatial Audio will simulate this effect with a high-level geometry abstraction called Rooms and Portals.

Note:
The Preparation for the Spatial Audio Tutorials must be completed prior to starting this tutorial.

Wwise Project

  1. In the Wwise project, create new Auxiliary Busses for each of the rooms.
    1. Right-click where you want to add a child Auxiliary Bus
    2. Navigate to New Child > Presets and select Room Auxiliary Bus

      1. In the Effects tab, you can tweak the RoomVerb Effect.
  2. Save the project and generate SoundBanks.

Unreal Project

  1. In Unreal, drag and drop the new Auxiliary Busses from the Wwise Browser to the Content Browser.
  2. If not done already in another tutorial, drag and drop two AkSpatialAudioVolume objects for each room of the building. We will use Fit To Geometry to place the two rooms.
    1. Enable Fit To Geometry in the Details panel of each AkSpatialAudioVolume.
    2. If the initial shape that is found is not satisfactory, translate the AkSpatialAudioVolume to a new location using the transform gizmo. Notice that a yellow preview outline appears when translating the AkSpatialAudioVolume. When a satifactory shape is found, release the mouse button and the AkSpatialAudioVolume will snap into place.
    3. For more information on placing AkSpatialAudioVolumes using Fit To Geometry, refer to Fit to Geometry.
      1. Make sure that Enable Room and Enable Late Reverb are enabled for the two AkSpatialAudioVolume objects.
        1. If you didn't do the Reflect tutorial, leave Enable Surface Reflectors unchecked.
        2. In the Late Reverb Section, uncheck Auto Assign Aux Bus and drag and drop the newly imported Auxiliary Bus from the Content Browser to the Aux Bus parameter.
          Note:
          Auto Assign Aux Bus is discussed in Reverb Parameter Estimation
  3. Add two AkAcousticPortal objects

    1. Place them around the openings of the building.
      1. To facilitate placement of an AkAcousticPortal, enable the Fit To Geometry check box in the Details panel.
      2. When Fit To Geometry is enabled, the integration will attempt to find a logical placement for the portal using the surrounding geometry. A yellow preview outline will appear when dragging the AkAcousticPortal near an appropriate opening using the transform gizmo. When a satisfactory placement is found, release the mouse button and the AkAcousticPortal will snap to place.
      3. For more information on placing AkAcousticPortals using Fit To Geometry, refer to Fit to Geometry.
      4. After an AkAcousticPortal is placed inside each doorway, adjust the depth of each portal using the scale gizmo to achieve the desired crossfade distance. A deeper portal (along its local X-axis) will result in a longer crossfade distance when an AkComponent transitions through the portal. This is true for both reverb sends and spread transition.
    2. Select the portals and set their Initial State to Enabled in the Ak Portal Component section. In the Obstruction Occlusion section, set the Initial Occlusion and Obstruction Refresh Interval to 0.0.

Note:
An AkAcousticPortal must be oriented in a way that the rooms to which it connects are positioned on its local Y axis. When selecting a portal, a yellow ribbon appears around the portal to help visualize it. The yellow line represents the separation between the front and back areas. If the rooms overlap, the room with the highest priority is chosen. When working with rooms and portals in the level editor, be sure to set the viewport to Realtime so that the portal visualisations are updated correctly as you move portals.

Verify your Setup

  1. Start the scene and stay at the start location. When playing the events on the emitters inside the rooms, you should be able to hear them.
  2. Connect to Wwise Authoring and navigate to the Game Object Profiler layout (shortcut F12). In the Game Object 3D Viewer you will see:

    1. a visualization of the rooms in grey (if the AkSpatialAudioVolume doesn't have Surface Reflectors enabled).
    2. a visualization of the portals in green.
    3. sound propagation paths diffracting on the edge of the portal(s) with an associated diffraction value at each edge depending on the bending angle.
    4. sound propagation paths going through the walls of the room with an associated transmission loss value.
      Note:
      This transmission loss value can be set by changing the transmission loss parameter of the room in the AkRoomComponent component.
    5. spread cones for the diffracted and transmitted paths of the sound if it has a spread curve.

Note:
Diffraction and transmission loss attenuate the sound using the Diffraction and Transmission curves in the sound's Attenuation ShareSet. When these curves are set to Use Project Diffraction/Transmission, they use the curves in the Environmental Curves tab of the Project Settings in the Authoring application.

Portals and Reverb

Sound emitting through Portals can reverberate into the room the listener is currently in. These steps show how to configure it.

  1. In the Wwise project,
    1. Find the Auxiliary Bus used for the Room Reverb. The room where sound is emitted from that we want to feed to other room reverbs.

      1. In the General Settings of the Auxiliary Bus Property Editor, make sure use game-defined auxiliary sends is enabled.
  2. Generate SoundBanks, start the scene and connect to the Wwise Authoring.
  3. Play the sound in the room with enabled auxiliary sends and navigate to a communicating room.

    1. You should see that the wet part of the emitting sound will also feed the reverb of the room the listener is in.

Room Tones

Sometimes, rooms have a specific ambient sound like the buzzing sound of air conditionning. To recreate this, you can post an event on the Spatial Audio Room game object. When the listener will be in the room, the sound will be positionned at its location. When in a different room, the listener will hear the room tone from the connecting portals and through the walls.

  1. In the Wwise project,
    1. Create a new Sound SFX for the room tone.
      1. In the General Settings tab, enable Use game-defined aux sends if you want the sound to send to reverb.
      2. In the Positioning tab:
        1. Add an attenuation for distance attenuation, diffraction, and transmission curves.
        2. Enable Diffraction and Transmission
    2. Create a play event with the room tone by right-clicking on the Sound SFX, then selecting New Event > Play.
    3. Save the project and generate SoundBanks.
  2. In Unreal,
    1. Drag the Event created in the previous section from the Wwise Browser to the Content Browser.
    2. Add this event to the Ak Audio Event parameter, under the Ak Event section, of one of your rooms.

      1. Adjust the Aux Send Level to feed some of the sound to the reverb of the room.
      2. You can choose to check the Auto Post box to post the room tone event on BeginPlay, or you can call the same Blueprint functions usually used to post events on game objects.
    3. In the Spatial Audio Tutorial map, we used Blueprint functions in the Level Blueprint to activate and deactivate the room tone.

      1. While having the AkSpatialAudioVolume with a room tone selected in the World Outliner, right-click in the Level Blueprint to create a reference.
      2. Drag a connection from the reference and search for "Post Associated Ak Event".
      3. In the same way, search for the Stop function.
      4. Add a key press as an input node.
  3. Start the scene and connect to Wwise Authoring.
  4. Navigate to the room with a room tone and press the key to start the room tone. Verify that you can hear it.

    1. In the Advanced Profiler view, you should see the event being played.
    Advanced Profiler view when playing a room tone
    1. In the 3D Game Object Viewer, you can watch the room game object as you move the listener around.

      1. If the listener is in the room, the room will emit at the position of the listener. You will see the room game object follow the listener game object.
      2. If the listener is in a different room,
        1. a room game object will be placed at the portal indicating the position of the diffracted sound and a path will be drawn between it and the listener game object.
        2. a room game object will be placed at the limit of the room on the direct path indicating the position of the transmitted sound.
        3. spread cones will be drawn for both of these positions.
See also

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