I’m not sure if BabylonJS already offers a better way, but in general you could approach the problem this way:
Set up a temporary RenderTargetTexture. This can probably be a lot smaller than your actual render resolution; I’d start with 10 %.
Render your green mesh to the render target using a single matte (unlit) color. You could use a simple ShaderMaterial for this, that would always output the same fragment color.
Read the rendered scene using your rendertargettexture’s readPixels and count the non-black pixels.
Add the rest of your scene to your render target, and render the rest of the meshes totally black.
Render the scene again, read the pixels and count how many of them are visible now.
Note that the results will come several frames late. Each readPixels takes multiple frames to complete.