How to get volume of a Union?

As the title says, how do I get the accurate volume of a union?

I need to use this to get an accurate area of a province in my province game in km ^ 2

For now I simply use:
(mass/density/sizeY)*(34/100)*1.60934 to get the volume in studs and convert it into kilometres

The answer that I’m getting is far smaller than the real size of these areas and there is no constant that i can multiply/devide to my result to give the accurate answer

1 Like

still haven’t found a solution

1 Like

You can’t directly, since there’s no API for that. You’d have to convert it to a mesh (not necessarily a MeshPart) and use some algorithm to find the volume of that.

Depending on the length of one stud it can vary.

For example if we get the rough calculation of 1 stud which is 0.28 meters. Then the volume of 1x1x1 cube will be roughly 0.022 m^3.

Then the calculation of the volume would be pretty easy.

Before unioning the parts you just calculate the volume of each part and add them up and find the volume of the union

I had a thought, something that might work that I also suggested on a different post:

Export the union as a mesh and open it in Blender, and then use some blender tool that probably exists to calculate the volume.

When making the unions for the provinces many of the parts overlap, also this isn’t a meter-to-scale map, each stud is around 6 miles and that is then converted to kM