I’m looking to measure the surface area of part of an object overlapping another object, preferrably in cm[SUP]2[/SUP]. Let me start with an example:

Imagine you have two blueprints:

- The ball blueprint, containing the Static Mesh of a ball.
- A water volume blueprint, containing a Box Collision.

The ball has been thrown towards the water and has landed in the water, as in this illustration:

The ball is partially submerged in the water. Basically, the ball static mesh is partially overlapping the box collision. I want to measure how much surface area of the ball is submerged. The area I want to measure is the one shown with red lines in this illustration:

How would I, if at all possible, go about doing this in blueprints only (no C++)? From what I can see I do not have access to vertex or triangle locations on a Static Mesh. Even so, measuring only based on triangles might give inaccuraces is even triangles can be partially submerged. If it isn’t possible to get an accurate measurement, does anyone have any suggestions on how to give calculate a fair estimate of the surface area?

Now, there might be formulas to calculate the surfaces of a sphere, but what if the mesh isn’t a simple shape? There aren’t exactly any universal formulas to measure the surface area of a chair.

I’ve been toying with some general ideas, but haven’t figured out how to actually implement the ones that may be possible to do.

- What about getting the bounding box of the ball, trace from the upper plane (or upper vertices) down to the box collision, then subtract that from the bounding box? That should be possible within the engine but this is still quite inaccurate for a ball, as a ball it doesn’t conform well to a box giving a lot of empty area within the bounding box. However, this works great for boxes… assuming they are falling straight down. I assume that if rotated, even boxes will start to show increasing amounts of inaccuracy.
- I’ve never used procedural meshes before, but could I create a temporary copy of the static mesh and slice it along the intersecting planes of the water volume, so that I am left only with the part that is inside the volume? This would give me a very accurate number assuming I find a way to actually measure the surface area of the mesh itself.
- Again, using procedural meshes to slice the object, could I measure the mass before and after the slice to figure out the surface area somehow? I reckon I would have to manually supply the game with the total surface area of the object, and do something like TotalSurfaceArea * (PostSliceMass / OriginalMass).

In lieu of an accurate way, any tips on how to achieve any of these estimates? Or for that matter, any better ideas?