PDA

View Full Version : Voxelize 3D objects from .OFF and .OBJ files



biloubalabilou
03-13-2013, 02:06 AM
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.

menzel
03-13-2013, 03:21 AM
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

cireneikual
03-13-2013, 06:23 AM
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.

skeezix6
03-13-2013, 09:10 AM
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.

cireneikual
03-13-2013, 07:28 PM
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/

biloubalabilou
03-14-2013, 01:14 PM
Hello,

Think you for you all. I will try that!

Regards.