Determine solid hull of a 3d object

Started by
3 comments, last by l0calh05t 4 years, 10 months ago

Lets say i import wavefront obj file, lets say its a box how would i determine that this box is solid, i found once a paper related to loading stl files and there they determined that space as solid, but lost it. I would like to voxelize any 3d object i import, but i found that without knowing the rule i will be able only to voxelize its surface.

Advertisement

An object is solid, if every edge is connected to exactly two triangles. Hence all you have to do is to first go through all faces and accumulate on every edge, then on a second pass, go through all edges and check whether they're all counter twice.

8 hours ago, Krypt0n said:

An object is solid, if every edge is connected to exactly two triangles. Hence all you have to do is to first go through all faces and accumulate on every edge, then on a second pass, go through all edges and check whether they're all counter twice.

When implementing a manifoldness check (checking if each edge is connected to exactly two triangles), there are a few things you should keep in mind:

  1. You have to deduplicate your vertices first (i.e. ignore things such as different normals)
  2. You have to pay attention to triangle orientation, the two triangles connected to an edge have to use it in opposing orientations.
  3. It is a purely topological check, so it will not detect things such as self intersections

You might also want to check these links out:

https://www.gradientspace.com/tutorials/2018/9/14/point-set-fast-winding

http://www.dgp.toronto.edu/projects/fast-winding-numbers/

These are especially useful with typical game models that usually have sane normals but insane topology ;) (due to hidden surface removal, attachments etc.)

This topic is closed to new replies.

Advertisement