Realistic 2D terrain map generation

Wodzu picture Wodzu · Sep 19, 2009 · Viewed 15.4k times · Source

I am looking for some algorithms which allow me to generate a realistic 2D terrain map. By realistic I mean that person will consider such map as a "normal" terrain map, not created artificially. I don't want to create photorealistic map. Just something similar to maps that can be viewed in a geographical atlas.

So far I am using perlin noise for height map and then I am adding lakes, rivers, mountains, swamps and so on. You may look how it looks on the picture below:

Terrain map http://www.freeimagehosting.net/uploads/1f1e9372bf.png

I am not happy with it. It's not realistic but I can't figure out something better on my own. Time is not a matter so the algorithms may be heavy computational.

Thanks for your time.

After edit:

I think I've found one article that can be helpful: http://portal.acm.org/citation.cfm?id=1255047.1255077

However it can't be obtained for free so I am still looking for answers or ideas.

Answer

Loren Pechtel picture Loren Pechtel · Sep 20, 2009

I've played with terrain generation before. Assuming the objective is a bitmap I found a way to make things like rivers and in general make it look better: Erosion.

Once you have terrain generated by other means erode it a bit: You need the world expressed as heights of pixels. Take a spot on the map and move one unit of height to the lowest neighbor. Move the cursor to this neighbor and repeat until it doesn't move. Repeat for other pixels.

To make rivers count the number of times you pass through a location moving bits down. Spots that get hit the most are rivers.

Followup: I wasn't eroding each pixel so much as simply a large number of random pixels until it weathered enough. The reason for actually eroding them is that this carries bits down and fills in holes. Without that there can be no rivers as there will be dead that trap the flow--the flowing pixels fill in any small holes and make working waterways.

Sorry I can't give any samples, this was many years ago and while the old code is probably around somewhere I don't know where to look.