Landscape generation

See inside
Notes and Credits

Calculating realistic landscapes is a complex and time consuming process. It takes 30 seconds on a top end computer or many minutes on a slower machine. I highly recommend viewing the program using Phosphorus for a 15x or more increase in speed

Quick instructions
1) SPACE BAR toggles visibility of controls
2) RENDER is fast and should be pressed after changing angle, palette or backdrop
3) GENERATE is slow and should be pressed after altering size or roughness

Detailed instructions
You can alter a landscape's appearance by using the buttons at the bottom of the screen and then pressing RENDER to redraw the scene. This is a fast process.

ANGLE - sets the angle from which the landscape is viewed. The default viewing angle is 120 degrees. The other side of the landscape faces away from the light and contains far more shadows.

PALETTE - there are five palettes to choose from. They give very different appearances to the landscape from snowy mountains through to a mars-like appearance.

BACKDROP - ten backdrops have been included which completely alter the feeling of the landscape.

You can create entirely new landscapes by adjusting the size and roughness buttons at the top of the screen and then pressing the REGENERATE button. This will cause an entire landscape to be recalculated and so is a lengthy process.

SIZE - smaller sizes are generated much quicker.

ROUGHNESS - allows you to generate anything from smooth rolling hills (1) to incredibly jagged mountains (5).

Finally, real-time rotation is allowed (in Phosphorus only). It works best on a fast computer.

ROTATION - controls the speed at which the landscape rotates in either direction. Set it back to zero to stop the rotation.

Have a break for some light relief
If you've read this far, you probably need a break! I may as well take this opportunity to promote a couple of my games!

New Rally X -
Scramble -

Background information
I played around with a few techniques and settled on one where I create a smoothed random grid and iterate across it using fractional Brownian motion to control how craggy the resultant terrain is. I then add lighting from a selected angle and apply a non-linear palette to make the mountains fade slightly towards the bottom as well as displaying a pleasant lighting effect. The final data is essentially a height map and a colour map which I render using a front to back voxel technique for speed.

Shared: 4 Jun 2017 Modified: 24 Jun 2017
Favorite this project 1054
Love this project 1395
Total views 19208
View the remix tree  14
More projects by RokCoder