Version
menu_open
Wwise Unreal Integration Documentation
Reflect

In this tutorial, we will use Spatial Audio Geometry to send reflective surfaces to the Reflect plug-in. It will simulate the early reflection implied by the propagation of sound in an acoustic environment.

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

Wwise Project

  1. To have access to factory Acoustic Textures as well as a preset for the early reflection Auxiliary Bus, you need to import the Factory Acoustic Textures and the Reflect Factory Assets.
    1. Navigate to Project > Import Factory Assets...
    2. Choose both Reflect and Acoustic Textures and press OK.
  2. Create an early reflection Auxiliary Bus using the factory preset:
    1. In the Master-Mixer Hierarchy, right-click on the Master Audio Bus
    2. Navigate to New Child > Presets and select Early Reflection Auxiliary Bus

      1. In the Effects tab, double-click on the effect and
        1. set the Max Distance to at least 5,000, which is the maximum distance attenuation of the sound we set in Wwise Project Preparation
        2. set the Speed of Sound to 34,500
      Set Reflect Speed of Sound and Max Distance
  3. Navigate to the Sound SFX Sound Property Editor of the sound created in Wwise Project Preparation.

    1. In the General Settings tab, add the new Auxiliary Bus with the Reflect Effect under Early Reflections
    Enable Reflect on a Sound in Wwise
  4. Save the project.

Unreal Project

In the project, we want our building, the floor and the obstacle to reflect sounds. There are two ways to do that, with an AkSpatialAudioVolume or with the AkGeometryComponent.

The AkGeometryComponent can be added to static mesh actors. It will automatically send the static mesh geometry to spatial audio. It can also be configured to send the simple collision mesh. It is best to use this component for simple shapes. You don't want to send too many triangles to spatial audio, it can quickly become computationally expensive.

The AkSpatialAudioVolume is a brush volume. After adding an AkSpatialAudioVolume, you can either transform the volume manually to achieve the desired dimensions, or you can automatically snap the volume to a room using the Fit To Geometry feature.

A sufficiently complex static mesh with an AkGeometryComponent attached can sometimes result in geometry that is too complex. This is both in terms of computation time and because ray-based acoustic simulation techniques, such as those used in Wwise Spatial Audio, generally assume that geometric features (surfaces and edges) are significantly larger than the wavelength of the sound source. For reference, a 1000Hz sound in air has a wavelength of 34cm. Instead of using the static mesh directly, an AkSpatialAudioVolume can be used to create a simple shape around the mesh (when it serves as an obstacle to reflect and diffract sound), or within the mesh (when it serves as a Room, reverb zone, or surface reflector).

  1. In the SpatialAudioTutorialMap, the obstacle is a basic static mesh. We can easily add an AkGeometryComponent to it.
    1. Click on the actor and click on Add Component. Choose Ak Geometry.

      1. In the Geometry section, choose Simple Collision
      Default Values of the AkGeometryComponent with Simple Collision Mesh Type
  2. Repeat the same steps for the floor.
  3. In the SpatialAudioTutorialMap, the building is made out of a custom mesh. The shape is still basic enough to use an AkGeometryComponent, but for the sake of this tutorial, we will use AkSpatialAudioVolume.

    1. Drag and drop three AkSpatialAudioVolumes into the scene
      1. Set one around the building for the exterior walls. Since this volume is placed around the outside of the mesh, it must be transformed manually.
      2. Set the two others inside each room for the interior walls. 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.
      3. Make sure that Enable Surface Reflectors is enabled for all three AkSpatialAudioVolumes.
        1. Leave Enable Room and Enable Late Reverb unchecked. They will be discussed in Rooms and Portals.
    Spatial Audio Volume with Enable Surface Reflectors enabled

Verify your Setup

  1. Generate SoundBanks.
  2. Start the scene and connect to Wwise Authoring.
    1. In the Advanced Profiler's Voices Graph view, you should see a new auxiliary send with the Reflect Effect.
      1. At the initial position of the player, play the sound placed outside.
        Outside button Voices Graph with Reflect
        Note:
        If you play either of the sounds from the rooms while the player is outside, you will neither hear the sound nor see any reflect sends. That's because we created closed AkSpatialAudioVolumes around the building and each room. You can create openings in them by modifying the brush object, or by using Spatial Audio Portals, which will be covered in Rooms and Portals.
      2. Before going to the next step, open the Profiler Settings view and make sure Spatial Audio is enabled.
    2. Navigate to the Game Object Profiler layout (shortcut F12).
      1. Make sure you watch the player camera and the three emitters.
      2. In the Game Object 3D Viewer, you should see the different reflective surfaces.
      3. When playing a sound, early reflection rays will be drawn to show where the sound will be coming from.
        Game Object 3D Viewer with early reflections
      4. If you can't see rays, make sure Reflection Paths is enabled in the Game Object 3D Viewer Settings.
        Game Object 3D Viewer with early reflections
Note:
If you can't see any geometry in the Game Object 3D viewer, you may need to increase the Monitor Queue Pool Size. The setting is located in the Initialization settings.
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