How to render grid on landscape.

I am trying to implement grid based city builder game. Now I need to draw grid on landscape. Locked tiles should be one colour, free tiles should be different.
I tried to spawn decal for each tile or even instanced static mesh and draw it in virtual texture. But it is crashing when i try to render 504x504 grid, maybe it is too heavy.
So is there any idea or solution of my problem? Will be glad if anyone can help)

Some references that I want:


Make sure that the material that you spawn is an instance, so it isn’t as heavy. Perhaps you need to re-think the way you are going about designing your overlay.

You have most likely already done the math on this, but 504 x 504 is equal to: 254 016. That’s a lot of decals. I don’t believe any game has ever done it the way you are trying to. I found this tutorial which goes through on how you can create an optimized grid: Unreal Engine 4 - Optimized Grid Tutorial (1/4) - YouTube

Hi. I have already watch this tutorial. This grid is flat, it does not match the landscape.
I also understand that 254016 decals is too much. But I have no idea how to do this task. I need to have oportunity to acces each tile and change it`s colour. So I am here to ask somebody how it should be done.