Sign in to follow this  
Followers 0
ua4192

mesh real volume

4 posts in this topic

Hi.

Is it possible to compute the real volume (not bounding box based) or the meshes I am importing in GLTF files?

I have read it is possible to do it from vertix buffer

Best regards.

Share this post


Link to post
Share on other sites

Interesting question! Mathematically possible but not straightforward. Might play with it over the next week or so, unless somebody already has the answer.

Share this post


Link to post
Share on other sites

If I remember well my distant physics classes, you might find the derivative function of an elementary delta in your volume and then use an integral ...

Not that easy when the volume has no predefined or known shape.

 

Maybe another approach assuming the volume is concave convex (the barycenter is "inside" the mesh and all the tetrahdrons are "inside" the mesh) : 

compute the barycenter position

then from each mesh facet, compute the volume of each pyramid (tetrahedron) based on the facet triangle with the barycenter as the summit

 

If the volume is not concave, split it into many concave convex ones and iterate the former process

Share this post


Link to post
Share on other sites

Many thanks for your support. Due to the big amount of meshes I have decidef to discard this option and use bounding box volume instead.

Now after reading some docs I understand the problem.

Best regards.

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.