Close a mesh with a plane to estimate volume

Feel free to ask any question here
Post Reply
vik748
Posts: 7
Joined: Fri Nov 06, 2020 4:57 pm

Close a mesh with a plane to estimate volume

Post by vik748 »

Hi,
I have an open mesh of icebergs generated from Agisoft Metashape and I'd like to estimate its volume. Now, the issue is that the mesh is only from the top and the bottom is open. So I think, I need to do is close the mesh using a plane at the water line, I know that the plane needs to be at a certain z. Then I believe, I should be able to estimate the volume using the CloudCompare.
So do I understand this correctly? How do I exactly go about closing the mesh using a plane?

Thanks in advance for the help.

iceberg_underside.png
iceberg_underside.png (283.15 KiB) Viewed 5504 times
The attachment iceberg_underside.png is no longer available
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Close a mesh with a plane to estimate volume

Post by daniel »

CC is not super strong with meshes.

But actually you could simply convert your mesh to a dense cloud (Edit > Mesh > Sample points - don't hesitate to use a lot of points!).

Then use the 'Tools > Volume > Compute 2.5D volume' with this cloud. You'll be able to set the sea height as 'reference'. And the denser the cloud is, the finer the 'grid step' can be (so as to get the most accurate volume as possible).
Daniel, CloudCompare admin
vik748
Posts: 7
Joined: Fri Nov 06, 2020 4:57 pm

Re: Close a mesh with a plane to estimate volume

Post by vik748 »

@daniel thanks for the prompt reply.

Do you know any other software that might be able to help close the mesh with the plane? The icebergs have some concave sections along the sides and would be nice to be able to capture that in the volume.

Now, with the 2.5D volume, I did try what you are saying, but I got into a couple interesting issues. As you can see from the images, I don't have a lot of the sea-surface in the model. So to handle the empty cells I have to pick between fill with custom values (-2.0m in my case) or 'interpolate'.
If I pick, fill with custom value, it looks like cells inside the point cloud are also filling with -2.0m resulting in lower total volume.
On the other hand, if I choose interpolate, the edges between the high values and missing seafloor are filled with incorrect intermediate values, causing a different error in the result.
I think, it would be ideal, if there was some way to fill the outside points with -2 and interpolate the inside points.

If you'd like to play with the mesh I have uploaded the .ply file here.

Thanks for maintaining this awesome software and all your help.
Cheers,
Vik
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Close a mesh with a plane to estimate volume

Post by daniel »

When you refer to "sea-surface in the model", do you refer to to the small blue "triangle" in the middle? Is it really at sea level?

As you said you wanted to "close the mesh" to compute the volume, I would have simply used the plane "Z = -3.09" as the ground/before level.

This way, you can compute almost the same volume by comparing the dense point cloud sampled from the mesh, and this plane:
iceberg_volume.jpg
iceberg_volume.jpg (163.95 KiB) Viewed 5369 times
Isn't it what you wanted?

P.S.: here I only used 10M. points, therefore I kept a cell size of 0.5 (meters?), but one can use a finer grid if you sample more points.
Daniel, CloudCompare admin
DA523
Posts: 166
Joined: Mon May 25, 2020 4:02 pm

Re: Close a mesh with a plane to estimate volume

Post by DA523 »

Try this
1-open by iceberg_mesh.ply with cloudcompare
2-export vertices into vertices.csv
3-find z column (average and max)
4-import iceberg_mesh.ply with BLENDER (3D software)
5-TAB for edit mode
6-Edit -->Select all

Thin extrude by these commands

EZ-(max-average)
enter

SZ0
enter

F
enter

7- export to stl or ply
8-import stl with cloudcompare then EDIT-->MESH --->VOLUME

also you can replace (MAX-AVERAGE) BY any negative value to hit sea level

However because your model has 5m vertices you need good RAM (32BG ??) and good GPU otherwise BLENDER fails
DA523
Posts: 166
Joined: Mon May 25, 2020 4:02 pm

Re: Close a mesh with a plane to estimate volume

Post by DA523 »

bisect.png
bisect.png (105.6 KiB) Viewed 5080 times
please check my trial

CloudCompare
Edit--->Subsample (if old PC)
Edit-->mesh (max edge 23)
Save mesh to STL

Import STL to BLENDER
Extrude (EZ-30)
Bisect at -3.09 (outer , Fill)
Export STL

Find volume from CloudCompare
Edit-->mesh-->volume
=3.3 m

please check attachment
Attachments
bisect@-3.09.zip
(1.11 MiB) Downloaded 331 times
vik748
Posts: 7
Joined: Fri Nov 06, 2020 4:57 pm

Re: Close a mesh with a plane to estimate volume

Post by vik748 »

@DA523 Thanks for this detailed response. I didn't get any email about this, so didn't see you had posted a response. This is what I was after, I will give it a try when I have a chance.
Post Reply