Terrain

Started by
3 comments, last by Sepsis 22 years, 3 months ago
Hey all. I am having trouble with terrain. I know that there are several ways of doing this i.e. Fractal, Fault, Isometric, Particle Deposition. I would like to make one using Fractal or Fault generation. The only problem is that I don''t know where to start.. I have some algorithims on them, but I need some help implementing them to OpenGL...so..if anyone could help..just a basic overview of how it''s done would be great! Yours Truly, Cory
Advertisement
Just use your algorithms to create a triangle mesh, which you then pass to OpenGL to render.

-----------------------
0wn 0wn 0wn your goat
gently down the pw33n
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
http://www.vterrain.org

-----------------------
glDisable(WORK);
glEnable(GL_CODING);
-----------------------Current Project: The Chromatic Game Engine
just buy "Game Programming Gems" (Mark Deloura). The first book has very good articles about it, but they are a bit hard to understand.

1 - Generate a heightmap
2 - Generate triangle strips from heightmap

You''ve been reading about number 1. Number 2 is probably easier. Here''s the simplest way. Each row of your terrain is a triangle strip. Add the verteces to the list in the following order:

2___4 __6___8|\  |\  |\  || \ | \ | \ |   ...I''m sure you can see the pattern!|__\|__\|__\|1  3    5   7 


Send each of these as a GL_TRIANGLE_STRIP to OpenGL.

This topic is closed to new replies.

Advertisement