What technique is used to procedurally texture terrain?

When I search procedural terrain generation most tutorials come up with a plane and height map approach, and use the up coordinate to shade the mesh in different colors and this technique usually result in gradient slopes. However, in many games the rock face and cliff faces are texture and modelled differently. Can anyone share how these are usually procedurally generated and textured?

The only naïve approach I can think of is to model terrain blocks – like tilemap tiles, but 3D – and assemble them together. Is there a smarter to to do this?

Search for tri-planar shader. This is a technique where the shader looks at the normal of the vertex and blend textures together. The shader will take a grass texture (for example) and perhaps 2 rock textures. It will then assign the grass texture to normals facing up and rock to the normals facing to the sides. It also blends between them

There are several ways to generate terrain. The heightmap way you mentioned is a popular one. Sebastian Lague has a great series on youtube regarding that technique. Games like Valheim uses this technique and I’m currently working on a game that does, too.

It has it’s downsides like not being able to have overhangs, etc. but for that he also has a high-level tutorial on marching cubes, which is another technique. Games like Astroneer and I believe No Man’s Sky uses marching cubes in some way. I’ve used this, but it’s a lot of processing and requires a bit of thinking (and DOTS) to help it go quick. Unless you do it with compute shaders - which I know nothing about.
Sebastian Lague

Then you can check out Jonas Tyroller who made a game called Islanders. He used a technique of placing premade assets procedurally and explains a bit of how it works somewhere on his youtube channel
Jonas Tyroller

Lastly, I’d mention Oskar Stålberg who made Townscaper and Bad North. You can find lots of info on Wave Function Collapse (that he used). It’s quite an advanced technique in my opinion.
Oskar doesn’t have a youtube channel, but here are some stuff on youtube:
Bad North
Townscaper

List of all the games I mentioned (on steam - no affiliation)
Heightmap
Valheim
Marching Cubes
Astroneer
No Man’s Sky
Premade Assets
Islanders
Wave Function Collapse
Townscaper
Bad North

Privacy & Terms