Realistic terrain generation!

Started by
2 comments, last by steflanz 23 years, 3 months ago
I downloaded and tried many terrain generators. I need them for my landscape 3d engine. I have a problem: it seems that all the terrains generated with these programs are suitable for an "eagle-fly" view of the terrain, now for a person-walking over the terrain- view. I need a terrain which is huge, but has a range of heights from the 1-meter roughness of the terrain to the ,say, 2 km of the highest mountain. I CANNOT create such a terrain with any programs. Probably it is possible, but I do not use the correct size of the map or the correct scale of the terrain to do this. I want a terrain where you can sit down near a tree, and watch around you valleys and high mountains, a REAL terrain! Not a flying simulator, it''s boring. The only game where I''ve seen such a wonderful thing is "Project IGI" : I can walk on the terrain, and watch high mountains 4 km away.........and I can reach them! Can anyone help me ? A question: TGA ----> height values ?? I save heightmaps (greyscaled) as TGA files, what is the correct way to get the height value (say between 0...1) from the RGB value of the TGA image? Thanks in advance, I need your help! 3d coder
3d coder
Advertisement
It''s very easy to create simple terrain ala Everquest (which is pretty much what you''re asking for?). So most people don''t do it because it''s not really a challenge. However if you get into tree structures for terrain you can come up with stuff like Sacrifice or TreadMarks.

The very simplest method (which anyone can do) is just a brute force grid of right-triangles with a height-map. Each pixel on your height-map corresponds to a triangle vertex. Based on a triangle size of your choice you can then set up an array of triangle vertices. If your triangle size is very large you will find your landscape looking blocky but expansive. If it''s small, it will look rounder but less expansive. In either case, it''s key to smooth areas you want to be hilly, and sharpen areas you want to be rocky. This can easily be done with any paint program on your height map.

The problem with this method is that it can be pretty slow, but there are ways of camouflaging this. Doing basic culling is a given, but some games make you move *very* slowly over this type of terrain to make you think it''s big. Secondly, adding fog just before the clipping plane helps.

Lastly, by using right triangles you''ve made it very easy to move a camera over the terrain instead of above it. It''s easy to figure out which triangle the camera is on since two triangles make up a quad, and you can use atan2 to avoid the hypotenuse problem. Then, since you know what triangle the camera is on you can use the point-in-plane formula to determine the player''s height on your terrain as he moves.

That''s about as easy as it gets.



I don''t understand exactly what you want, but I have terrain generation program and engine on me site www.laeuchli.com/jesse/
If you want to terrain generation program, write to me, and I can send you the source and the latest version.
The engine from Trespasser was pretty good for open wide distances. Check out www.trespasser.com for some pics.

"Never pet a burning dog." - Warcraft II

This topic is closed to new replies.

Advertisement