Procedural Terrain

Hello again,

I was messing with the Panda3D terrain stuff lately and I was curious if anyone knew of any good resources on theory regarding making procedural terrain. My first thought was to create a heightmap and randomly distort it… but I also know what terrain has vertices that can be moved around, and I am not sure what would be the best way to manipulate the terrain. Any thoughts on how to do this or maybe even some samples (Google didn’t seem to be of much help)?


I don’t think that I know of much offhand, but have you looked at the resources and forums over at GameDev.Net?

Thanks for the reply, wasn’t exactly what I was looking for but it’s definitely a start. They seem to have a few articles on the basics, so I will definitely have some fun with their algorithms.

If you’re looking how to do procedural terrain and want to use the GeoMipTerrain, it provides an interface for that.
First acquire the heightmap by doing terrain.heightfield(), this will return a reference to the heightmap PNMImage. You can do all kinds of alterations to that.
Then, you just call generate() again to regenerate the terrain with your changes.

a very basic algorithm for creating random terrain which doesnt look too bad:

create a new heighfield image. all white.
create some large-scale noise.and substract this it from the white image.
create a noise-image at half the resolution mutiply the values by 0.5 and substract from the previous resulted image. you can continue like that.
if speed is not required you can use pandas build-in perlin noise and pnm-manipulations to create this effect.
you might find more stuff about this when you google for “rigid perlin noise”

Take a look at the tutorials section of this, it gives a pretty good overview of a number of algorithms. You could also try translating the code into python.

Thanks for the information everyone, I will definitely try your recommendations out.

if its about algorithms and such. always drop by on -> they have tons of other stuff,too. have fun :slight_smile: and if you managed to get something to work with panda. post screenshots :wink:

What is going to be the purpose of the proceduraly generated terrain? A RTS map has different requirements then a CIV style world map.

The Procedural Content Generation Wiki is a good place to start.

The ASCII Dreams is a game developers blog that talks a LOT about proceduraly generated content.