Version

menu_open

Wwise Reflect

(See the Wwise Reflect Properties below.)

The Wwise Reflect plug-in Effect implements a multi-tap time-varying delay line with filters, for the purpose of simulating spatialized early reflections.

When considering geometrical modeling of acoustics, spatialized early reflections are typically calculated using the "image source technique". With this approach, early reflections can be represented by an image source, as if the geometry from which sound reflects were like a mirror. This is illustrated in the figure below.

In this figure, an emitter E and a listener L exist in the same geometry (room), depicted by the enclosing box (black solid line). The reflection paths from the emitter to the listener are drawn in green (solid line). The image source technique consists of generating an "image" of the emitter for each surface. The image source is placed at the same distance behind the surface, on the line that is normal to the surface and connecting the emitter. The total distance traveled by the sound corresponds to the distance between the image source and the listener. Note that image source placement strictly depends on emitter position and geometry, and not on the listener's position.

The game pushes a list of image sources to a given plug-in instance. For each image source, a tap is added to the delay line, is further filtered, panned, and scaled according to its relative 3D position, distance-based curves, and associated Acoustic Textures.

Wwise Reflect is typically used on an Auxiliary Bus representing early reflections. It will correctly simulate early reflections if the bus is associated with the game object that emits the sounds sent to this bus.

Setting up Wwise Reflect in a Wwise project

  • Add an Auxiliary Bus for early reflections.

    • In the General Settings tab of the Auxiliary Bus Property Editor, change the channel configuration to 1.0 (Mono). While Reflect is capable of working with multichannel input sounds, the first thing it does is to downmix them to mono. It is therefore more efficient to set the bus to mono, as it spares Wwise the trouble of uselessly computing spatialization of the voice into this Auxiliary Bus.

      [Note] Note

      Making the bus mono does not affect Reflect's output (it does not make it mono). Its output configuration, onto which early reflections are spatialized, is set within Reflect's Effect Settings.

    • In the Effects tab, add an instance of Wwise Reflect

    • In the Positioning tab, check the Listener Relative Routing option, but keep 3D Spatialization to None. Otherwise, Wwise will further transform (pan and attenuate) the image sources generated and spatialized by Wwise Reflect.

      [Note] Note

      No attenuation should be put on this bus, you will be able to customize attenuation from the Reflect Effect Editor.

  • Inspect sounds that will be reflected.

    • In the General Settings tab of the Sound Property Editor, check the Use game-defined auxiliary sends option.

    • Typically the sound is spatialized in 3D and uses an attenuation. In the Positioning tab of the Sound Property Editor, check the Listener Relative Routing option and set 3D Spatialization to Position + Orientation. Add an attenuation in the Attenuation group box.

  • Configure the effect in the Reflect Effect Editor.

    • Set the output channel to the desired configuration by modifying the Output Config property. Parent Bus represents the output channel configuration of the parent bus of the Auxiliary Bus.

    • Make sure the Max Distance number is large enough to see your image sources.

  • Generate soundbanks.

  • Ensure you have a license of Reflect.

Setting up Wwise Reflect with Spatial Audio

After Setting up Wwise Reflect in a Wwise project, you need to set it up on the game side. You can do so by using the Spatial Audio API.

  • Ensure Reflect is registered by including AK/Plugin/AkReflectFXFactory.h.

  • Include the Spatial Audio header file: AK/SpatialAudio/Common/AkSpatialAudio.h.

  • Register the listener and emitter.

    // Register the listener.
    static const AkGameObjectID LISTENER_ID = 10000;
    AK::SoundEngine::RegisterGameObj( LISTENER_ID, "Listener" );
    AK::SpatialAudio::RegisterListener( LISTENER_ID );
    
    // Register the emitter.
    static const AkGameObjectID LISTENER_ID = 100;
    AK::SoundEngine::RegisterGameObj( EMITTER_ID, "Emitter" );
    
    AkEmitterSettings emitterSettings = AkEmitterSettings();
    // ER is the name of the Auxiliary Bus with a Reflect effect.
    emitterSettings.reflectAuxBusID = AK::SoundEngine::GetIDFromString( "ER" );
    // This represent the maximum distance between the listener and the emitter for the listener to receive reflections from the emitter.
    emitterSettings.reflectionMaxPathLength = 500.f;
    
    AK::SpatialAudio::RegisterEmitter( EMITTER_ID, emitterSettings );
    
    // Associate the emitter with the listener
    static const AkGameObjectID aLstnrsForEmitter = LISTENER_ID;
    AK::SoundEngine::SetListeners( EMITTER_ID, &aLstnrsForEmitter, 1 );
  • Define and set the geometry that will make up the Reflect geometry surfaces.

    Create an AkGeometryParams and fill it with the triangles, vertices and surfaces of your geometry.

    static const AkGeometrySetID GEOMETRY_ID = 200;
    AkGeometryParams geometryParam;
    
    // Fill triangles, vertices and surfaces into geometryParam.
    // See an example in the Integration Demo.
    // ...
    
    AK::SpatialAudio::SetGeometry( GEOMETRY_ID, geometryParams );
  • Update the position of the emitter as it moves. (Replace the call from SoundEngine::SetPosition to SpatialAudio::SetPosition)

    AK::SpatialAudio::SetPosition( EMITTER_ID, soundPos );

