Scalable Grid above an underlying Decal

Hello,

so what im trying to do is a Pen and Paper support Software.

So i have pre generated maps which ill be using as a decal on a plane (could us a cube instead, view is allways orthogonal so it doesnt matter for the game) on top of that decal i need a square based grid which can dynamically changed in numbers of rows and collumns and also in the seize of each square.

Tldr
Im using a projektor above the table to show off the map. As the map size may vary i need to vary the square size. Ill also add some kind of Fog of war.
Situation right now:
To be really leightweight i made “invisible” squares. I made an array of Vector where each vector represents the middle of a square (im a little bit proud of this solution cause its super fast and elegant).
I could spawn an instanced static mesh at these points, but changing maybe 1000 instanced static meshes in either scale or amount ist cpu heavy and not really dynamic.
As i couldnt find a way to spawn lines, I thougt about spawing beams as outlines but didnt find a good way to change the parameters of the beam.
Also it would be amazing is the lines or borders scale with the camera position so that the absolut amount of pixel on the screen are allways the same (what the user sees doesnt change)

I tried this kind of material: How do I make a grid material work in three dimensions? - Rendering - Unreal Engine Forums
Together with an outline material (wireframe like, and with opacity i made a grid) which gives me a square based changeable material but its not good visible from far away and also didnt works on planes.

Dont judge my english, im not a native speaker :slight_smile:

BG

Michael