Skip to content

Add LiDAR point cloud support via OptiX sphere primitives#59

Merged
brendancol merged 2 commits intomasterfrom
feature/point-cloud-support
Feb 27, 2026
Merged

Add LiDAR point cloud support via OptiX sphere primitives#59
brendancol merged 2 commits intomasterfrom
feature/point-cloud-support

Conversation

@brendancol
Copy link
Contributor

@brendancol brendancol commented Feb 27, 2026

Summary

  • Add sphere primitive geometry support using OptiX built-in ray-sphere intersection for hardware-accelerated point cloud rendering
  • Support LAS/LAZ file loading via laspy with filtering (classification, returns, bounds), spatial thinning, and multiple color modes (elevation, intensity, classification, RGB)
  • Parallel LAZ decompression via place_pointclouds() with process pool for multi-tile scenes
  • Cache processed LiDAR point clouds in zarr alongside triangle meshes and curves, skipping all LAZ decompression/filtering/thinning on subsequent runs
  • NYC Manhattan LiDAR demo example (examples/nyc_lidar.py) with USGS 3DEP data

Test plan

  • Run examples/nyc_lidar.py — first run loads LAZ tiles, places spheres, saves to zarr
  • Run again — verify it loads from zarr cache (fast) with identical visual output
  • Verify save_meshes / load_meshes round-trip preserves sphere centers, radii, and per-point colors
  • Confirm existing triangle mesh and curve geometry caching still works (no regression)
  • Test place_pointcloud with single file and various color modes

Sphere primitives (point clouds) now serialize to/from zarr alongside
triangle meshes and curves. place_pointcloud(s) stores baked data in
_baked_meshes, save_meshes writes type:"sphere" groups with centers/
radii/colors arrays, and load_meshes reconstructs sphere GAS entries.
nyc_lidar.py skips LAZ decompression on subsequent runs via zarr cache.
- Move wind particle splatting from CPU (np.add.at ~5ms) to GPU via
  Numba CUDA kernel with cuda.atomic.add (~0.1ms). Handle NaN terrain
  for ocean pixels so wind displays over water.
- Fix DOF (key 9) requiring AO to be enabled — decouple progressive
  accumulation from AO so DOF works independently or alongside AO.
- Add interactive point cloud color mode cycling (Shift+C) through
  elevation/intensity/classification/rgb. Store point cloud attributes
  on accessor for runtime recoloring via build_colors().
- Fix nyc_lidar.py paths to resolve relative to __file__ so it runs
  from any working directory.
@brendancol brendancol merged commit bd8d33a into master Feb 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant