Now that the initial flat terrain has been created, let's have the engine generate procedural hills and valleys to make things more interesting. In most cases the procedurally generated terrain will be a starting point for a level and have to be tailored to your own game design. Note the the procedural terrain generator is not random, but produces predictable results based on the parameters you choose.
How to Generate Procedural Terrain
- Note that using the Generate Terrain tool overrides any maximum terrain height setting you've applied in Edit > Set Terrain Max Height. You can lower the highest points afterwards if it is too steep for your taste.
- In the Terrain Editor menu, navigate to File -> Generate Terrain where you'll see several sliders that will help shape the style:
- Feature Size - Determines the amount of land created.
- Bumpiness/Noise - Determines the degree of bumpiness or deformation of the surface.
- Detail - Determines the number of times that effects will be applied.
- Variation - Determines the random seeding of the islands.
- Blurring - Sets the number of times that smoothing will be applied to the noise filter.
- Cover - Determines the sharpness of the surface.
- Sharpness - Determines the number of times that the sharpness filter will be used on the surface.
- Varying these parameters will result in radically different kinds of terrain from one gentle hill to mountains to near-vertical spikes. Let's try changing the Feature Size to be 4 and clicking OK.
- Go to File -> Generate Terrain Texture. This will export our terrain texture to disk so we can play it in our final application. This will be a common step you must complete throughout your development to see the changes in the Editor look identical to that of your final game.
- Lastly, go to Terrain Editor -> Edit –> Make Isle and click it twice to get a more rounded border as you would typically find with an island.