Setting up Wwise Reflect without Spatial Audio

After Setting up Wwise Reflect in a Wwise project, you need to set it up on the game side.

  • Ensure Reflect is registered by including AK/Plugin/AkReflectFXFactory.h.

  • Include the Reflect header file: AK/Plugin/AkReflectGameData.h.

  • You may also need to add AkReflectFX.lib to your executable's input libraries.

  • Use the Reflect API to create image sources and place them where you want sound to be reflected from.

    // Create an AkReflectGameData object.
    AkReflectGameData * reflectGameData = nullptr;
    reflectGameData = (AkReflectGameData *)_alloca(AkReflectGameData::GetSize(1));
    // Fill in the data.
    reflectGameData->listenerID = LISTENER_ID;
    reflectGameData->uNumImageSources = 1;
    reflectGameData->arSources[0].uID = 123;
    reflectGameData->arSources[0].params.sourcePosition = { 200, 0, 0 };
    // The following represents a distance factor between the listener and the image source.
    // If the source position corresponds to the reflective surface, the number should be two.
    reflectGameData->arSources[0].params.fDistanceScalingFactor = 1.f;
    reflectGameData->arSources[0].params.fLevel = 1.f;
    // Associate the image source with Acoustic Textures here if needed.
    reflectGameData->arSources[0].texture.uNumTexture = 0;
    reflectGameData->arSources[0].name.SetName("Img src 1");
    
    // Send to Reflect.
    AK::SoundEngine::SendPluginCustomGameData(AK::SoundEngine::GetIDFromString("ER"), EMITTER_ID, AkPluginTypeEffect, AKCOMPANYID_AUDIOKINETIC, 171, reflectGameData, AkReflectGameData::GetSize(1));
  • Send a new AkReflectGameData when you need to update the position of the image sources.

Acoustic Textures

With each image source, you may pass up to 4 Acoustic Textures. Acoustic Textures, defined in the Acoustic Texture Editor, represent material properties. During execution of the plug-in, the four absorption bands (Low, Mid Low, Mid High, and High) of each texture translate into four frequency band attenuations.

When more than one Acoustic Texture is applied, band absorption coefficients are combined, as if the signal was successively filtered. This effectively simulates reflections resulting from hitting multiple surfaces.

Default Wwise Reflect Mapping of Frequency Absorption Bands

  • Low: < 250 Hz

  • Mid Low: > 250 Hz and < 1,000 Hz

  • Mid High: > 1,000 Hz and < 4,000 Hz

  • High: > 4,000 Hz

[Tip] It is Possible to Change Reflect's Default Frequency Absorption Band Values

The default Reflect values for frequency absorption can be changed, but this should only be needed in very particular scenarios. To do so, directly edit the %Wwise%\Authoring\x64\Release\bin\plugins\AkReflect.xml file by changing the Default Value for the BaseTextureFrequency. This defines the new default Low band; the other bands successively increase by two octaves.

Using Wwise Reflect to simulate reflections for 3rd person sounds

In order to use Wwise Reflect for 3rd-person sounds, it needs to run on an instance of the bus that is associated with this emitter. See 3D Busses and AK::SoundEngine::SetGameObjectAuxSendValues() for more details. You may use the services of AK::SpatialAudio to help set up bus instances accordingly.

