Mesh voxelizer demo

A mesh voxelizer demo

there can be improvements like using bvh to speed up raycasting or using compute shader

13 Likes

Very cool!

1 Like

Thanks!!

It is cool.
you don’t need to calculate invmat everytime in pointInsideMesh, since it’s constant.

2 Likes

thanks for pointing that out,
there are lot of optimization and more memory friendly way to do this. I just scribbled something out just for a quick demo, I have updated the PG

3 Likes

I have some personal experience with writting some code for doing voxelization in that it was so bad , i caused my entire machine to hang due to out of memory errors in unity haha

1 Like

love the bit shifting and masking! very cool way to voxel a mesh. thanks for sharing

1 Like

Thanks!
The bit shifting were from the thin Instances doc

1 Like