Hello
I am looking for a way to calculate the orthographic area of a mesh for a simulation I’m making.
For example a ball shape would give the area of the surrounding circle.
Is there a way to do that in babylon?
Welcome aboard!
There’s nothing specific in Babylon to do that. What you could do is rendering your mesh with an orthographic camera and count the number of pixels that is colored in the final image: it would be proportional to the area.
Something like:
https://playground.babylonjs.com/#INGP5J#2
(look at the browser console)
You can see in the inspector the texture that is being rendered to count the pixels:
2 Likes
Interesting, i will look into that!
1 Like