I'm looking to build maps for PLSM2 in the "laziest" way possible (i.e. procedurally). I plan to use some sort for fractal terrain generation for each page, which is then brushed/stitched together to the adjecent pages - or something like that.
The idea is to create an expansive, high-resolution set of heightmaps based off of lower detail ones. The "main"/high-level image should be RGB, with varying combinations of color indicating the *type* of terrain in that page. (Steppe, Desert, Plains, Forest, Mountains, Hills, etc.) The alpha value determines the overall/average altitude of that page/area. (To allow for oceans and such.)
The game this is being used for is somewhat of a (but not really) a flight-simulator. I hope to be using the listener to add-in (VERY large) cities/buildings.
My question is: Are there already implementations of terrain generators that can produce generic terrain heightmaps using just a few variables as a guide? (I plan to pre-process every bit of data that I possibly can. Including PVS.) I've seen lots of "by hand" editors, and those are great. But I need an entire planet's worth of heightmaps! Are there tutorials on how to manipulate reams of heightfield data?
Procedural terrain generation
- zarthrag
- Greenskin
- Posts: 128
- Joined: Sat Jul 24, 2004 9:07 am
- Location: Tulsa, Oklahoma
- tuan kuranes
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
- Contact:
- Azatoth
- Gnome
- Posts: 327
- Joined: Sat Jul 10, 2004 6:46 pm
- Location: Sweden
- x 4
- Contact:
The Mercator lib in the Worldforge project does this. You define "basepoints" (heighvalues) at an set interval (64 units), and then a heightmap is generated. There are also shaders available, which can generate cover maps for grass,snow etc.
http://www.worldforge.org/dev/eng/libraries/mercator
http://www.worldforge.org/dev/eng/libraries/mercator
- Lucky_Luciano
- Greenskin
- Posts: 136
- Joined: Mon Feb 14, 2005 9:25 pm
- Location: Belgium
Re: Procedural terrain generation
Just as a side note: if you are going to use your terrain in a flight simulator there isn't much use in calculating the PVS. When high above the terrain nothing will get culled anyway...zarthrag wrote:(I plan to pre-process every bit of data that I possibly can. Including PVS.)
PVS is only helpfull when the player walks on a rocky terrrain where the view gets obscured by many mountains/valleys.
- zarthrag
- Greenskin
- Posts: 128
- Joined: Sat Jul 24, 2004 9:07 am
- Location: Tulsa, Oklahoma
More accurately, it's a "multi-vehicle" sim. There are many mech-equivalents as well as flying things, and most of the player's flying is in close proximity to the ground/buildings. Some river-valleys are supposed to be present too. The story takes place across an entire (but not quite to scale) planet, with combat over every inch of it.
I just looked at the mercator lib right now, it's pretty close to what I need, but I can't tell if it allows varied terrain types right off the bat. It does the basics, but not quite enough.
I checked out libnoise, that's an *excellent* suggestion. By building modules to generate each selected terrain type, it's easy to build a selector that will smoothly toggle between terrain types based on the data for that sector. Writing a command-line app to preprocess maps and compress them in batches should be a snap. Additionally, A billion other things can be done with this, thanks!
I just looked at the mercator lib right now, it's pretty close to what I need, but I can't tell if it allows varied terrain types right off the bat. It does the basics, but not quite enough.
I checked out libnoise, that's an *excellent* suggestion. By building modules to generate each selected terrain type, it's easy to build a selector that will smoothly toggle between terrain types based on the data for that sector. Writing a command-line app to preprocess maps and compress them in batches should be a snap. Additionally, A billion other things can be done with this, thanks!