-
The volumes section https://nvidia.github.io/warp/_build/html/modules/runtime.html#volumes mentions loading NanoVDB and being able to access voxels. Is there a way to create this from a mesh? I can see there is The example mesh file shows getting the closest point within radius, which is similar to what I need, but I really want all of the triangles within a radius. I am also wondering: can a hashgrid be used as the container for a voxel volume? Or is there a more obvious way. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @cadop, There are a few options - you could use the Or you could sample the geometry with particles, and then throw those into a hash grid and use Hope that helps, |
Beta Was this translation helpful? Give feedback.
-
So I gather that the performance difference will be a combination of triangle size + count and mesh size, and for large meshes the hashgrid will end up with some massive numbers (e.g. 50x50x50m mesh with 10cm sampling size). Would that be a fair assumption in that circumstance to use bvh query? |
Beta Was this translation helpful? Give feedback.
Hi @cadop,
There are a few options - you could use the
wp.bvh_query_aabb()
to get back all overlapping tris in a volume. You could compute forces from each of those (e.g.: from tri centroid / vertices).Or you could sample the geometry with particles, and then throw those into a hash grid and use
wp.hash_grid_query()
. Using triangles means you might want to re-tessellate the mesh (similar to point sampling in some ways anyway) if you want forces to not depend too much on triangle size distribution.Hope that helps,
Miles