Make Mountains in Blender from Heightmaps
Blender can make mountains from heightmaps, and this is a tutorial to show you how. The heightmap I've used is represented by a grayscale bitmap. Black being the lowest point, white the highest. Blender is able to deform a mesh based on the pixel colour of a texture.
This tutorial is for Blender versions 2.5 through to 2.79b.
When Blender is first opened there is a cube in the middle of the screen. To delete this, Right Click on the cube >> X >> ENTER.
Download a Heightmap
You will need a heightmap to work with. Download Mt Ruapehu and Mt Ngauruhoe Heightmap.png. These are two mountains found on a volcanic plateau in the North Island of New Zealand. You can make your own heightmaps by opening your favourite photo editor or painting program and using a grayscale palette to draw high areas in lighter shades and low areas with darker shades. At the end of this tutorial are links to my tutorials for sourcing heightmaps of the Earth and working with them.
Add a Grid
Add a mesh grid with 513 subdivisions by:-
- Move your mouse pointer into the 3d viewport.
- SHIFT A will bring up a menu.
- Select Grid.
- In the Toolshelf, bottom left of the window, set the X & Y subdivisions to 513.
Import the Heightmap
Click on the Texture icon in the Properties viewport.
Click on the New button.
Click the Open button under Image and navigate your filesystem to find your heightmap.
Scroll down and change the image mapping from Repeat to Extend. This will prevent artifacts occurring at the edge of the model.
Displace the Grid
Click on the Modifiers icon in the Properties viewport and add a Displace modifier.
Click on the modifier's texture icon and select the heightmap.
Change the Midlevel value to 0 and the Strength to .135.
Changing the midlevel moves the model up so the bottom is on the grid in the viewport. The strength corrects the height of the terrain. For other heightmaps a different strength value may be needed.
Below is proof of accuracy. The height of Mt Ruapehu is 2797m, Mt Ngauruhoe is 2287m, and the distance between them is 15,825m. A red box shows these distances below:-
Improve the Quality
The model is coarse. We can bring out more detail by subdividing the mesh further. Subdivision can slow your computer so we will tell Blender to display a low level when working on the model and then change to high at render time.
Add the Subdivision Surface modifier.
It will appear below the Displace modifier. We need to move it to the top of the stack so that it is applied first. Click the up arrow button.
Change the subdivision method to Simple.
Change the level of subdivision for View. 3 is optimal, but if your computer becomes sluggish, or crashes, then leave it as 1. Render at 3.
Smooth the Model
Looking closely at the terrain you will see it is made up of 'squares'. We can improve this by selecting the Smooth shader from the Toolshelf on the left of the window.