Voxelize 3D objects from .OFF and .OBJ files

Hi everybody,

So here is my concern:
I need to get the points cloud which is inside 3D ​​objects (possibly from . OBJ or. OFF files).
they told me to voxelize the 3D model (Surface Model–>density model)!
I look everywhere and I have not found what can help me!
I need points coordinates (x, y, z) belonging to the interior 3D models so that I can do my calculations later!

Thank you.

Maybe this old discussion can help: http://www.opengl.org/discussion_boards/showthread.php/176770-Before-I-rush-headlong-some-advice-please?p=1233427#post1233427

You could spam random points (or make a grid) and take the dot product with the vector from those points to every vertex in the model and the normal at the vertex. If it is positive, the point is not inside the model and is discarded.

This will only work if the mesh is convex.

This will only work if the mesh is convex.

True. You can decompose the mesh into convex shapes though, using something like HACD: http://sourceforge.net/projects/hacd/


Think you for you all. I will try that!