This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Spatialization

HRTF binaural spatialization and distance attenuation in the base gem — how a 3D sound is placed, the distance curve, HRTF interpolation modes, and the limits worth knowing.

Base — ships in GS_Audio.

Spatialization is what makes a sound feel like it is coming from somewhere. In GS_Audio it is powered by Steam Audio and it is automatic: place a source in the world and it is spatialized, with no per-sound setup and nothing to wire into an effects chain.

This page covers what the base gem does. Occlusion and geometry-driven reflections — sound genuinely blocked and reverberated by world geometry — are Audio Pro features.

For usage guides and setup examples, see The Basics: GS_Audio.

 

Contents


How a Sound Is Placed

Each 3D sound instance gets its own spatializer node, inserted between the source and its volume channel. Direction is recomputed every frame from the source-to-listener vector.

A source uses either miniaudio’s built-in spatializer or Steam Audio’s binaural path, depending on the project’s spatialization mode. Never both — a fixed HRTF layered over a positional pan cancels the spatial presence the pan was already producing.

The listener that all of this measures against lives on the Audio Manager, including the split spatial/orientation setup that lets proximity follow your character while direction follows your camera.

See the Audio Signal Model for where this sits in the chain and why it is a property of the source rather than an effect.


Distance

Distance is handled alongside direction: attenuation plus air absorption, both derived from the source-to-listener distance and the event’s authored Distance Min/Max.

The framework uses a bounded distance curve rather than the raw inverse-distance model:

SignalBehaviour
Direct (the dry sound)Full within min distance, attenuating to true silence at and beyond max distance.
Reverb sendFlat until 75% of max distance, then eased smoothly to zero at max.

The reason to state this plainly: a pure inverse-distance model never reaches zero and ignores a maximum distance, which leaves a faint version of every sound audible forever. The bounded curve trades physical exactness for a max distance that actually means something. An event’s Distance Min/Max therefore controls both how far the dry sound carries and how far it feeds the environment.

It is a chosen curve, not a physical simulation.


Configuration

All of it lives on the Audio Manager’s project settings, so the manager’s component panel is the configuration surface.

SettingDefaultNotes
SpatializationBinauralStereo turns HRTF off and uses miniaudio’s spatializer. Binaural uses Steam Audio HRTF.
HRTF InterpolationNearestNearest is cheap and good for point sources. Bilinear costs more and is better for wide-band material such as noise.
HRTF Volume1.0Level of the binaural path.
Default Min / Max Distance1.0 / 100.0Metres. Per-event distances override these.

HRTF settings are hidden in the editor unless spatialization is set to Binaural.

The spatialization back-end is resolved when sounds preload and does not change at runtime.


Limits Worth Knowing

These are expected behaviour for the technique, not defects — worth knowing before you evaluate the result.

  • Front/back and elevation cues are subtle. The HRTF is generic, with no head tracking and no per-listener personalization. Left/right positioning is clear and reliable; “above and behind me” is not something a generic HRTF conveys strongly.
  • Distance attenuation is a chosen curve, as described above, rather than physically exact falloff.
  • Nothing blocks sound in the base gem. A sound behind a wall is quieter with distance but is not occluded — geometry is not consulted. Occlusion and geometry-driven reverb are Audio Pro features.

See Also

For related systems:

For conceptual overviews and usage guides:


Get GS_Audio

GS_Audio — Explore this gem on the product page and add it to your project.