Skip to content

febrij/planetary-ir-studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŒπŸ”Š Planetary IR Studio

Physics-based acoustic simulation from LIDAR data. Generate impulse responses of caves, lava tubes, and extraterrestrial environments.

Python 3.11 Rust Metal GPU License: MIT

Cave Materials Visualization


What is this?

Planetary IR Studio converts NASA LIDAR scans of caves and lava tubes into acoustic Impulse Responses (IRs) using physics-based wave simulation (FDTD) and per-triangle ray tracing. It is the only software that simulates how spaces sound on Mars, Titan, and the Moon. The output IRs can be loaded into any DAW with a convolution reverb plugin β€” record a vocal in your studio, and hear it inside a Martian lava tube.


🎧 Listen

Download the 5-second IR previews and load them into your favorite convolution reverb:

Space Planet RT60 C80 STI Bass Ratio IR Preview
Indian Tunnel Lava Tube 🌍 Earth 1.86s -1.5 dB 0.595 0.94 WAV
Indian Tunnel Lava Tube πŸ”΄ Mars 2.15s 1.2 dB 0.625 0.65 WAV
Indian Tunnel Lava Tube 🟠 Titan 4.67s 8.4 dB 0.821 2.41 WAV
Skull Cave 🌍 Earth 2.12s 24.3 dB 0.863 2.96 WAV
Skull Cave πŸ”΄ Mars 3.35s 21.6 dB 0.841 2.96 WAV

Indian Tunnel is a real lava tube in Craters of the Moon National Monument, Idaho. Scanned by NASA with 11.6 million LIDAR points. Skull Cave is a limestone cave in Lava Beds National Monument, California.


πŸ”¬ How It Works

Pipeline Diagram

An 8-step physics pipeline transforms raw LIDAR point clouds into publication-quality impulse responses:

  1. LIDAR Input β€” Reads .f32 point clouds from NASA CAVES, or your own iPhone LIDAR scan (Polycam, Scaniverse)
  2. 3D Mesh β€” Poisson surface reconstruction with convex hull closure to prevent ray escape
  3. Material Classification β€” K-Means clustering on NIR reflectance maps points to 9 cave materials, each with frequency-dependent absorption coefficients
  4. FDTD Wave Simulation β€” FCC 4th-order lattice (Hamilton & Webb 2017) on Metal GPU. Captures diffraction, modal resonance, and wave phenomena that ray tracing cannot
  5. Per-Triangle Ray Tracing β€” Intel Embree-accelerated. Each bounce uses the exact material of the triangle hit, with frequency-dependent absorption and scattering
  6. FDN Synthesis β€” Feedback Delay Network with analytically calibrated gains. Implemented in Rust (391x faster than Python)
  7. Crossover Blend β€” Combines wave simulation (low frequencies, physical accuracy) with ray tracing (high frequencies, computational efficiency)
  8. Analysis & Export β€” ISO 3382 metrics, 5-page PDF report, WAV files, modal analysis, decay curves

πŸͺ Planetary Acoustics

Decay Comparison

No other software in the world simulates extraterrestrial acoustics. Planetary IR Studio models the real physics of sound propagation on other worlds:

Planet Speed of Sound Atmosphere Effect on Acoustics
🌍 Earth 343 m/s Nβ‚‚/Oβ‚‚, 1 atm Reference standard
πŸ”΄ Mars 240 β†’ 250 m/s COβ‚‚, 600 Pa High frequencies die after ~50m. Bi-modal dispersion above 2 kHz (verified against Perseverance data)
🟠 Titan 194 m/s Nβ‚‚/CHβ‚„, 1.5 atm Reverb tails 1.77x longer than Earth for the same geometry. Dense atmosphere (5.3 kg/mΒ³)
πŸŒ‘ Moon 0 m/s Vacuum No air propagation β€” structural vibration through rock only

Frequency Response

Mars's COβ‚‚ atmosphere absorbs high frequencies aggressively. The same cave sounds muffled and dark on Mars β€” like listening through a thick blanket.


πŸ“Š Acoustic Analysis

Metrics Comparison

Every simulation produces a 5-page PDF report with full ISO 3382 acoustic metrics:

  • RT60 (T20/T30) β€” Reverberation time via Schroeder backward integration
  • EDT β€” Early Decay Time
  • C50 / C80 β€” Clarity (speech / music)
  • D50 β€” Definition
  • Ts β€” Centre time
  • STI β€” Speech Transmission Index
  • Bass Ratio / Brilliance β€” Spectral balance
  • Modal Analysis β€” Room modes and resonant frequencies
  • Flutter Echo Detection β€” Periodic reflection patterns
  • Early Reflections β€” Isolated first 50ms

πŸ“„ Example PDF Report


πŸš€ Quick Start

# Clone
git clone https://github.com/your-username/planetary-ir-studio.git
cd planetary-ir-studio

# Install dependencies
python3.11 -m pip install -r requirements.txt

# Optional: Rust FDN acceleration (391x faster synthesis)
cd rust_fdn && maturin develop --release && cd ..

# Generate your first IR (uses NASA CAVES Indian Tunnel data)
python3.11 lidar_to_ir_3layer.py IndianTunnel_cave/Full/IndianTunnel_full_10x.f32 \
    --preset QUICK --voxel-size 0.3

