Skip to content

Is there a way to generate a voxel grid? #74

Answered by mmacklin
cadop asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@mmacklin
Comment options

@cadop
Comment options

@mmacklin
Comment options

Answer selected by cadop
Comment options

You must be logged in to vote
1 reply
@mmacklin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants