Skip to content

a python BVH tree builder using slangpy to call cuda kernels, no optix build problems.

Notifications You must be signed in to change notification settings

brabbitdousha/A-Python-Ray-Mesh-Intersector-in-Slangpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Python Ray-Mesh Intersector in Slangpy

this is a GPU LBVH builder implemented in slang-torch, based on Vulkan LBVH (Linear Bounding Volume Hierarchy)

I build every step in slangpy, so you can get any buffers in the BVH building process, for example, you can get the information of the bvh trees, so you can query on them in your own kernel, or do anything to them.

Installation

pip install torch, pyexr, slangpy, time, csv, numpy

Usage

run test.py, which will let you know every step of building it. and you will get a position map of a bunny. img

performance

simply querying the trees in kernel helps a lot, to get the position map of the bunny above, I compared with Triro, which uses NVIDIA OptiX to find intersections

GPU ray query time(test on RTX4090):
Triro : 0.015184 s
mine: 0.001178s

About

a python BVH tree builder using slangpy to call cuda kernels, no optix build problems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages