Acoustics: approximate diffraction via first-bounce visibility (sound around corners and through doorways) #858

Closed
opened 2026-10-19 01:56:41 +00:00 by sky_line · 1 comment
Owner

Follow-up to #683 (RT room acoustics).

Today: occlusion is a single listener-to-source ray, so a source is either blocked (muffled) or clear. A sound through an open doorway or around a corner gets fully muffled, and its direction is the straight line through the wall.

Proposal: reuse the listener's room rays.

  • Indirect path check: at each room ray's first hit point, cast one shadow ray to each occluded source (next-event estimation, as in path tracing).
  • Opening found: if a source is visible from a first-bounce point, there is a one-bounce path (doorway, around a corner):
    • reduce its muffling by the strength of the best indirect path (shorter detour = clearer);
    • optionally pan its apparent direction towards that opening by moving the source position used for spatialisation.
  • Second bounce later: a second bounce can be added if one is not enough (corridors).

Notes:

  • Cost: room rays × occluded sources shadow rays. Cap the sources (nearest / loudest occluded N) and the rays per source; the room rays are already traced.
  • Smoothing: keep the existing smoothing; the path strength changes slowly as you walk.
  • Scope: this is the cheap geometric stand-in for proper edge diffraction / pathing (Steam-Audio-class echograms are #683 Phase 1).

Done when: a sound behind an open door or around a corner is clearly less muffled than one behind a solid wall, and pans towards the opening, at under ~0.05 ms extra GPU on an RTX 3060-class card.

Follow-up to #683 (RT room acoustics). **Today:** occlusion is a single listener-to-source ray, so a source is either blocked (muffled) or clear. A sound through an open doorway or around a corner gets fully muffled, and its direction is the straight line through the wall. **Proposal:** reuse the listener's room rays. - **Indirect path check:** at each room ray's first hit point, cast one shadow ray to each **occluded** source (next-event estimation, as in path tracing). - **Opening found:** if a source is visible from a first-bounce point, there is a one-bounce path (doorway, around a corner): - reduce its muffling by the strength of the best indirect path (shorter detour = clearer); - optionally pan its apparent direction towards that opening by moving the source position used for spatialisation. - **Second bounce later:** a second bounce can be added if one is not enough (corridors). **Notes:** - **Cost:** room rays × occluded sources shadow rays. Cap the sources (nearest / loudest occluded N) and the rays per source; the room rays are already traced. - **Smoothing:** keep the existing smoothing; the path strength changes slowly as you walk. - **Scope:** this is the cheap geometric stand-in for proper edge diffraction / pathing (Steam-Audio-class echograms are #683 Phase 1). **Done when:** a sound behind an open door or around a corner is clearly less muffled than one behind a solid wall, and pans towards the opening, at under ~0.05 ms extra GPU on an RTX 3060-class card.
sky_line added this to the Slipstream project 2026-10-19 01:56:41 +00:00
Author
Owner

Fixed in 1.4.1 (1a0f5c8298). Reopen if you still see it.

Fixed in 1.4.1 (1a0f5c8298). Reopen if you still see it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#858
No description provided.