6 comments

[ 2.0 ms ] story [ 28.6 ms ] thread
Cool! How robust is this to holes and to non-manifold geometry in the input mesh?
The TriMesh input library takes care of that. Also, it's thin shell voxelization, so holes don't matter.
Nice timings :).

For a project a while back I once wrote something similar in OpenCL. Back then, I wasn't calm enough to realize there is probably research in this area I could use, so I wrote it all in isolation :(. It was much slower but had the aim of being able to reduce an arbitrary (but preferrably closed) highly detailed polygonal mesh to a limited set of convex polyhedra[1]. This would happen automatically (no user interaction or setup required) and reliably. The resulting convex polyhedra sets were being used to perform occlusion culling before rendering. Fond memories :)

[1] https://en.wikipedia.org/wiki/Polyhedron

> Usage of the routine as a per-frame voxelization step for real-time applications is viable.

Curious what the motivation for this could be? Assuming "voxelization" is converting a mesh representation to voxels... but GPUs need triangles. Unless it involves some interesting voxel-based effects, (sounds fun) I can't see the motivation for converting from triangles to voxels and back again on every frame?

Having a rough voxelized representation of a scene is handy for some lighting calculations (Occlusion queries, ...)