Steam® Audio, Copyright 2016 - 2019, Valve Corp. All rights reserved.
Thanks for trying out Steam Audio. It is a complete solution to add 3D audio and environmental effect to your game or VR experience. It has the following capabilities:
3D audio for direct sound. Steam Audio binaurally renders direct sound using HRTFs to accurately model the direction of a sound source relative to the listener. Users can get an impression of the height of the source, as well as whether the source is in front of or behind them.
Occlusion and partial occlusion. Steam Audio can quickly model raycast occlusion of direct sound by solid objects. Steam Audio also models partial occlusion for non-point sources.
Model a wide range of environmental effects. Steam Audio can model many kinds of environmental audio effects, including slap echoes, flutter echoes, occlusion of sound by buildings, propagation of occluded sound along alternate paths, through doorways, and more.
Create environmental effects and reverbs tailored to your scene. Steam Audio analyzes the size, shape, layout, and material properties of rooms and objects in your scene. It uses this information to automatically calculate environmental effects by simulating the physics of sound.
Automate the process of creating environmental effects. With Steam Audio, you don’t have to manually place effect filters throughout your scene, and you don’t have to manually tweak the filters everywhere. Steam Audio uses an automated real-time or pre-computation based process where environmental audio properties are calculated (using physics principles) throughout your scene.
Generate high-quality convolution reverb. Steam Audio can calculate convolution reverb. This involves calculating Impulse Responses (IRs) at several points throughout the scene. Convolution reverb results in compelling environments that sound more realistic than with parametric reverb. This is particularly true for outdoor spaces, where parametric reverbs have several limitations.
Head tracking support. For VR applications, Steam Audio can use head tracking information to make the sound field change smoothly and accurately as the listener turns or moves their head.
This section describes the various parts of Steam Audio, focusing on the way in which the computational load is divided between multiple threads. Steam Audio interacts with three main threads:
Game Thread. This thread controls the game state, and sends this information to the Simulation Thread. This thread is managed by the game engine, and runs as fast as the game engine chooses to execute it, which might be 60 Hz assuming vsync is enabled.
Simulation Thread. This thread actually carries out the sound propagation simulation, and performs the bulk of the computational work. It uses source and listener information provided by the Game Thread, and calculates an impulse response for use by the Rendering Thread. This process involves ray tracing. This thread is managed internally by Steam Audio, and runs as fast as it can, but no faster than the Rendering Thread.
Rendering Thread. This thread applies direct occlusion, 3D audio, and environmental effects to each sound source. Steam Audio inserts DSP code into the main audio thread, to perform convolutions with multi-channel impulse responses. This thread runs at the audio DSP rate, which is typically 1024 samples per frame, and 44100 samples per second.
Steam Audio supports Unreal Engine 4.20 or higher. If you are using Unity, refer to the Steam Audio Unity Plugin Manual. If you are using a different game engine or audio middleware, you will need to use the Steam Audio C API. Refer to the Steam Audio API Reference for further information.
The Steam Audio Unreal Engine 4 plugin currently supports Windows 7 or later, and Android.
This chapter explains how to use Steam Audio with Unreal Engine. It assumes that you are using Unreal’s built-in audio engine.
To get started, users must make sure they are running with the newest audio engine, enable the plugin, and enable the plugin on a per-platform basis.
NOTE
For developers using UE4.20-4.24, you will need to manually enable the Audio Mixer Functionality, such as by passing -audiomixer to the Unreal executable on startup.
Before using the Steam Audio plugin with Unreal, you must enable it for your project. To do so:
Unreal allows users to individually configure spatialization, occlusion, and reverb plugins, per-platform. For example, you may choose to use Steam Audio’s spatialization plugin on Windows and Android, but use default spatialization on PS4.
To get started on Windows:
The Steam Audio spatialization plugin allows users to apply HRTF-based binaural audio for their games and VR experiences. You can enable Steam Audio spatialization on any Audio Component in your scene. To do this:
This configures Steam Audio to use HRTF-based binaural rendering for this sound. If you want to fine-tune how the spatialization is performed, you can configure advanced spatialization settings as described in the next section.
Spatialization Settings assets may be used to configure how Steam Audio spatializes a sound by following these steps:
In the window that opens, you can configure the following settings:
Select HRTF to use Steam Audio’s HRTF-based binaural rendering algorithm (this is the default). You can also select Panning to revert to a standard panning algorithm. This is mostly useful for comparison purposes only.
HRTF Interpolation specifies what interpolation scheme to use for HRTF-based 3D audio processing:
Nearest. This option uses the HRTF from the direction nearest to the direction of the source for which HRTF data is available.
Bilinear. This option uses an HRTF generated after interpolating from four directions nearest to the direction of the source, for which HRTF data is available. Bilinear HRTF interpolation may result in smoother audio for some kinds of sources when the listener looks around, but has higher CPU usage than Nearest HRTF interpolation.
The Steam Audio occlusion plugin lets you model the transmission of direct sound from the source to the listener. In particular, Steam Audio allows you to model occlusion, air absorption, physics-based attenuation, and directivity. There are several key configuration steps to be aware of when using the Steam Audio occlusion plugin:
You can enable Steam Audio occlusion on any Audio Component in your scene. To do this:
NOTE
When your project is configured to use the Steam Audio occlusion plugin, UE4 will ignore all settings in the Attenuation Occlusion section, except for Enable Occlusion.
This configures Steam Audio’s direct sound effect with the default settings. To fine-tune how Steam Audio models direct sound, you can configure advanced occlusion settings as described in the next section.
In the Content Browser tab, double-click the Occlusion Settings asset you created. In the window that opens, you can configure how Steam Audio models direct sound.
Direct Occlusion Mode specifies how to model sources that are occluded by solid objects.
None. Occlusion calculations are disabled. Sounds can be heard through walls and other solid objects.
Direct Occlusion, No Transmission. Occlusion calculations are enabled. Occluded sound is inaudible.
Direct Occlusion, Frequency Independent Transmission. Occlusion calculations are enabled. Occluded sound is attenuated as it passes through geometry, based on the material properties of the occluding object. The attenuation is independent of frequency.
Direct Occlusion, Frequency Dependent Transmission. Occlusion calculations are enabled. Occluded sound is filtered as it passes through geometry, based on the material properties of the occluding object. The filtering is dependent on frequency, so for example high frequencies may be attenuated more than low frequencies as the sound passes through geometry.
This dropdown is enabled whenever Direct Occlusion Mode is set to anything other than None. Specifies the algorithm used by Steam Audio for modeling occlusion. The options are:
Raycast. Performs a single ray cast from source to the listener to determine occlusion. If the ray is occluded, direct sound is blocked.
Partial. Performs multiple ray casts from source to the listener, treating the source as a sphere with a specified radius. The volume of the sound source is adjusted based on the portion of the source visible from the listener. Transmission calculations, if enabled, are only applied to the occluded portion of the direct sound.
Specifies the radius of the sphere to use when modeling Partial occlusion. Ignored if Direct Occlusion Method is set to Raycast.
When checked, physics-based distance attenuation (inverse distance falloff) is applied to the audio.
NOTE
To avoid applying physics-based distance attenuation on top of Unreal Engine’s native distance attenuation, ensure that Enable Volume Attenuation is unchecked under Attenuation Distance.
When checked, frequency-dependent, distance-based air absorption is applied to the audio. Higher frequencies are attenuated more quickly than lower frequencies over distance.
NOTE
To avoid applying air absorption on top of Unreal Engine’s native air absorption, ensure that Enable Air Absorption is unchecked under Attenuation Air Absorption.
You can access global occlusion plugin settings for Steam Audio by:
The number of rays that are traced from the listener to various points in a sphere around the source. Increasing this number results in smoother transitions as the source becomes more (or less) occluded. This comes at the cost of increased CPU usage.
The Steam Audio reverb plugins allows you to model the transmission of indirect sound from the source to the listener. In particular, there are two types of reverb, source-centric and listener-centric, that you may apply to a source. Source-centric reverb is a per-source effect that models how sound emitted from the source bounces around the environment before reaching the listener. Listener-centric reverb is a global effect that models how sound emitted from the listener bounces around the environment before returning to the listener. Listener-centric reverb is often used as a less expensive approximate alternative to source-centric reverb, although the two effects may be combined. There are several key configuration steps to be aware of when using the Steam Audio reverb plugin:
You can enable source-centric reverb on any Audio Component in your scene. To do this:
This configures Steam Audio’s source-centric reverb with the default settings. To fine-tune source-centric reverb settings for this source, see reverb settings assets.
You can enable listener-centric reverb on any Audio Component in your scene. To do this:
This configures the audio component to use both listener-centric and source-centric reverb with the default settings. Listener-centric reverb must also be enabled in the global project settings, since it is disabled by default. To enable listener-centric reverb globally and configure other settings, see global reverb settings. If you only want listener-centric reverb for this source, then you can disable source-centric reverb simulation as described in reverb settings assets.
To fine-tune source-centric reverb settings for a source, in the Content Browser tab, double-click the Reverb Settings asset you created. In the window that opens, you can configure the following settings:
This determines what kind of simulation is performed to calculate source-centric reverb.
Increasing this value increases the contribution of indirect sound relative to the overall mix for this source.
You can access global reverb plugin settings for Steam Audio by:
You can fine-tune various settings that control how Steam Audio simulates physics-based indirect sound. This can help you achieve the right balance between simulation quality and in-game performance. These settings apply to both listener-centric and source-centric reverb (for all sources that use it).
How to simulate listener-centric reverb, if at all.
How much listener-centric reverb should contribute to the overall mix.
This determines the directionality of environmental effects. Increasing this increases the compute complexity quadratically. Use zero order Ambisonics if no directionality is needed in environmental effects. Otherwise, first order Ambisonics should provide a good tradeoff between directionality and CPU usage.
This is the length of the impulse responses to generate, in seconds. Increasing this improves the quality of the simulation, but beyond a certain point (depending on the number of sound sources), may result in audio glitching.
If set to Panning, Steam Audio will apply a standard panning algorithm to render the Ambisonics-encoded environmental effects. If set to HRTF, Steam Audio will decode the environmental effects using an HRTF-based binaural rendering algorithm, for improved spatialization of indirect sound.
The minimum distance between a source and a scene surface, used when calculating the energy received at the surface from the source during indirect sound simulation. Increasing this number reduces the loudness of reflections when standing close to a wall; decreasing this number results in a more physically realistic model.
This is the maximum number of sound sources that can have source-centric reverb enabled. For the purposes of this setting, listener-centric reverb counts as a source. For example, if Max Sources is set to 8, and you are using listener-centric reverb, then you can have up to 7 sources that use source-centric reverb.
These settings let you fine-tune how Steam Audio simulates physics-based indirect sound. You can select one of the presets from the Quality Preset drop-down, or select Custom, and adjust the following settings.
These settings let you fine-tune how Steam Audio simulates physics-based indirect sound. You can select one of the presets from the Quality Preset drop-down, or select Custom, and adjust the following settings.
As an alternative to simulating physics-based environmental effects in real time, you can choose to bake them in the Unreal editor. At run-time, the baked environmental effect information is used to look up the appropriate filters to apply based on the source and/or listener position. This way, you can perform much more detailed simulations as a pre-process, trading off CPU usage at run-time for additional disk space and memory usage for the baked data.
Before you can bake environmental audio effects, you must place probes at all points in your scene where you want to bake environmental effects. A probe is a point at which environmental audio effects are sampled.
To create probes, you must first create a Probe Volume, which is a box-shaped region of space in which multiple probes will automatically be generated by Steam Audio. To create a Probe Volume:
You can create multiple Probe Volumes throughout the scene, Steam Audio will bake environmental effects for all probes in all Probe Volumes.
Once a Probe Volume has been created, you must generate probes within it:
The probes will be displayed as blue dots in the scene.
The probe Placement Strategy determines how Steam Audio generates probes within a Probe Volume. Steam Audio currently supports the following strategies:
This section describes how to configure Steam Audio to generate and use baked data for source-centric reverb.
To pre-compute source-centric reverb for a specific source:
To configure a sound source to use baked data, follow these steps:
This section describes how to configure Steam Audio to generate and use baked data for listener-centric reverb.
To pre-compute listener-centric reverb:
To configure Steam Audio to use baked data for listener-centric reverb:
To use Steam Audio for occlusion and reverb in your project, you must first export a scene by tagging geometry and specifying acoustic materials for the objects in your scene.
Steam Audio needs to know what objects in your scene should be used to model occlusion and calculate environmental effects. You can specify this by tagging the relevant objects in multiple different ways.
Any Static Mesh component can be tagged with a Phonon Geometry component:
NOTE
Tagging an object with Phonon Geometry does not require you to create an additional mesh first. Steam Audio can directly use the same meshes used for visual rendering. Not all objects have a noticeable influence on environmental effects. For example, in a large hangar, the room itself obviously influences the environmental effect. A small tin can on the floor, though, most likely doesn’t. But large amounts of small objects can collectively influence the environmental effect. For example, while a single wooden crate might not influence the hangar reverb, large stacks of crates are likely to have some impact.
You may also add or remove Phonon Geometry components from all Static Mesh components in the scene by using buttons provided in the Steam Audio editor mode.
To tag a large number of Static Mesh components that share a common parent actor in the World Outliner view:
In the current version of Steam Audio for Unreal Engine 4, you cannot select individual parts of Landscape terrain to use for physics-based environmental audio simulation. You can either use all terrain in a scene, or none of it. To configure Steam Audio to use Landscape terrain:
In the current version of Steam Audio for Unreal Engine 4, you cannot select individual parts of BSP geometry to use for physics-based environmental audio simulation. You can either use all BSP geometry in a scene, or none of it. To configure Steam Audio to use BSP geometry:
After tagging objects, the next step is to tell Steam Audio what they are made of. You can specify the acoustic material of an object as follows:
In the Phonon Material component that appears, click the Material Preset drop-down and choose a material preset.
If you have an object with a Phonon Geometry component with Export All Children checked, and you attach a Phonon Material component to it, all its children are assigned the material of the root object. It is possible to assign a child object a different material by attaching a Phonon Material component to the child object.
For scenes where most objects are made of the same material, barring a few exceptions, you can save time by specifying a global default material. Then, you only have to add Phonon Material components to objects whose material is different from the default. To specify a global default material:
Instead of choosing a material preset, you can use a custom material. To do so, select Custom from the Material Preset drop-down, either on a Phonon Material component, or for the global default materials. Seven sliders appear, allowing you to customize the material.
The first three sliders, Low Frequency Absorption, Mid Frequency Absorption, and High Frequency Absorption, let you specify how much sound the material absorbs at different frequencies. For example, setting High Frequency Absorption to 1 means that the material absorbs all high frequency sound that reaches it. This adds a low-pass filtering effect to any sound reflected by the object.
NOTE
The center frequencies for the three frequency bands are 800 Hz, 4 KHz, and 15 KHz.
The fourth through sixth sliders, Low Freq Transmission, Mid Freq Transmission, and High Freq Transmission, let you specify how much sound the material transmits at different frequencies. For example, setting High Freq Transmission to 0 means that no high frequency sound passes through the material. This adds a low-pass filtering effect to any sound passing through the object.
The seventh slider, Scattering, lets you specify how “rough” the surface is when reflecting sound. Surfaces with a high scattering value randomly reflect sound in all directions; surfaces with a low scattering value reflect sound in a mirror-like manner.
You must “export” the scene before hitting Play in the Unreal editor or building a player, to ensure scene setup changes are available to Steam Audio. To export:
After exporting, you should see the number of triangles in the scene and overall data size. If you wish to view the scene that will be used by Steam Audio, you may export to an OBJ file by clicking Export OBJ. The resulting OBJ file may be loaded and viewed in the Unreal editor.
Steam Audio can model the effect of dynamic geometry when simulating occlusion, transmission, and indirect sound in real-time. For example, if a door opens, a previously occluded sound can become unoccluded; if a room is made larger, reverb may change substantially.
This functionality requires the use of Embree as your ray tracer (see section on Intel® Embree for more info). It allows geometry to be moved, rotated, and scaled at run-time. However, runtime geometry deformations and/or edits are not supported.
Similar to static geometry, a Phonon Geometry component can be attached to any Actor with a Static Mesh Component in your level. However, the Static Mesh component’s mobility must be set to Movable. Doing so tells Steam Audio to treat that Actor as a dynamic object:
At run-time, any changes made to the Transform of the Static Mesh Component where the Phonon Geometry Component is attached will automatically be passed to Steam Audio.
You can also tag several Static Mesh components in a single Actor by adding a Phonon Geometry component to them as a child component (see above instructions). You can then make changes to the Transform of each tagged Static Mesh component during runtime and they will automatically be passed to Steam Audio.
The Actor containing the Phonon Geometry component must also have a Phonon Material component attached. This Material is treated as the default material for the Dynamic Geometry.
Tagging materials for dynamic geometry works similarly to static geometry:
After tagging a Dynamic Object with Phonon Geometry and Material components, you must export your level. The Scene Export will automatically recognize all dynamic geometry in the scene. Check above on how to do Scene Exports.
Steam Audio provides optional support for AMD TrueAudio Next, which allows you to reserve a portion of the GPU for accelerating convolution operations. TrueAudio Next requires a supported AMD Radeon GPU. If you choose to enable TrueAudio Next support in your UE4 project, then Steam Audio will try to use the GPU to accelerate the rendering of indirect sound, including real-time source-centric reverb, real-time listener-centric reverb, and baked listener-centric reverb.
To enable TrueAudio Next for Steam Audio:
When TrueAudio Next is enabled, you can also override some of the simulation settings that are normally configured on the Steam Audio Manager Settings component. These include Impulse Response Duration, Ambisonics Order, and Max Sources.
These overrides allow you to switch to a higher level of acoustic detail when the user’s PC has a supported GPU, while seamlessly falling back to using the CPU with the default settings if a supported GPU is not found.
When TrueAudio Next is enabled, you can configure the following Resource Reservation settings, which allow you to control how much of the GPU is set aside for audio processing tasks:
Max Compute Units To Reserve. This is the largest number of CUs that Steam Audio will try to reserve for audio processing at runtime. When set to 0, entire GPU is used for audio processing. If compute units fewer than minimum possible reservable on a particular GPU are requested, TrueAudio Next initialization will fail. For example, if Max Compute Units To Reserve is set to 2 and minimum number of compute units that can be reserved on a user’s GPU are 4, TrueAudio Next initialization will fail.
Fraction Compute Units for IR Update. Multiple resources can be reserved by Steam Audio on GPU for audio processing and other tasks like preparing IR calculated on CPU for audio processing or indirect sound processing on GPU (see section on Radeon Rays below). This value determines the fraction of Max Compute Units To Reserve used for IR update. For example, if Max Compute Units To Reserve is set to 8 and Fraction Compute Units for IR Update is set to 0.5, then 4 compute units are used for audio processing and 4 compute units are used for IR update.
Steam Audio provides optional support for Intel® Embree, which uses highly optimized CPU ray tracing for accelerating real-time simulation and baking. Embree support in Steam Audio is currently restricted to a single CPU core. Embree support will work on any modern CPU based on the x86 or x86_64 architectures, as long as Streaming SIMD Extensions 2 (SSE2) instructions are supported. CPUs that support Advanced Vector eXtensions (AVX) or AVX2 instructions will result in improved performance when using Embree support.
NOTE
Embree support is only available on Windows (64-bit).
To enable Intel® Embree for Steam Audio:
Steam Audio provides optional support for AMD Radeon Rays, which uses GPU-optimized ray tracing for accelerating real-time simulation and baking. Radeon Rays support in Steam Audio requires a supported AMD GPU or other OpenCL 1.2+ device.
NOTE
Radeon Rays support is only available on Windows (64-bit).
To enable AMD Radeon Rays for Steam Audio:
When Radeon Rays is enabled, you can configure the following settings, which allow you to control how the GPU used for baking:
GPU Resource Reservation reserves a portion of GPU (specified as number of compute units) for calculating real-time indirect sound. This way, real-time indirect sound calculation is restricted to reserved GPU resources only and they do not interfere with other rendering or other game logic using GPU resources during runtime. For baking, entire GPU is always used.
For developers using UE4.20-4.24, once you’re ready to package your game, you need to make sure that you copy the Steam Audio runtime data directory. To do so:
NOTE
For developers using UE4.20-4.24, on some platforms, you may need to edit the platform engine config file to make sure your executable will use the new audio mixer at runtime. For example, on Windows, edit Config/Windows/WindowsEngine.ini and ensure the Audio section contains:[Audio] UseAudioMixer=true