Procedural Terrain Generation

How would I go about procedural terrain generation? I spent a few hours researching and only finding dead ends. The closest I got was the Landscape Import Heightmap from Rendertarget node, which apparently does not work in runtime. Is there any similar nodes to that, or other ways to use heightmaps in runtime? Should I use a completely different method? Thank you for your help!

This is free: Procedural Landscape from Shader Graph w/ Geometry Clipmaps BP/C++ | Download

Generally, you need to make a landscape material and inject noise into the WPO, be sure to bake collision. That guy above does it all on the GPU shader, plenty of options for you to pick apart.

For my part, my levels are mostly static. I use the virtual heightfield mesh for snow, surface water, rocks and bumps, etc. I don’t need to modify at runtime, but since I can do a lot in the material, things like decals, RenderTargets, and whatnot can be used to inject deformations into the landscape via a material vs c++/Blueprint logic.

1 Like

Mind you, the real answer here is “don’t use unreal”.

If you were tasked with computing PI to 62trillion, you wouldn’t attempt to do so using Pentium one, in 2021… would you?

That situation is a parallel to this situation where Unreal is the equivalent to a Pentium One and almost all other engines are a Ryzen9050.

Maybe some day Epic will get their act together and release something that puts them on the map when it comes to landscapes.

So far, all they have done has been the equivalent of replacing the hamsters that make the Intel wheel of the CPU periodically rotate.

Should you be obstinate enough to still use Unreal…

Implement a custom Voxel solution. You’ll be much better off than trying to work with any landscape based object.
The only possible deterrent is the inability to just use the Grass node without modifying the engine’s source. But if you end up catering to unreal enough to make a working procedural generation system, you’ll just work around that too…

1 Like

The plugin isn’t free anymore, i added a lot of functionality and provide constant support on discord. Couldn’t reasonably let it free.
Shader World is the only GPU-accelerated procedural generation tool on the store, and the only GPU-accelerated foliage system too.

4 Likes

Hi!

You probably want to use the procedural mesh component and make voxels for your procedural terrain. You could go cubic like minecraft or use smooth them out like 7 days to die.

You’ll probably want to split the generation into chunks of voxels so you can generate and update voxels in batches. You can use various noise algorithms to determine whether each voxel is air or solid, and whether solid voxels are stone, dirt, whatever.

You’ll need to heavily optimize as much as you can.