View Full Version : Making Height Fields in GIMP

10-25-2007, 02:31 PM
Here is a technique on making height fields in GIMP. I am 100% positive this can also be done in any program that supports layers and layer blending modes, so feel free to experiment.

This was the starting point for my Random Map technique (http://www.cartographersguild.com/showthread.php?t=1046), and this will be one part of a full tutorial...but because there was interest, I decided to get out this part now.

This is also an evolution of the Not so Random Coast method (http://www.cartographersguild.com/showthread.php?t=875).

This will take a few posts due to the attachment limit.

1) This is the basic. Create three layers. Fill the lower one with rendered clouds. On the middle one, draw the general shape you want (white on black), then gaussian blur it a lot and set its mode to overlay. Fill the top layer with white, and set its mode to lighten only.

2) Now open the brightness/contrast dialog (top layer), and start dragging the brightness down. As it becomes grey, you will start to see the island start to appear. When dark enough, you should have a nice, random looking cloud:

3) At this point, you can use the magic wand to select the background (non-land), making sure "sample merged" is checked. Now you can create a new white layer, fill the selection with black, run an edge detection filter on it, and invert it. Congratulation! A not-so random coastline!

Save out the heightfield as a png (NOT JPG)

Make the Mountains

4) repeat the same process, and make sure you choose a new seed for the clouds. You can also use more detailed clouds, to make the mountain to be rougher looking...

5) It is convenient to keep the outline from the last step on top, here to draw the mountain shapes inside the lines.

6) Save out the heightfield as a png (NOT JPG)

Combine the two heightfields

7) Load the two heightfields in as layers, land on the bottom and mountain on top (not that it mappers). Set the top one to addition blend mode

Note you WILL have over-bright blowouts, as the two layers add up to more than 255 brightness. To fix this, both layers have to be adjusted down.

Adjust each layer to the span you want, using the levels tool.

Here I set the land layer from black to 25% (dark grey), and the mountains from black to 75% (light grey).

8) Save out the heightfield as a png (NOT JPG)

9) You can take this into whatever program (here I used POV) and render the heightfield.

Adjust if desired

Those were pretty nice, but if you want mountains that are steeper, and more distinct from the surrounding land, do the following.

10) Working with the last, final heightfield, open up the curves dialog, and reshape the curve:

This flattens the lowlands, and makes the mountain steeper.

11) Save out the heightfield as a png (NOT JPG)

12) and render it again


-Rob A>

10-25-2007, 04:00 PM
Oh Rob you angel! I've been struggling for the last 3 hours to replicate it.

(and fighting off the wife ack: 'you're obsessed!' comments.)

Edit: I've been playing with this for a few hours now and the amount of control that this method gives you as to where to place mountains, making canyons where you want them, making cliffs on one side of the mountain and a smooth gradient on the other etc. is phenomenal. Cheers Rob, that was a truly superb contribution. Dare I say it, a real breakthrough in 3d mapping.

The only thing I can't quite get is the noise filter to do as well as yours. Any chance you could post a png of the effect, seamless tiled as a downloadable (1024x1024)?