sdf icon indicating copy to clipboard operation
sdf copied to clipboard

Volume from SDF

Open BartBruininks opened this issue 2 years ago • 3 comments

Hello developers,

I would like to calculate the total volume of an arbitrary sphere based SDF object. For now I am casting the SDF to a mesh and then use that to calculate the volume. However, writing the mesh is by far the most expensive step. I guess this is mainly due to the marching cubes. I was wondering if there is a way to get the volume from the voxels generated for the marching cubes directly. Or even better get the 'analytical' volume of the SDF without going to voxels at all?

Cheers and thanks in advance.

Bart

PS If we get this working we will probably write a small algorithm about it and if you are interested you can partake in this publication. We can talk about the details later.

BartBruininks avatar Nov 11 '22 15:11 BartBruininks

Hello Bart, are you still interested in this? Have you found another solution?

imagirom avatar Dec 26 '23 17:12 imagirom

In my fork sdfCAD I have implemented a kind of monte-carlo volume calculation with e.g. sphere(1).volume().

nobodyinperson avatar Dec 26 '23 17:12 nobodyinperson

Ahh nice :D

yhea I run into thi issue quite often so who knows I might need it again! The complete problem I was trying to solve was to find the mismatch and overlap between 2 3d point cloud densities. For now I am not working on it, but I will keep it in mind.

Cheers,

Bart

BartBruininks avatar Mar 11 '24 09:03 BartBruininks