class

FSoundOcclusion

Module
Audio
Header
#include "Audio/SoundOcclusion.h"
Namespace
Mowo

Properties

TypeNameDescription
static constexpr floatkOpenCutoffHzDefault 20000.0f.
static constexpr floatkFloorDbDefault -60.0f.
static constexpr floatkThinWallDbDefault -9.0f.
static constexpr floatkThinWallCutoffHzDefault 2500.0f.
static constexpr floatkThickWallDbDefault -18.0f.
static constexpr floatkThickWallCutoffHzDefault 900.0f.
static constexpr floatkDefaultSmoothingDefault 5.0f.

Public functions

ReturnsNameDescription
FSoundOcclusionMaterialDefaultMaterialThe shipped row for a surface (the engine default, not the live table).
FSoundOcclusionMaterialGetMaterial
voidSetMaterial
voidResetDefaults
floatGetSmoothingRate a smoothed voice approaches its target at, per second.
voidSetSmoothing
voidLoadFromConfigReads audio.occlusion.<Surface>.db / .cutoff_hz and audio.occlusion.smoothing; a key that is absent keeps the engine default, so a project only writes the rows it changes.
voidLoadFromGlobalConfig
voidSaveToConfig
std::stringConfigKey
uint32_tDefaultLayerMaskEvery layer but Player: the ray ends at the listener, who stands inside a character capsule that is a real body.
voidAddLayerFolds one layer into a result: dB adds, the cutoff takes the darker.
voidAddSurface
FSoundOcclusionResultTraceEvery wall between two points, through the physics scene.
voidApproachFrame-rate independent approach of a playing voice toward its target.
floatDbToGain
floatGainToDb

Function details

DefaultMaterial

C++
static FSoundOcclusionMaterial DefaultMaterial(ESurfaceType surface)

The shipped row for a surface (the engine default, not the live table).

GetMaterial

C++
static FSoundOcclusionMaterial GetMaterial(ESurfaceType surface)

SetMaterial

C++
static void SetMaterial(ESurfaceType surface, const FSoundOcclusionMaterial& material)

ResetDefaults

C++
static void ResetDefaults()

GetSmoothing

C++
static float GetSmoothing()

Rate a smoothed voice approaches its target at, per second.

SetSmoothing

C++
static void SetSmoothing(float ratePerSecond)

LoadFromConfig

C++
static void LoadFromConfig(const Config& config)

Reads audio.occlusion.<Surface>.db / .cutoff_hz and audio.occlusion.smoothing; a key that is absent keeps the engine default, so a project only writes the rows it changes.

LoadFromGlobalConfig

C++
static void LoadFromGlobalConfig()

SaveToConfig

C++
static void SaveToConfig(Config& config)

ConfigKey

C++
static std::string ConfigKey(ESurfaceType surface, const char* field)

DefaultLayerMask

C++
static uint32_t DefaultLayerMask()

Every layer but Player: the ray ends at the listener, who stands inside a character capsule that is a real body. Tracing it made every source in the level read as behind a wall.

AddLayer

C++
static void AddLayer(FSoundOcclusionResult& result, float attenuationDb, float cutoffHz)

Folds one layer into a result: dB adds, the cutoff takes the darker.

AddSurface

C++
static void AddSurface(FSoundOcclusionResult& result, ESurfaceType surface)

Trace

C++
static FSoundOcclusionResult Trace(const PhysicsWorld& world, const Vec3& from, const Vec3& to, uint32_t layerMask)

Every wall between two points, through the physics scene. Hits right at either end are dropped: a ray that starts inside the emitter's own prop or ends inside the listener's body reports them at fraction 0.

Approach

C++
static void Approach(FSoundOcclusionState& state, const FSoundOcclusionResult& target, float ratePerSecond, float deltaTime)

Frame-rate independent approach of a playing voice toward its target. The cutoff moves in log space so a sweep from 20 kHz to 900 Hz sounds even, and both snap once close so the filter is not rebuilt forever around its resting point.

DbToGain

C++
static float DbToGain(float db)

GainToDb

C++
static float GainToDb(float gain)
Generated from Audio/SoundOcclusion.h via audio.json · Oct 26, 2026Version 1.0.0