Multi-Bounce Acoustic Ray-Traced Echolocation Point-Cloud Visualization
Visualizes otherwise invisible 3D architecture by casting multi-bounce acoustic rays from a sound pulse and depositing time-delayed, decaying luminous points where expanding sound waves strike surfaces.
Also known as acoustic echolocation rendering, sonar point-cloud visualization, geometrical acoustic ray mapping
In the family Stylized & non-photorealistic rendering, non-optical visualization
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | |
| Unity | None found | |
| Unreal 5.7 | None found | |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Geometrical room acoustics models sound propagation as energetic rays traveling at the finite speed of sound c (~343 m/s), reflecting specularly or diffusely off room boundaries while losing energy to distance spreading and surface absorption. Turning this acoustic simulation into an NPR visualization reveals a pitch-black 3D scene exclusively through delayed echo impressions.
Whenever a vocal call, clap, or synthetic sonar ping is emitted, thousands of rays are distributed over the sphere (or forward cone) and traced through the scene's BVH for multiple bounces. Each ray hit records its 3D world position, surface normal, accumulated path travel distance d, bounce order, and remaining acoustic energy—often feeding a matching spatialized audio impulse response at the same time.
Instead of illuminating hits instantaneously, each recorded point stays dormant until simulation time reaches t_emit + d / c, so rings of glowing dots sweep physically outward along corridors, turn corners via secondary reflections, and silhouette moving entities as acoustic shadows. After activation, points decay exponentially over a few seconds, leaving a ghostly, transient point cloud that fades back into darkness until the next pulse.
When to choose it
Reach for it when
- visualize hidden dark environments using expanding sonar or echolocation pings
- trace multi-bounce sound rays to stamp time-of-flight glowing surface dots
- create stylized lidar or bat-sonar scanning effects that reveal rooms over time
- decay and animate acoustic hit points according to physical travel distance
- render minimalist atmospheric point-cloud navigation in pitch-black levels
Choose it for horror, exploration, sensory-substitution, or architectural-acoustics visualizations where space should be revealed dynamically by finite-speed sound waves and multi-bounce reflections rather than direct light.
Prefer Depth/normal Sobel edge outlines or Jump-flood wide outlines when you want a cheap, instantaneous wireframe/sonar pulse without real multi-bounce occlusion. Prefer Unidirectional Path Tracing when simulating optical illumination rather than finite-speed acoustic wavefronts.
Field marks
- Sparse ray sampling leaves wide gaps on distant walls or large open rooms where angular ray density falls off quadratically
- Moving objects cast stale point clouds after stepping away unless dynamic entities are stamped with shorter lifetimes or continuously re-tested
- Geometrical ray tracing ignores low-frequency wave diffraction around sharp corners, making acoustic shadows sharper than real sound
- Unbounded point buffers can saturate fill rate or memory if pulses fire rapidly without a ring-buffer cap and decay eviction
Presets
Acoustic Ray-Traced Echolocation Point Cloud — dark vaulted geometry (left) vs multi-bounce time-delayed echo point pulses (right)
{
"P_PULSE_RATE": 0.75,
"P_WAVE_WIDTH": 0.55,
"P_POINT_DENS": 1,
"P_SPLIT": 0.34
}Show GLSL (135 lines)
const float P_PULSE_RATE = 0.75; // P Acoustic Pulse Rate [0.2, 1.8, 0.05]
const float P_WAVE_WIDTH = 0.55; // P Echo Decay Tail [0.2, 1.2, 0.05]
const float P_POINT_DENS = 1.00; // P Point Cloud Grid [0.5, 1.8, 0.05]
const float P_SPLIT = 0.34; // P Solid / Echolocation [0.0, 1.0, 0.02]
float hash31(vec3 p) {
p = fract(p * 0.1031);
p += dot(p, p.yzx + 33.33);
return fract((p.x + p.y) * p.z);
}
float sdBox(vec3 p, vec3 b) {
vec3 q = abs(p) - b;
return length(max(q, 0.0)) + min(max(q.x, max(q.y, q.z)), 0.0);
}
// Vaulted architectural corridor with pillars & archway revealed by expanding acoustic pulses
vec2 mapVault(vec3 p) {
// Inverted corridor walls + arched ceiling
float dFloor = p.y + 0.62;
float dWalls = 1.25 - abs(p.x);
float dCeil = 1.05 - length(vec2(p.x * 0.75, p.y - 0.15));
float dBack = p.z + 2.45;
float dShell = min(min(dFloor, dWalls), min(dCeil, dBack));
vec2 res = vec2(dShell, 1.0);
// Repeating ribbed colonnade piers along the corridor
for (int i = 0; i < 3; i++) {
float z = -0.35 - float(i) * 0.85;
float dL = sdBox(p - vec3(-0.78, -0.05, z), vec3(0.14, 0.58, 0.14));
float dR = sdBox(p - vec3(0.78, -0.05, z), vec3(0.14, 0.58, 0.14));
float dP = min(dL, dR);
if (dP < res.x) res = vec2(dP, 2.0);
}
// Central floating acoustic sculpture
float dSculpt = length(p - vec3(0.0, -0.14, -0.75)) - 0.28;
if (dSculpt < res.x) res = vec2(dSculpt, 3.0);
return res;
}
vec3 calcNormal(vec3 p) {
vec2 e = vec2(0.003, 0.0);
return normalize(vec3(
mapVault(p + e.xyy).x - mapVault(p - e.xyy).x,
mapVault(p + e.yxy).x - mapVault(p - e.yxy).x,
mapVault(p + e.yyx).x - mapVault(p - e.yyx).x
));
}
vec3 aces(vec3 x) {
x = max(x, 0.0);
return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float screenX = fragCoord.x / max(iResolution.x, 1.0);
float split = clamp(P_SPLIT, 0.0, 1.0);
float rate = clamp(P_PULSE_RATE, 0.15, 2.0);
float tail = clamp(P_WAVE_WIDTH, 0.15, 1.4);
float pDens = clamp(P_POINT_DENS, 0.4, 2.0);
vec3 ro = vec3(0.18 * sin(iTime * 0.35), 0.02, 1.38);
vec3 rd = normalize(vec3(uv.x, uv.y - 0.02, -1.35));
vec3 col = vec3(0.006, 0.009, 0.015);
float dist = 0.04;
vec2 hit = vec2(10.0, 0.0);
for (int i = 0; i < 68; i++) {
vec2 h = mapVault(ro + rd * dist);
if (h.x < 0.0025) { hit = vec2(dist, h.y); break; }
dist += h.x;
if (dist > 6.5) break;
}
if (hit.y > 0.5) {
vec3 p = ro + rd * hit.x;
vec3 n = calcNormal(p);
// Sound pulse originates slightly ahead of listener
vec3 pulseOrig = vec3(0.0, -0.05, 0.85);
float d1 = length(p - pulseOrig);
// Second-bounce acoustic path via central sphere / opposite wall reflection!
vec3 mirrorOrig = vec3(0.0, -0.14, -0.75);
float d2 = length(mirrorOrig - pulseOrig) + length(p - mirrorOrig);
// Repeating expanding acoustic wave fronts (finite speed of sound c)
float wavePhase = fract(iTime * rate * 0.38);
float waveDist = wavePhase * 5.2;
// 1st-bounce direct echo envelope (cyan-white leading edge, rapid decay behind wavefront)
float lag1 = waveDist - d1;
float env1 = step(0.0, lag1) * exp(-lag1 / max(0.55 * tail, 0.08)) / (0.35 + d1 * 0.55);
// 2nd-bounce delayed reflection envelope (warm amber secondary echo!)
float lag2 = waveDist - d2;
float env2 = step(0.0, lag2) * exp(-lag2 / max(0.75 * tail, 0.10)) / (0.55 + d2 * 0.45);
if (screenX < split) {
// Left: Dim ambient solid architecture for spatial reference
vec3 lDir = normalize(vec3(0.3, 0.6, 0.8));
float ndl = max(dot(n, lDir), 0.0);
vec3 baseCol = (hit.y > 2.5) ? vec3(0.34, 0.42, 0.52) : vec3(0.20, 0.24, 0.30);
col = baseCol * (0.20 + 0.55 * ndl) * exp(-hit.x * 0.22);
// Faint acoustic wave ring sweeping across reference geometry
float ring1 = exp(-abs(lag1) * 18.0);
col += vec3(0.18, 0.88, 1.0) * ring1 * 0.45;
} else {
// Right: Pure pitch-black NPR echolocation point-cloud deposited strictly where acoustic rays strike!
float gridScale = 14.0 * pDens;
vec3 cell = floor(p * gridScale);
vec3 local = fract(p * gridScale) - 0.5;
// Jittered luminous point inside each 3D surface cell
vec3 jit = (vec3(hash31(cell), hash31(cell + 17.3), hash31(cell + 41.9)) - 0.5) * 0.68;
float ptDist = length(local - jit);
float dotMask = smoothstep(0.24, 0.06, ptDist);
// Edge-curvature boost deposits denser silhouette highlight points on corners/pillars
float edgeBoost = (hit.y > 1.5) ? 1.45 : 1.0;
float waveCrest1 = exp(-abs(lag1) * 14.0) * 1.4;
float waveCrest2 = exp(-abs(lag2) * 12.0) * 1.1;
vec3 echo1Col = vec3(0.18, 0.92, 1.0) * (env1 * 1.45 + waveCrest1) * dotMask * edgeBoost;
vec3 echo2Col = vec3(1.0, 0.56, 0.18) * (env2 * 1.35 + waveCrest2) * dotMask * edgeBoost;
// Subtle floor ripple lines along advancing wavefront
float crestRing = exp(-abs(lag1) * 28.0) * 0.22;
col += echo1Col + echo2Col + vec3(0.25, 0.82, 0.96) * crestRing;
}
}
float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
col = mix(col, vec3(0.95, 0.98, 1.0), sep);
fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}Attribution: MIT — written for this index.
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| acoustic-raytraced-echolocation-point-cloud-live | Tesla T4 1920x1080 | 25.5× baseline (heavy) · 0.840 ms / 0.850 ms | opengl-timer-query · 32 frames · GPU Weight Atlas · Colab T4 sweep |
| acoustic-raytraced-echolocation-point-cloud-live | NVIDIA L4 1920x1080 | 27.2× baseline (heavy) · 0.432 ms / 0.434 ms · 1.9× faster on L4 | opengl-timer-query · Cross-architecture validation |
| acoustic-raytraced-echolocation-point-cloud-live | NVIDIA A100-SXM4-40GB 1920x1080 | 17.3× baseline (moderate) · 0.497 ms / 0.502 ms · 1.7× faster on A100 | opengl-timer-query · Cross-architecture validation |
Crosses
- Sonar echolocation point clouds on analog VHS-CRT: A dark world revealed only by expanding acoustic pings, displayed as if recorded onto worn magnetic tape and played back on a curved phosphor CRT. Sparse high-contrast sonar dots trigger authentic NTSC chroma ringing, tape tracking jitter, and blooming scanlines that turn bare point clouds into tactile analog telemetry.
- three-mesh-bvh: Accelerates multi-bounce acoustic ray-triangle queries per sound pulse at interactive frame rates.
- Physically Modeled NTSC Composite / VHS Tape & CRT Electron-Beam Emulation: Passes the decaying echolocation point-cloud output through analog tape noise and CRT phosphor glow.
Sources
- primaryA. Krokstad, S. Strom, S. Sørsdal (1968). Calculating the acoustical room response by the use of a ray tracing technique. Journal of Sound and Vibration.Verified via crossref · 2026-11-30doi:10.1016/0022-460x(68)90198-3
- surveyLauri Savioja, U. Peter Svensson (2015). Overview of geometrical room acoustic modeling techniques. The Journal of the Acoustical Society of America.Verified via crossref · 2026-11-30doi:10.1121/1.4926438