# Try Mars!
python3.11 lidar_to_ir_3layer.py IndianTunnel_cave/Full/IndianTunnel_full_10x.f32 \
    --preset QUICK --planet MARS --voxel-size 0.3

# Try Titan!
python3.11 lidar_to_ir_3layer.py IndianTunnel_cave/Full/IndianTunnel_full_10x.f32 \
    --preset QUICK --planet TITAN --voxel-size 0.3

Output goes to output/ β€” you'll find WAV files, a PDF report, metrics JSON, and decay curves.


πŸ“± Use Your Own Space

Scan any room, cave, or tunnel with an iPhone Pro (LIDAR-equipped) using Polycam or Scaniverse:

# Convert your .ply scan to .f32 format
python3.11 convert_ply_to_f32.py your_scan.ply

# Generate the IR
python3.11 lidar_to_ir_3layer.py your_scan.f32 --preset QUICK

# What does your bathroom sound like on Titan?
python3.11 lidar_to_ir_3layer.py your_scan.f32 --preset QUICK --planet TITAN

πŸ—οΈ Architecture

Core Pipeline

Module Description
lidar_to_ir_3layer.py Main 8-step pipeline with CLI, presets, planet support
chunked_reader.py Adaptive streaming reader with fast vectorized path
lidar_to_ir.py Point cloud processing and Poisson mesh reconstruction
material_classifier.py K-Means NIR/RGB β†’ 9 cave materials with absorption DB
fdtd_metal.py Metal GPU FDTD backend (Apple Silicon)
fdtd_cpu.py CPU fallback FDTD with FCC4 lattice
fdtd_multiband.py Multi-band FDTD orchestrator (auto-selects GPU/CPU)
ray_tracer_multimaterial.py Per-triangle Embree ray tracer with Russian Roulette
hybrid_ir_engine.py FDN synthesis + FDTD/ray crossover blend
fdn_optimizer.py Analytical FDN calibration with per-band correction
acoustic_metrics.py ISO 3382 metrics via Schroeder integration
acoustic_phenomena.py Flutter echo, modal analysis, diffusion detection
report_generator.py 5-page PDF report with matplotlib charts

Rust Acceleration

Module Speedup Description
rust_fdn/ 391x FDN with Householder matrix, prime delays, 1-pole lowpass
rust_raytracer/ Fallback BVH + Moller-Trumbore (Open3D Embree preferred)

API & Visualization

Module Description
api_server.py FastAPI REST API (9 endpoints, job queue)
planetary_ir_sdk/ Python SDK for programmatic access
vis_server.py WebSocket server for real-time 3D visualization
vis_client.html Three.js viewer with material colors and FDTD heatmaps

⚑ Performance

Benchmarked on MacBook Pro M1, 16GB unified memory:

Dataset Points Pipeline Time FDTD Backend RT60
Indian Tunnel 10x 11.6M 11.2s Metal FCC4 1.86s
Indian Tunnel full 116.2M 40.9s Metal FCC4 2.51s
Skull Cave 500K 6.6s Metal FCC4 2.09s

Optimizations

Technique Speedup Reference
FCC4 lattice (vs Cartesian FDTD) 18x Hamilton & Webb 2017
Russian Roulette ray termination 7.8x Energy-conserving, r=0.976 correlation
Rust FDN (vs Python) 391x PyO3 + ndarray
Metal GPU (vs CPU FDTD) 1.24x Apple Silicon compute shaders
Analytical FDN calibration ∞ 0ms vs 30s iterative
Vectorized voxel reader 1.33x NumPy sort + reduceat

πŸ† Competitive Advantage

Feature Planetary IR Studio Treble Tech ODEON v19 Steam Audio Altiverb v8
LIDAR point cloud input βœ… ❌ ❌ ❌ ❌
Wave simulation (FDTD) βœ… βœ… ❌ Partial ❌
Planetary acoustics βœ… ❌ ❌ ❌ ❌
Auto material classification βœ… ❌ ❌ ❌ ❌
iPhone LIDAR support βœ… ❌ ❌ ❌ ❌
Consumer GPU (Metal) βœ… ❌ (cloud) N/A ❌ N/A
Open source βœ… ❌ ❌ βœ… ❌
ISO 3382 metrics βœ… βœ… βœ… ❌ ❌
IR export (.wav) βœ… βœ… βœ… ❌ N/A

Nobody else converts LIDAR scans directly to acoustic impulse responses. Nobody else simulates planetary acoustics.


πŸ”¬ Research Foundation

Built on peer-reviewed acoustic simulation research:


πŸ“„ License

MIT License β€” use freely for commercial, academic, or creative projects.


🀝 Contributing

PRs welcome! See docs/architecture.md for the module design and docs/adrs/ for architecture decision records.

# Run the smoke tests
python3.11 tests/test_pipeline_smoke.py

# Profile the pipeline
python3.11 -m cProfile -s cumtime lidar_to_ir_3layer.py data/skull_test.f32 --preset QUICK --no-vis

Built with Claude Code across 8 autonomous R&D sessions.

About

Physics-based acoustic impulse responses from NASA LIDAR cave data. FDTD wave simulation + ray tracing for Earth, Mars, Titan & Moon.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors