Version

menu_open
Attention : vous avez été redirigé vers la plus récente documentation correspondant à votre version générale ( 2023.1.8.8601 ). Si vous souhaitez accéder à la documentation de votre version précise, veuillez télécharger la documentation hors ligne depuis l'Audiokinetic Launcher et sélectionner l'option de documentation Offline dans l'application de création Wwise.
Wwise Unreal Integration Documentation
Reverb Parameter Estimation

When using an AkLateReverbComponent that is attached to a UPrimitiveComponent, you can tell the Wwise Unreal Integration to automatically assign the reverb Aux Bus based on the size and shape of the UPrimitiveComponent.

Similarly, the Wwise Unreal Integration can also use the UPrimitiveComponent to estimate specific reverb parameters and adjust them via the Driving Reverb RTPCs. This tutorial explains how to set up automatic Aux Bus assignment and reverb effect parameter estimation using the Global Reverb RTPCs.

Note:

Automatic Aux Bus Assignment

It is possible to automatically associate an Aux Bus with a Spatial Audio Room. You can set up a Reverb Assignment Table in the Integration Settings, which maps different Decay values to different Aux Buses.

The Decay value of a Room is the estimation of its T60 decay (see EstimateT60Decay), which is the time (in seconds) required for the sound reverberation in a physical environment to decay by 60 dB.

The following exercise demonstrates how to use the the Reverb Assignment Table to automatically determine which Aux Busses to use for each Room.

Reverb Assignment section the Integration Settings

Before you configure the Decay keys in the table, observe the estimated Decay values for the existing reverbs in the level.

  1. Open the SpatialAudioTutorialMap.
  2. In the World Outliner, select the Interior_SmallRoom AkSpatialAudioVolume. Selecting Auto Assign Aux Bus sets the Aux Bus to the Default Reverb Aux Bus specified in the Project Settings because the Reverb Assignment Table is not yet set up.
  3. In the Details panel for Interior_SmallRoom, enable Auto Assign Aux Bus.
  4. Repeat steps 2 and 3 for the Interior_LargeRoom AkSpatialAudioVolume.
Enable Auto Assign Aux Bus for Interior_SmallRoom and Interior_LargeRoom

Some text information is displayed above each AkSpatialAudioVolume in the viewport when they are selected. This information is also available in the Details panel under Reverb Parameter Estimation.

  1. In Unreal, click Edit > Project Settings, then scroll to the Wwise section and click Integration Settings.
  2. Expand the Reverb Assignment Map section.
    Reverb Assignment section the Integration Settings
  3. Open the Reverb Assignment Table asset.
  4. In the toolbar, click Add.
  5. Set the Decay value of the new row to 1.0 and set the Aux Bus to SmallRoom.
  6. Add another row with a Decay value of 2.0 and set the Aux Bus to LargeRoom.

Any Room with a Decay value between 0.0 and 1.0 sends to the SmallRoom Aux Bus and any Room with a Decay value between 1.0 and 2.0 sends to the LargeRoom Aux Bus. Decay values above 2.0 sends to the Default Reverb Aux Bus.

Going back to our level, we can see that the appropriate Aux Bus values have been assigned for Interior_SmallRoom and Interior_LargeRoom.

Global Reverb RTPCs

As well as automatically assigning the Aux Bus, it is possible to automatically set certain parameters of a reverb effect in Wwise via the Global Reverb RTPCs. Three parameters can be set in this way: Decay, Predelay, and HFDamping. You can set which RTPCs control these parameters in the Integration Settings.

The HFDamping, or high frequency damping, value is an estimation of how much high frequencies are dampened compared to low frequencies. See EstimateHFDamping for more information.

The PreDelay value is an estimation of the time in milliseconds for the first reflection to reach the listener, assuming both listener and emitter are in the center of the environment. See EstimateTimeToFirstReflection.

Setting Up RTPCs

