Jump to content
  • Advertisement
_WeirdCat_

Determine solid hull of a 3d object

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!