Surfaces and materials¶
Tell the plugin what each surface is made of, and reverb and occlusion react to it. Carpet soaks up echoes, tiles make them ring, glass lets sound through and acoustic foam blocks it completely.
How it works¶
Two pieces work together:
- AcousticMaterial is a resource that holds the numbers: how much sound a surface absorbs, and how much passes through it.
- AcousticBody is a node you add to a wall, floor or prop. It holds the material for that surface.
When the player's rays hit a collision shape, the plugin looks for an AcousticBody on the body that was hit and
reads its material.
- Room rays use absorption: soft surfaces shorten the reverb, hard ones lengthen it.
- The ray to the listener uses transmission: a wall with low transmission muffles and quiets the sound more. Behind one wall, glass sounds brighter than concrete, and rock or carpet sounds most muffled.
Surfaces without an AcousticBody still count as walls. They let through the player's fallback_transmission
(0.03 by default), about the same as the generic preset.
Add an AcousticBody¶
With the toolbar button:
- Select the wall's
StaticBody3D,RigidBody3D,Area3D,CharacterBody3Dor CSG shape. - Click AcousticBody in the 3D editor toolbar.
- The new
AcousticBodyis selected. Load a material into Acoustic Material.
The button only shows when one body is selected and it doesn't have an AcousticBody yet. Ctrl+Z undoes
it.
By hand: add an AcousticBody as a direct child of the body, from Add Child Node.
StaticBody3D (concrete wall)
├── CollisionShape3D
├── MeshInstance3D
└── AcousticBody ← concrete.tres
RigidBody3D (crate)
├── CollisionShape3D
└── AcousticBody ← wood.tres
CSGBox3D (use_collision = on)
└── AcousticBody ← brick.tres
Direct children only
The AcousticBody must sit right under the body. Under a CollisionShape3D or a MeshInstance3D, or any
deeper, it isn't found.
CSG shapes¶
CSG shapes work if Use Collision is on. Godot then makes a hidden StaticBody3D inside the shape, and that's
what the rays hit. The plugin checks the shape above it, so put the AcousticBody on the CSG shape itself.
CSG shapes inside a CSGCombiner3D may not be detected reliably. Put the AcousticBody on a shape that isn't
part of a combiner, or use a StaticBody3D.
Editor warnings¶
The scene tree shows a warning on an AcousticBody when:
- Its parent isn't a physics body or CSG shape
- Its parent CSG shape has Use Collision off
- Its parent CSG shape is inside a
CSGCombiner3D - The parent has more than one
AcousticBody(only the first is used) - No material is assigned (the surface uses
fallback_transmission)
Pick a material¶
Start with one of the 12 presets in addons/spatial_audio_extended/presets/materials/.
To make your own:
- In the FileSystem dock, right-click a folder and choose Create New > Resource.
- Pick AcousticMaterial and save it, for example as
thin_wood_panel.tres. - Set its values in the Inspector, then load it into an
AcousticBody.
Or build one in code:
var mat := AcousticMaterial.new()
mat.absorption_low = 0.15
mat.absorption_mid = 0.10
mat.absorption_high = 0.08
mat.transmission_low = 0.08
mat.transmission_mid = 0.04
mat.transmission_high = 0.02
$Wall/AcousticBody.acoustic_material = mat
Every value is explained in the AcousticMaterial reference.
Soundproof surfaces¶
Turn on total_absorption to make a surface block sound completely. A sound behind it fades to silence, and
rooms lined with it lose almost all their reverb. The acoustic_foam preset has it on.
total_absorption_transition_speed sets how fast the sound fades out and back in as the surface comes between
you and the source. Lower is smoother.
Doors
For a door you can open and close, use a soundproof or heavy material on the door's body. When the door swings out of the way, the sound comes back.
Separate layers for reverb and occlusion¶
The player has two collision masks: reverb_collision_mask for the room rays and occlusion_collision_mask for
the ray to the listener. Put walls, floors and ceilings on the reverb layer, and add doors and furniture only to the
occlusion layer. Small props then muffle sound without making a room seem smaller than it is.