Skip to main content
gamedev.net
🔒 Locked

Terrain

Started by Sepsis 3 replies 250+ views
Original Post
Sepsis
Sepsis
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
Maximus
Maximus
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
Keef
Keef
http://www.vterrain.org

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

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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.