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 Project Explorer, right-click on the bus under which you want to create an early reflections auxiliary bus.

    • Select New Child > Presets > Early Reflection Auxiliary Bus.

      The new auxiliary bus is added.

      [Note] Note

      This preset is only available when Wwise Reflect is installed and Wwise Reflect Factory Presets have been added to your project. If they haven't, you can add them at any time using the Project > Import Factory Assets... menu.

    • The early reflection auxiliary bus is a standard auxiliary bus with the following settings:

      • Bus configuration is 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 from needlessly 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 determined by Reflect's Effect Settings.

      • It has an instance of Wwise Reflect mounted on it.

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

        [Note] Note

        No attenuation should be applied to this bus. You will be able to customize attenuation from the Reflect Effect Editor.

  • Inspect sounds that will be reflected.

    • If you will be using Wwise Reflect with the Wwise Spatial Audio Geometry API, which is the preferred method, assign your newly created bus to the Early Reflections' Auxiliary Bus, in the General Settings tab of the Sound Property Editor. Optionally, you may dial in a send volume.

    • In the General Settings tab of the Sound Property Editor, check the Use game-defined auxiliary sends option if you will use Wwise Reflect with the Wwise Spatial Audio raw SetImageSource API, or if you will send it to other auxiliary busses for late reverberation.

    • 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 bus 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.

  • Initialize the Spatial Audio module and register the spatial audio listener.

    // Initialize Wwise Spatial Audio.
    AkSpatialAudioInitSettings settings;
    res = AK::SpatialAudio::Init(settings);
    
    // Register the listener game object if not already done, and then register it as the one and only spatial audio listener.
    static const AkGameObjectID LISTENER_ID = 10000;
    AK::SoundEngine::RegisterGameObj( LISTENER_ID, "Listener" );
    AK::SpatialAudio::RegisterListener( LISTENER_ID );
    
  • 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.

Wwise Reflect Properties

Interface Element

Description

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.

Displays the object's color. Clicking the icon opens the color selector.

Select a color to apply it to the object.

[Note] Note

Selecting the square at the far left of the color selector causes the object to inherit its parent's color. When a color has been explicitly chosen for an object, it is displayed with the palette icon and a yellow triangle in the lower-right corner, as shown.

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 editor become unavailable.

Default value: true

Indicates the number of elements in your project that contain direct references to the object. The icon is displayed in orange when references to the object exist, and in gray when no references exist.

Selecting the button opens the Reference View with the object's name in the References to: field.

Notes

Additional information about the Effect.

Metering

Indicates the name of the object currently being metered.

Allows you to browse for other objects to meter.
[Note] Note

The metering interface elements only appear in the Effect Editor for Effects that include VU meters.

Sets the display of the Effect Editor's selected tabs. By default, there is one panel displaying only one selected tab. You can, however, click a splitter button to split the panel into two, either side by side or one on top of the other, for two different tabs. The currently selected option is highlighted with a background color.

[Note] Note

You cannot display the same tab in both panels. If you select the tab that is currently displayed in the other panel, then the other panel will automatically display another tab.

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 Config

Wwise Reflect is an out-of-place Effect, meaning that it has the ability to output a signal in a different channel configuration than its input. Output Config defines the channel configuration at the output of the plug-in.

It is recommended to use Wwise Reflect on a mono bus, in order to avoid having the sound engine needlessly compute spatialization on a multi-channel configuration. If the bus configuration is different than mono, the first thing Wwise Reflect does with the input signal is to downmix it to mono. However, the outputted early reflections should be spatialized. With the Output Config control, you can decide on which configuration they will be spatialized.

If the value is Parent Bus, Wwise Reflect queries and uses the bus configuration of the parent of the bus on which it is inserted.

Note that if the parent bus’s configuration is Audio Objects, then Wwise Reflect will output one Audio Object per early reflection. This can represent a substantial number of Audio Objects.

Default value: Parent Bus

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. More than one texture is listed for each reflection order.

[Note] Note

When reflection paths are diffracted by the presence of an object blocking the way, (Edge) will appear for each of the edge diffracted on.

Distance

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

Level

The gain of the sound emitted by the image source. This level can be set by the user with the AkImageSourceParams or controlled by Spatial Audio according to the diffraction angle caused by edge reflection. In the latter case, its value will be 1 when the reflection is specular and 0 when the reflected direction is parallel to the surface.

Diffraction

In the case of view zone diffraction, this is the angle between the specular direction and the reflected direction. In the case of shadow zone diffraction, this is the angle between the shadow zone boundary and the reflected direction.

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