Editing Landscape in runtime

Hey! Im looking for something pretty straightforward.

I want to create a runtime landscape editor. It should have Height, Erosion, Smooth, and paint/Material selection available to the player. Should allow BrushSize, BrushFalloff, and BrushStrength.

Think of using the Unreal Engine landscape editor, instead i’ll be making my own for the player to use. I could hopefuly even just extend unreals way of doing it, and just disable the buttons we arent going to use.

Here’s the little gimmic.
I will then divide the landscape into x by y grid as an overlay on top of the landscape. IF they use the paint/material selection that whole cell will turn into that material/paint. That’s the only thing that the x by y grid will do, just section the landscape off so that i can be repainted/materialized into something else.

So what im asking is, what’s the best way of doing this? Any tutorials or guides out there for this?

Here’s a vid of what i have so far. But the cursor isnt working well and just terraforming my local exact position. Also the terraforming looks weird.

Hi there.

First up, this will absolutely not be straightforward :stuck_out_tongue_winking_eye:

Extending the Unreal system might seem like a good idea, and is certainly worth investigating, but getting editor modules into your game build is not going to be super simple, and is likely not a good idea for performance anyway.

I prototyped such an editor a while ago, using procedural mesh components (plural, had to chunk the map, performance was very poor with large meshes). It worked well enough but I lifted the save mesh code from somewhere else, and based on the comment I left on the dec, it may actually only work in PIE.

What mine looked like

A couple of months after that I came across a video on YT showcasing a ‘runtime landscape’ module for UE5, it had not actually been released at that time but has been now, so if this is something you are willing to pay money for, definitely worth checking out:

Thanks for the reply @silnarm! Ive been seeing the performacne issues as well. Did you end up using your runtime landscape editor? or scraped it?

And great Ive already been looking into Errant Worlds! Reaching out to them as well

I’ve seen there is this plug in https://voxelplugin.com/ out there which is free for full commercial use, what do you think about going that route? im not sure if i want voxel, because i want smooth terrains like the unreal editor and how your screenshot looks.