Page 1 of 1

Calculate Volume from Signed Distances Scalar Field?

Posted: Thu Feb 09, 2023 7:42 pm
by mnotarian
Hello! I was wondering if there is a method for calculating volume only use the signed differences scalar field. I have a point cloud representing a fairly uneven and curved surface. I created a convex hull of the cloud and calculated the distances between the two. I would like to calculate the volume of this gap, but only for small sections of the larger cloud / convex hull assemblage. There are holes between the convex hull and cloud because they are cut out of the larger models. I used Poisson Reconstruction to create a solid mesh to use for volume calculation, but this creates strange artifacts and is more labor intensive. It would be great to simply use the scalar field. I've attached a photo to show the cloud surface with the scalar field, and another with the cloud and convex hull section.

Re: Calculate Volume from Signed Distances Scalar Field?

Posted: Sun Feb 12, 2023 8:03 am
by daniel
Sadly it's not possible in an accurate way.

The M3C2 plugin tries to estimate the volume (I believe in the console) at the end of the distances computation, by summing the individual volumes of the core points search cylinders (= scale as radius * distance as cylinder height). But still, the result is approximative as it depends on the cloud sampling.

Re: Calculate Volume from Signed Distances Scalar Field?

Posted: Mon Feb 13, 2023 6:30 pm
by DA523
Can you share your pc or similar pc?

Re: Calculate Volume from Signed Distances Scalar Field?

Posted: Mon Feb 13, 2023 8:15 pm
by mnotarian
Thanks for your response Daniel. M3C2 does not seem to display the volume in the console and I've had trouble estimating the volume using the cylinders volume, probably because of so much overlap. The result is far too large. I have noticed though that if I use C2M and multiply the average distance by the surface area of the mesh (the convex hull) it produces a fairly close result to the Poisson Reconstruction volume (strangely the surface area of the convex hull is more than the surface area of the original model). Can I ask if you can explain, or point to an explanation, of how the volume calculation for solid meshes works (edit > mesh > measure volume)? Is that method always accurate?

I am working on Win10 Dell XPS 15 system.

Re: Calculate Volume from Signed Distances Scalar Field?

Posted: Tue Feb 14, 2023 8:21 pm
by daniel
The 'Edit > mesh > measure volume' method only works with a closed mesh. And there shouldn't be any topological issue of course.

Re: Calculate Volume from Signed Distances Scalar Field?

Posted: Wed Feb 15, 2023 6:51 pm
by DA523
Can I ask if you can explain, or point to an explanation, of how the volume calculation for solid meshes works (edit > mesh > measure volume)? Is that method always accurate?
I have same question ...
Which algorithm is used ?

Re: Calculate Volume from Signed Distances Scalar Field?

Posted: Wed Feb 15, 2023 8:05 pm
by daniel
In the code, I wrote:
//see "EFFICIENT FEATURE EXTRACTION FOR 2D/3D OBJECTS IN MESH REPRESENTATION" by Cha Zhang and Tsuhan Chen (2001)
//We compute the (signed) volume of the tetrahedron defined by each triangle and the origin