PDA

View Full Version : Random terrain creating



agemenon
03-31-2005, 03:14 PM
I am looking for a great terrain creating algorithm. Terrain will not be so complex. It will be smooth then i will try to make my object able to move on that terrain . Can you advice such an algorithm. I found circles algoritm , do you have any idea about this algoritm.

zukko
03-31-2005, 03:23 PM
here's some explanation on the circles algorithm circles (http://www.lighthouse3d.com/opengl/terrain/index.php3?circles)
for an easy way to generate terrains you could use a heigthmap

agemenon
03-31-2005, 05:16 PM
Can you explain me the height map ?
Do they have the x,z values and heights for each x,z ? Is this a height map

uruk
03-31-2005, 07:35 PM
This:
http://img52.exs.cx/img52/5306/romhgh4bv.th.jpg (http://img52.exs.cx/my.php?loc=img52&image=romhgh4bv.jpg)
is a heightmap. A simple grayscale image, black (0x00) is the lowest and white (0xFF) the highest point.

zukko
04-01-2005, 11:32 AM
a height map is a grayscaled image, where black means the lowest height and white is the highest. depending on how high you want the 'hills' to be is the whiter its going to be.

Fahrenheit451
04-03-2005, 06:20 AM
A heightmap is simply a one or two dimentional array of VECTORs (x,y,z values) which is used to render the terrain. The height, or y values, can be generated from various algorithms like the circle, mid-point displacement, fault line, fluid simulation, hill, or from an image like those above. With the image approach you first load the image into memory (probably a 2d array also, but not VECTORS) and read off the greyscale color for each pixel and set the y value of the corresponding vertex in your heightmap.

I have a working demo you can download if you are interested, which generates a small terrain using fluid, fault, hill, mid-point, image load, and a home gown algorithm. It's a very simply test harness, so nothing too fancy, but it does demonstrate what types of terrains they generate. I might plug in that circle algorithm also.

hth
F451

zero_t9
04-04-2005, 10:58 PM
Hi, Fahrenheit451:

Where can I download your sample?

[QUOTE]Originally posted by Fahrenheit451:

Fahrenheit451
04-05-2005, 06:30 AM
Here (http://hw001.gate01.com/sean451/tmp/ProcDetTex5.zip)

The skybox textures I made with terragen make the thing bloated unfortunately - hi-res bmp's :-(

Lighting sucks, some bugs. Your milage may vary :-)

F1 for help menu