Drawing shapes on landscape?


Iam currently working on an RTS and got the following problem:

I want to draw multiple things on my landscape. For example every unit has a specific range, wich should be displayed by a circle when the user presses a certain key (tab key for example). Is it possible to draw a circle (and other shapes like a grid) directly on the map (or landscape) in runtime? I thought about different layers like one for the map itself, one for unit ranges, one for spezific zones and so on.

Is this the way to go or is there another solution? I also thought about splines, but I dont know if the performance crashes if i spawn and despawn a grid over the whole map.

Edit: I’m using blueprints only at the moment.

Thanks for your input,


This isn’t an answer, but it might give you some ideas.

This stuff will probably be easy to do in UE4.25 with Niagara, but for now, I would use blueprints. Putting an image on the landscape would be buggy because what if you have a static mesh above the landscape? It would show below the mesh.

What you are saying could most likely be done but I don’t know how you would make a grid in the material editor.

Maybe research decals? Unreal Engine 4 Tutorial - Decals - YouTube

On begin play I would make a 2d flat plane grid above the landscape, I would then ray trace all the points of the grid down to the landscape and join all the hit locations together by scaling a simple mesh that has a glowing material on it and the imported length of 1.

You could always export your landscape and just model your grid over it.

As to which method would be most efficient, I would just experiment and find out myself.

Hey, first of all thanks for the decals-idea. I think its a great solution, i just didn’t knew they existed until now :smiley: What do you mean exactly by saying “make a 2d flat plane grid”? Should I just create a giant plane mesh with a grid drawn on it or procuderally generate tiles? Do you have any tutorial/link for “ray trace” at hand? (I dont know do to ray trace points or how to even start with this ^^).

Big thanks again youre ideas helped me quite a lot already! :smiley:

If you want to make a mesh that has a giant grid then it will be a paint in the bum to edit your landscape as every time you changed your landscape you would also need to change your mesh, its a very simple but work-intensive way of doing it.

If you want to design a blueprint that does the work for you. You would need to use loop and line trace nodes to achieve this. Also, you could make your grid really customizable if you wanted to.

But the best way to do it actually would probably be a simple material, all you would need is a texture that is a square that’s empty in the middle and you could scale this texture within the material itself to make it lots of tiny little squares. As you mentioned before, just add that as a landscape material and it should be fine. The only problem would be dealing with the inside of static mesh buildings, but you could just add your grid material as an overlay of the floor and align it with the landscape.

I would say that I’m intermediate at UE4 so take my advice with a pinch of salt, I don’t have enough knowledge on scripting materials this is why I might give you a bad solution.

Some line trace short tutorials:

Essential blueprint knowledge by a UE4 dev: