Skip to end of metadata
Go to start of metadata

Generating terrain automatically is a quick way of making a level, but if you already have an idea of what you want it to look like, it may require a lot of sculpting of this terrain, depending on what you want the level to look like. If you don't have a clear idea yet and you just want to get some ideas as you go along, then this is a nice start.

To generate a heightmap, go to the right side panel and click the Terrain Editor tab. In this tool, choose File -> Generate Terrain. You'll be presented with the following window:

For now, we'll just click OK to generate a randomized map. However, in the future, you can adjust the values so that a different randomized map will be generated.

You're probably now inside of the texture that's been generated. Move backwards with the S key to view your freshly created island (holding Shift while moving will make you move faster).


Scrolling the mouse wheel backwards or forwards (while moving around the Viewport) changes your speed of movement. Mouse wheel forward = faster, mouse wheel backwards = slower.

Your level now looks a little like this:

This is quite an unnatural looking piece of terrain.

Set Terrain Max Height

What has happened here is that the XY dimensions of the level are correct (we set them to 128x128). However, the Z value is far too high, as its standard value is 1024. So we get a terrain that's 128x128x1024.

To transform this into a more usable heightmap go to the Terrain Editor -> Edit -> Set Terrain Max Height.

Give it a low value, lower than the 128 we set for the X and Y dimensions, for example 40. The top of the terrain will now be completely flattened, but this is fine:

Now generate the terrain again (Terrain Editor -> File -> Generate Terrain). You'll see that we have lost the huge cliff faces and acquired a much flatter landscape, because the height is now set to a much more reasonable value. The outcome will be different every time, because it's randomly generated, but you'll definitely see an improvement in the height of the terrain:

Move the camera to this island, jump in game and try it out (CTRL+G). This is the best way to get an idea of the scale of the world you are creating.

When you have had a good look round your world press the Esc key to jump out of game mode.

We are almost ready to save our level, but first we need to reset the max height to 1024 because leaving it at 40 would cause the terrain to not be generated properly in the topics that we cover subsequently. To do this, we'll go to Terrain Editor -> Edit -> Set Terrain Max Height again and set the max height to 1024.