Tweaking Wwise Reflect settings

Reflect comes with a simple set of parameters that you may use to tweak the resulting reflections.

Reflections are panned, filtered, and delayed versions of the downmixed input signal. The delay time is influenced by the game-driven image source's distance and Reflect's Speed of Sound. Filtering and volume scaling depend on the image source's distance and diffraction coefficient evaluated against its various curves. Filtering is also affected by the image source's Acoustic Texture(s).

[Tip] Tip

Distance attenuation curves simulate air absorption and energy decay.

Working with Diffraction

Image sources may also be given a diffraction coefficient. It will normally be zero if the reflection is specular, but will be non-zero when they need to bend around the edge of their reflecting surface in order to reach the listener. Such a reflection would typically be lower in amplitude and filtered. Wwise Reflect exposes curves that let you tweak these parameters against the diffraction coefficient. See Spatial Audio Concepts - Diffraction and Geometric Diffraction of Early Reflections for more details on diffraction, how it interacts with early reflections, and how this can be simulated by AK::SpatialAudio. Note that Geometric Diffraction in AK::SpatialAudio is currently an experimental feature.

Wwise Reflect Properties

Interface Element

Description

Inclusion

Determines whether the element is included or excluded. When selected, the element is included. When unselected, the element is not included. By default, this applies across all platforms. Use the Link indicator (to the left of the check box) to determine or to set platform-specific customizations.

When this option is unselected, the property and behavior options in the Property Editor become unavailable.

Default value: true

Name

The name of the Effect instance.

Effect instances are a group of effect property settings. They can be one of two types: custom instances or ShareSets. Custom instances can be used by only one object, whereas ShareSets can be shared across several objects.

Effect

The type of effect.

Shared by (Used by)

A list of objects that currently subscribe to the selected ShareSet.

This field is called “Used by” when editing a custom instance of the Effect.

Opens a search field where standard alphanumeric entries filter out unmatching elements from the view. Learn more in Using Tables.

Click the Close icon to the left of the search icon to close the search field and remove the filter.

[Note] Note

The searches do not include elements in collapsed nodes of the List View, Query Editor, MIDI Keymap Editor, and Reference View.

Returns the Effect property settings to their default values.

This option is only available when editing a custom instance of the Effect.

Notes

Additional information about the Effect.

General

Speed Of Sound

Units per second. The units correspond to the distance units used by the game and sent to Reflect. The speed of sound in air is ~340 m/s. If your game’s units are centimeters, you should use a value of about 34,000(cm)/s.

Default value: 345
Range: 0.001 to 2147483648

Distance Smoothing

A smoothing filter applied to the reflection ray distance sent to the delay line. More smoothing will cause reflection times to update more slowly, but limit the Doppler pitch shift caused by movement. Normalized value between 0 and 1.

Smoothing Type

Defines the shape of the smoothing filter response over time. The curve icons for IIR and FIR indicate how the filter will shape sudden changes in ray distance.

Threshold Mode

Continous mode allows for a maximum tolerable Doppler pitch shift caused by movement. If movement is fast enough to exceed the threshold, the volume of the reflection will be ducked until the pitch returns to below the threshold. A threshold of 0 will cause the volume of the reflection to be ducked any time movement occurs.

Step mode allows for a distance threshold 'bubble', where reflections are not updated until a minimum amount of displacement occurs. A threshold of 0 will cause Reflect to crossfade between the old and new reflections whenever movement occurs. Crossfading will result in time stretching effects that do not modify pitch.

Pitch Threshold

When in continuous threshold mode, sets the maximum allowable Doppler pitch shift (in cents) before ducking reflection volume. When set to 0, reflections' volume are ducked with movement.

Distance Threshold

When in step threshold mode, sets the minimum change in ray distance (in game units) needed to update the reflection delay time. When set to 0, reflections are crossfaded with movement.

Center %

Center % used for 3D positioning. Refer to the Positioning Tab: Audio and Auxiliary Busses for more details on how Wwise handles Center% with 3D positioning.

Default value: 100
Range: 0 to 100

Output Level

The volume level (dB) of the wet signal .

Default value: 0
Range: -96 to 24

Monitoring List

Filter

Type anything that matches, in whole or in part, a game object's Name or ID content. Both the Monitoring List table and the curves cursors in the graph view will only display the matching image sources.