In order to use the Global Reverb RTPCs we need to add three RTPCs in our Wwise project.

  1. Open the Wwise project.
  2. Click Layouts > Designer.
  3. In the Project Explorer, click the Game Syncs tab.
  4. Add three new Game Parameters called Decay, PreDelay and HFDamping.
  5. Set the Min, Max, and Default values of the three new Game Parameters as follows:
    • Decay:
      • Min: 0
      • Max: 10
      • Default: 0
    • PreDelay:
      • Min: 0
      • Max: 1000
      • Default: 0
    • HFDamping:
      • Min: -1
      • Max: 1
      • Default: 0
  6. In the Project Explorer, open the Audio tab.
  7. Under the Master-Mixer Hierarchy, double-click SmallRoom. The SmallRoom Aux Bus Object Tab opens.
  8. On the Effects tab, at the right of the RoomVerb Effect row, click Edit.
  9. In the Effect Editor, open the RTPC tab.
  10. Add Reverb entries for Decay Time, Pre Delay and HF Damping.
  11. In the X Axis column, add Game Parameters for each entry as follows:
    • Decay Time: Decay
    • Pre delay: PreDelay
    • HF Damping: HFDamping
  12. Select the Decay mapping and add a point on the curve.
  13. Set both the X and Y values of the point to 0.2.
  14. Select the HFDamping mapping and add a point on the curve.
  15. Set the X value to 0.0 and the Y value to 1.0.
  16. Select all of the mappings in the list.
  17. Right-click one of the mappings and select Copy.
  18. Open the LargeRoom Aux Bus in the Property Editor.
  19. On the Effects tab, at the right of the RoomVerb Effect row, click Edit.
  20. In the Effect Editor, open the RTPC tab.
  21. Right-click in the empty RTPCs list and select Paste. Three RTPCs now control reverb parameters in our Wwise project. In the Unreal project, these RTPCs function as the Global Reverb RTPCs.
  22. In Unreal, open the Wwise Integration Settings.
  23. Under Reverb Assignment, expand the RTPCs subsection.
  24. Assign each new RTPC to the corresponding Global Reverb RTPC
    The Three New RTPCs Assigned to the Global Reverb RTPCs

You can now remote connect to Wwise and Play In Editor. If you observe the RTPC curves in Wwise while triggering the sounds in the small room and the large room, you can see how the reverb parameters change.

Using One Reverb Aux Bus for Different Room Types

With Global Reverb RTPCs, you can use one reverb effect for an entire level and drive the parameters dynamically for the different rooms in the level.

  1. In the Wwise project, create a new Aux Bus called DynamicReverb.
  2. Add a RoomVerb Effect to this Aux Bus, using the Default Effect preset.
    Add a New Aux Bus Called DynamicReverb with a Wwise RoomVerb Effect
  3. Copy and paste the RTPC mappings from the SmallRoom Aux Bus reverb effect to the DynamicReverb Aux Bus reverb effect.
  4. In the Unreal project, clear all entries in the Reverb Assignment Table (described in Automatic Aux Bus Assignment).
  5. Set the Default Reverb Aux Bus to the new DynamicReverb Aux Bus.

Now, if you remote connect and Play In Editor, both the Interior_SmallRoom and Interior_LargeRoom use the DynamicReverb Aux Bus, but the parameters are automatically adjusted for each room through the Global Reverb RTPCs.

Using Reverb Estimation with a Custom Blueprint Class

The following procedure demonstrates the single Aux Bus workflow through the use of a custom Blueprint Class that represents a single room. For demonstration purposes, the room is a simple cube with walls that the player can walk through. In this exercise, you will create a double-sided material (so that you can see the interior of the room) and then create the Blueprint Class.

  1. In the Content Browser, browse to the WwiseAssets/SpatialAudioDemo folder.
  2. Right-click the SpatialAudioDemoMeshMaterial and select Duplicate.
  3. Name the new Material Instance "SpatialAudioDoubleSidedMaterial".
  4. Open the new Material Instance.
  5. In the Details panel under Material, select Two Sided.
  6. Save the Material Instance.
  7. In the Content Browser, browse to the Blueprints folder.
  8. Right-click in the folder and select Blueprint Class.
  9. Choose Actor as the Parent Class.
  10. Name the new Blueprint "BPRoom".
  11. Open the new BPRoom Blueprint Class.
  12. On the Components panel, click Add and select the Cube component.
  13. Select the new Cube component and in the Details panel, under Materials, set Element 0 to SpatialAudioDoubleSidedMaterial.
  14. In the Components panel, select the Cube Component and add a Box Collision Component under it.
  15. Select the Box Collision Component and add the following Components under it:
    • Ak Room
    • Ak Late Reverb
    • Ak Geometry Ensure that the Component hierarchy in your Blueprint Class looks like this:
  16. Select the AkGeometry Component.
  17. In the Details panel, under Geometry, ensure that the Mesh Type is set to Simple Collision.
  18. In the Surface Overrides section, set the AkAcousticTexture to Concrete.
  19. In the Components panel, select the Cube Component.
  20. Add a Point Light Component, which illuminates the room when the player walks inside it.
  21. Select the Cube Component.
  22. In the Details panel under Collision, set the Collision Presets to NoCollision.
  23. Select the Box Component.
  24. In the Details panel under Collision, set the Collision Presets to NoCollision. The player can now walk through the walls of the room.
  25. Compile and Save the Blueprint.

Before you can test the new room Blueprint, add a sound to play when you change between the rooms.

  1. Open the MyCharacter Blueprint from the Blueprints folder in the Content Browser.
  2. In the Components panel, select the Capsule Component.
  3. Add an Ak Component and name it "SpatialSound".
    Add an Ak Component to the MyCharacter Blueprint
  4. Select the SpatialSound Component.
  5. In the Details panel, set the Ak Audio Event to Play_SpatialSound.
  6. Open the Event Graph for the MyCharacter Blueprint.
  7. Locate the Event BeginPlay node in the lower right of the Event Graph.
  8. Drag from the last Set Switch node and select Post Associated Ak Event (SpatialSound).

You can now place some rooms in your level.

  1. Drag several instances of the BPRoom Blueprint into the level.
  2. Size the rooms differently.
  3. Change the Acoustic Texture on the AkGeometry Component in each of the rooms:
    1. Select a room in the level.
    2. In the Details panel, select the AkGeometry Component.
    3. Change the AkAcousticTexture to a different value such as Brick, Carpet, or something else. Do this for all BPRoom instances in the level.

You can now remote connect to Wwise and Play In Editor. The spatial sound is triggered immediately. As you walk into the different rooms, the appropriate reverb parameters are applied to the sound.

HFDamping Calculation and Acoustic Textures

When estimating the HFDamping value, the AkLateReverbComponent uses the AkGeometryComponent to identify its Acoustic Textures. In the previous section, an AkLateReverbComponent and an AkGeometryComponent were attached to the same UPrimitiveComponent parent (the Box Component). With this configuration, when the AkLateReverbComponent has a sibling AkGeometryComponent, it automatically uses that sibling AkGeometryComponent to calculate the HFDamping. However, if the AkGeometryComponent has a different parent, you must explicitly associate the AkGeometryComponent with the AkLateReverbComponent through the AssociateAkTextureSetComponent function. This section demonstrates how to do so.

  1. Open the BPRoom Blueprint.
  2. In the Components panel, drag the AkGeometry Component on top of the Cube Component. The AkGeometry Component is now attached to the Cube Component instead of the Box Component.
  3. Select the AkGeometry Component.
  4. In the Details panel, under Geometry, set the Mesh Type to Static Mesh.
  5. In the Surface Overrides section, set the AkAcousticTexture to Concrete.
  6. Open the Event Graph for the Blueprint.
  7. Drag a node from the execution pin of the Even BeginPlay node and select Associate Ak Texture Set Component (AkLateReverb).
  8. Drag the AkGeometry Component from the Components panel and release it on top of the Texture Set Component pin.

You can now remote connect to Wwise and Play In Editor to test whether the HFDamping value is updated correctly. With this configuration, you can have a Static Mesh with multiple materials, and an attached AkGeometryComponent that maps those materials to Acoustic Textures. You can then associate this AkGeometryComponent with an AkLateReverbComponent to make the textures drive the HFDamping value.


Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise