Calculate Volume from Signed Distances Scalar Field?

Feel free to ask any question here
Post Reply
mnotarian
Posts: 4
Joined: Thu Feb 09, 2023 6:57 pm

Calculate Volume from Signed Distances Scalar Field?

Post 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.
Attachments
Convex Hull mesh overlaid on cloud
Convex Hull mesh overlaid on cloud
Screenshot 2023-02-09 143904.png (31.44 KiB) Viewed 3290 times
Cloud with C2M scalar field
Cloud with C2M scalar field
Screenshot 2023-02-09 143752.png (239.06 KiB) Viewed 3290 times
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Calculate Volume from Signed Distances Scalar Field?

Post 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.
Daniel, CloudCompare admin
DA523
Posts: 166
Joined: Mon May 25, 2020 4:02 pm

Re: Calculate Volume from Signed Distances Scalar Field?

Post by DA523 »

Can you share your pc or similar pc?
mnotarian
Posts: 4
Joined: Thu Feb 09, 2023 6:57 pm

Re: Calculate Volume from Signed Distances Scalar Field?

Post 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.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Calculate Volume from Signed Distances Scalar Field?

Post by daniel »

The 'Edit > mesh > measure volume' method only works with a closed mesh. And there shouldn't be any topological issue of course.
Daniel, CloudCompare admin
DA523
Posts: 166
Joined: Mon May 25, 2020 4:02 pm

Re: Calculate Volume from Signed Distances Scalar Field?

Post 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 ?
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Calculate Volume from Signed Distances Scalar Field?

Post 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
Daniel, CloudCompare admin
Post Reply