How best to accelerate sparse scene queries in raytracing? #6093
-
Hi, I'm struggling to understand how to use Taichi's sparse systems for a use like raytracing. I'm also new to Taichi in general, so apologies if I misunderstand anything. I'm using this project as reference https://github.com/lyd405121/ti-raytrace - while it seems excellent for everything else, for space acceleration, it just builds and balances a BVH tree in https://github.com/lyd405121/ti-raytrace/blob/main/accel/LBvh.py This is obviously fine, but I'd love to leverage the builtin SNode system, since it's one of Taichi's main advantages. In this case, my plan is: Then during ray cast, run normal bbox-ray intersection checks only against active nodes, recursing down to leaves, and finally checking each primitive contained in a leaf individually. Is having any number of primitives per leaf cell legal? Would it be better to define a regular array length, with a maximum number of primitives that can be held? I'd appreciate any advice you can give on this, thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Taichi's SNode is more or less designed for spatially sparse objects on a regular grid. Triangle or mesh primitive ray-tracing acceleration does not map well to a regular grid (think nyqusit frequency as a fundamental limitation), thus you don't see people use regular octree or VDB similar systems for general scene data. It will be pretty good for volume data which is usually sampled on a regular grid. |
Beta Was this translation helpful? Give feedback.
Taichi's SNode is more or less designed for spatially sparse objects on a regular grid. Triangle or mesh primitive ray-tracing acceleration does not map well to a regular grid (think nyqusit frequency as a fundamental limitation), thus you don't see people use regular octree or VDB similar systems for general scene data. It will be pretty good for volume data which is usually sampled on a regular grid.