Clears the Filter field and thereby displays all image sources on which Wwise Reflect applies in the columns below and the associated graph curves.

Controls the Mute and Solo states for the image source and shows its implicit mute and solo states.

Muting an image source silences it for the current monitoring session. Soloing an image source silences all the other image sources in the current instance of Wwise Reflect.

A bold M or S indicates that the Mute or Solo state has been explicitly set for the image source. A non-bold M or S with faded color indicates that the image source's Mute or Solo state was implicitly set from another image source state.

[Note] Note

Mute and Solo are designed to be used for monitoring purposes only and are not persisted in the project or stored in the SoundBanks.

Image Source ID

An identification number associated with the image source. This is a unique number assigned by the game.

Image Source Name

The name of the image source.

Game Object ID

An identification number associated with the game object. This is a unique number assigned by the game.

Game Object Name

The name of the game object.

Textures

The name (or ID, if name not found) of the Acoustic Texture(s) on which the sound is reflected.

[Note] Note

More than one texture will be listed for second reflections.

Distance

The distance in game units between the image source and the listener.

Smoothed Distance

The current value of distance after the smoothing filter is applied.

Current Pitch

When in continuous threshold mode, the current Doppler pitch shift (in cents) caused by changing reflection distance.

Displacement

When in step threshold mode, the accumulated displacement away from the current reflection length that has yet to be applied. Resets to 0 when the distance threshold is exceeded.

(Image Source Graph View)

A graphical representation of the relationship between the Distance (X axis) and an image source property value (Y axis).

The graph view can display several curves simultaneously.

Cursor Name Category

A list to specify the parameter flag to display (or not) in the graph view:

  • No Flag
  • Image Source ID
  • Image Source Name
  • Game Object ID
  • Game Object Name
  • Texture(s)

Default value: No Flag

X

The coordinate along the X axis of the selected control point. The X value represents the value of a selected Distance.

If more than one control point is selected, the field displays a value of 0, so that you can increase or decrease the value of all selected control points relative to their current values. For example, if you select two control points and move the X slider -5, both control points will move to the left by 5 units.

Y

The coordinate along the Y axis of the selected control point. The Y value represents a property value (Distance Attenuation volume in decibels, Distance Spread in percentage, or Low/High-Pass Filter in Hertz).

If more than one control point is selected, the field displays a value of 0, so that you can increase or decrease the value of all selected control points relative to their current values. For example, if you select two control points and type 5 in the Y text box, both control points will move up by 5 units.

Zooms in towards the center of the graph view.

Resets the graph view to the default zoom factor ratio of 1:1.

Zooms out from the center of the graph view.

Max Distance

Max distance for curves, in game units.

Default value: 1000
Range: 1 to 2147483648

(Pin/Unpin)

When the Pin icon is selected, the property curve's outline remains in the graph view even if it is not currently selected.

Color

A color block legend for distinguishing the different graph view curves.

Property

One of the following eight different Wwise Reflect image source curves, which appear in the graph view, where they can be edited, if selected.

  • Distance Attenuation: Volume attenuation based on the distance between the image source and the listener.
  • Distance Attenuation (Emitter vs. Listener): Volume attenuation based on the distance between the emitter and the listener.
  • Distance Spread: Spread used for 3D positioning, based on the distance between the image source and the listener. Refer to the Wwise Help's How 3D positioning is calculated: for more details on how Wwise handles Spread with 3D positioning.
  • Distance Low-pass Filter: First order low-pass filter based on the distance between the image source and the listener.
  • Distance High-pass Filter: First order high-pass filter based on the distance between the image source and the listener.
  • Diffraction Attenuation: Volume attenuation based on the diffraction coefficient of this reflection. In order to ensure smooth interpolation between specular and diffracted reflections, you should make sure that the value is 0 dB at 0% diffraction.
  • Diffraction Low-pass Filter: First order low-pass filter based on the diffraction coefficient of this image source. In order to ensure smooth interpolation between specular and diffracted reflections, you should make sure that the value is highest (no filtering) at 0% diffraction.
  • Diffraction High-pass Filter: First order high-pass filter based on the diffraction coefficient of this image source. In order to ensure smooth interpolation between specular and diffracted reflections, you should make sure that the value is lowest (no filtering) at 0% diffraction.


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