Render target fog or war calculate map revealed percent

I’m working up a render target based fog of war system. I need to be able to calculate how much of the map the player has revealed, not distance traveled, amount revealed.

As it sits right now, my map reveal is based on a sphere pinned to the actor being dragged around. A blueprint in the level writes that to a persistent render target as a 1 where the sphere intersects the landscape.

The approach I’ve been chipping away has been to average down the render target to the lowest mip and then theoretically read that color value as a number. It is the reading the value of that texture as a number I’ve got no idea how to do.

Unless there is another approach?

Take the render target pixel size of map width and height.

Width × height = total pixels = 100%

When you paint the fog/remove pixels you can then calculate exact mathematical percentages.

I am confused what you mean by this. The render target is a fixed size. When I write to it what I am doing is a scene capture dropped in my level that sees just where the objects I’ve flagged with a stencil get close enough to the landscape.