class

FGeometricAcoustics

FGeometricAcoustics — sound worked out from the level's geometry. Three answers, all deterministic for a given seed so two machines agree:

Module
Audio
Header
#include "Audio/GeometricAcoustics.h"
Namespace
Mowo
  • Occlusion: every wall a straight line from source to listener crosses, each costing what FSoundOcclusion's material table says. Once a scan hierarchy is installed for a world, FSoundPropagation::Evaluate takes its direct path from here — so world sources, proximity voice, radio speakers and AI hearing are all blocked by the scanned walls. - Reverb: rays from the listener bounce off the surfaces (specular or scattered by the material), and the decay follows Eyring's law from the traced mean free path and the energy-weighted absorption, rays that escape counting as open air. - Early reflections: exact image sources. Planes are discovered by rays from both ends, mirrored up to the reflection order, and every path is confirmed against the geometry — the wall is really there at the bounce point and nothing blocks any leg.

Echolocation is the same machinery pointed outward: a click, and what each ray's surface sends back toward the emitter and when.

Properties

TypeNameDescription
static constexpr floatkSpeedOfSoundDefault 343.0f.
static constexpr uint32_tkMaxPlanesDefault 32.
static constexpr uint32_tkMaxReflectionOrderDefault 3.

Public functions

ReturnsNameDescription
FAcousticMaterialDefaultMaterial
FAcousticMaterialGetMaterial
voidSetMaterial
voidResetDefaults
std::stringConfigKey
voidLoadFromConfig
voidLoadFromGlobalConfig
voidSaveToConfig
FAcousticsSettingsGetSettingsThe audio.Acoustics.* console variables, read now.
boolIsEnabled
FSoundOcclusionResultOcclusion
FAcousticReverbEstimateReverb
uint32_tEarlyReflections
FEcholocationResultEcholocate
voidSetWorldGeometryThe geometry a world's sound is traced against.
std::shared_ptr<IAcousticGeometry>GetWorldGeometry
Vec3SphereDirectionEvenly spread unit directions, rotated by the seed: the same seed is the same rays on every machine.
voidDrawDebugReflections as lines from the listener to each bounce, under the Audio debug category.

Function details

DefaultMaterial

C++
static FAcousticMaterial DefaultMaterial(ESurfaceType surface)

GetMaterial

C++
static FAcousticMaterial GetMaterial(ESurfaceType surface)

SetMaterial

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

ResetDefaults

C++
static void ResetDefaults()

ConfigKey

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

LoadFromConfig

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

LoadFromGlobalConfig

C++
static void LoadFromGlobalConfig()

SaveToConfig

C++
static void SaveToConfig(Config& config)

GetSettings

C++
static FAcousticsSettings GetSettings()

The audio.Acoustics.* console variables, read now.

IsEnabled

C++
static bool IsEnabled()

Occlusion

C++
static FSoundOcclusionResult Occlusion(const IAcousticGeometry& geometry, const Vec3& from, const Vec3& to)

EstimateReverb

C++
static FAcousticReverb EstimateReverb(const IAcousticGeometry& geometry, const Vec3& listener, uint32_t rays, uint32_t bounces, float maxDistance, uint32_t seed)

EarlyReflections

C++
static uint32_t EarlyReflections(const IAcousticGeometry& geometry, const Vec3& source, const Vec3& listener, uint32_t order, uint32_t rays, float maxDistance, uint32_t maxCount, std::vector<FAcousticReflection>& outReflections)

Echolocate

C++
static FEcholocationResult Echolocate(const IAcousticGeometry& geometry, const Vec3& origin, const Vec3& direction, float coneRadians, uint32_t rays, float range, uint32_t seed)

SetWorldGeometry

C++
static void SetWorldGeometry(const World* world, std::shared_ptr<IAcousticGeometry> geometry)

The geometry a world's sound is traced against. Null clears it; a world with none keeps the physics material trace.

GetWorldGeometry

C++
static std::shared_ptr<IAcousticGeometry> GetWorldGeometry(const World* world)

SphereDirection

C++
static Vec3 SphereDirection(uint32_t index, uint32_t count, uint32_t seed)

Evenly spread unit directions, rotated by the seed: the same seed is the same rays on every machine.

DrawDebug

C++
static void DrawDebug(const Vec3& listener, const std::vector<FAcousticReflection>& reflections, const FEcholocationResult* echoes)

Reflections as lines from the listener to each bounce, under the Audio debug category.

Generated from Audio/GeometricAcoustics.h via audio.json · Oct 26, 2026Version 1.0.0