Archived

This topic is now archived and is closed to further replies.

Terrain

This topic is 5836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites