How to reveal specific areas of flat surface in runtime?

Hi there,

I hope someone can provide some insights on how to solve the following.
I want to reveal a flat surface during runtime. Let me explain with the following images:

When the game starts, the surface will be covered like this:

During runtime, the surface will be revealed like this:

The grass is a texture turned into a material, and it was applied to a plane static mesh.

Currently, I have the world space vertices of the revealed area.

Thanks in advaced

The easiest way, would be to just use black planes covering the surface. As time goes on, you can delete them :slight_smile:

So you mean creating small black planes like a grid, then removing the small planes inside the known area?

The area to be revealed can also resemble the following image

You should look into render targets
You can draw a material as a mask on the locations that you want revealed on the render target, and then use the render target as an alpha to blend between black and your other texture

There are a few ways to go about this, and the most troubling part will probably be translating real world coordinates to the render target’s coordinates

This is an video from epic showcasing a similar method with a render target. It might be a bit old and outdated in some areas, but the logic is largely the same as what you’d do today

1 Like

Thanks, Zeaf! That aligns perfectly. Now I will do my part to try to implement

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.