Add lidar point cloud support via OptiX sphere primitives#58
Merged
brendancol merged 1 commit intomasterfrom Feb 25, 2026
Merged
Add lidar point cloud support via OptiX sphere primitives#58brendancol merged 1 commit intomasterfrom
brendancol merged 1 commit intomasterfrom
Conversation
Introduces hardware-accelerated sphere intersection for rendering point clouds as splats. Each point becomes an OptiX sphere with per-point radius and RGBA color. Engine (rtx.py): - _build_gas_for_spheres() using BuildInputSphereArray - RTX.add_sphere_geometry() with uniform or per-point radii - Built-in sphere IS module + dedicated closest-hit program - SBT offset 3 for sphere hit group routing - Per-point color buffer in Params struct (96 bytes) Kernel (kernel.cu): - __closesthit__sphere: normal via optixGetSphereData() + object-to-world transform for correct world-space normals Data loading (pointcloud.py): - load_pointcloud() for LAS/LAZ (via laspy), numpy arrays, callables - Filtering by classification, return number, bounds, subsample - build_colors() with elevation/intensity/classification/rgb/solid modes - ASPRS standard classification color table Accessor (accessor.py): - place_pointcloud() method with coordinate transform, Z snapping, and automatic color generation Tested: 1M spheres built in 22ms, correct normals and hit detection.
Contributor
Author
|
fixes #55 |
Contributor
Author
|
requires pyoptix-contrib>=0.1.2 |
This was referenced Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BuildInputSphereArray)place_pointcloud()accessor method for loading and rendering LAS/LAZ/numpy point clouds on terrain__closesthit__sphere) with proper world-space normal computationChanges
cuda/common.h: Addedpoint_colorsfield to Params struct (88 → 96 bytes)cuda/kernel.cu: Added__closesthit__sphere()program usingoptixGetSphereData()andoptixGetObjectToWorldTransformMatrix()rtxpy/rtx.py: Sphere built-in IS module, hit group (SBT offset 3),_build_gas_for_spheres(),add_sphere_geometry(), updated IAS/SBT/params for 4th geometry typertxpy/accessor.py:place_pointcloud()method with geo→pixel coordinate transform, terrain Z-snapping, and color generationrtxpy/pointcloud.py: New module withload_pointcloud()(LAS/LAZ/numpy/callable),build_colors(), ASPRS classification color maprtxpy/kernel.ptx: Recompiled with sphere closest-hit programTest plan
place_pointcloud()accessor pipeline (1000 points)Closes #55