building a simple TERRAIN?

Started by
6 comments, last by robert_s 22 years, 7 months ago
Hi all!! I would like to design a very simple Flight Simulator. I have a quite good understanding of C++ and a basic knowledge in OpenGL. Now! the question is what sould be the first step to design a flight simulator. I don''t have a clue how to start it. I thought about creating terrain first!? but I am sure its wrong! Can anyone give me some clues?. By the way does anyone know where I could find some good tutorials or sites on how to create Terrains from scratch with some code examples? or anyone have a source code taken from some book or something that has a very simple terrain that I could learn from. I just want to see how it works. I have the red book but surprisingly there is nothing about it. Thanks for any help!
Advertisement
Hi
One possibility to make a terrain is the use of heightmaps. If you don''t want to optimise your engine it is actually simple. If you don''t know what a heightmap is, have a look at this.

And from the top, your polygons looks like this.

Perhaps it helps a little bit.

kudi

The problem of Object Oriented Programming:Everybody tells you how to use his classes, but nobody how not to do it !
I''m not robert, but I''m still going to thank you for the links. They will help me, so thanks!
Thx all! You helped me alot!
This forum is really cool thing!
Still working on it!

One more question if you don''t mind - Should I draw the wireframe for the whole area in one go? even if it is not visible? and then put the texture on the visible part?

I don''t know what you mean by "draw the wireframe first" why draw a wireframe at all? Just draw the heightfield (or whatever) as texture-mapped polygons...

Oh, and don''t cross-post to multiple forums, it makes it hard for people answering to know which topic to answer to... I use the "Active Topics" link to see what''s new in all topics anyway, so even if it''s in the wrong forum, chances are I''ll see it. I assume others do the same?

War Worlds - A 3D Real-Time Strategy game in development.
Hi Dean!
wireframe - I meant thousands of rendered triangles.
Before you apply your textures to the heightmap you see just a big wireframe (many triangles). that's what I meant. sorry!
heightmap yeah!
any ideas?

Edited by - robert_s on June 14, 2001 10:38:44 PM
Erm no you dont, when you pass the vertices to the API of your choice, you pass texturing information at the same time. You''ll only see a wireframe if thats what you tell it to render as.

As for drawing it all and only texturing whats visible, why not just draw only whats visible??

Divide your heightmap up into a quad-tree, then do frustum culling on each of the nodes as you walk the tree. If you make it to the end of a branch, draw the node there, else continue on walking the tree.
-----------------------"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
But if you want to use several textures (bitmaps), how could you do? In the vertex information of your mesh there is no reference to any texture.
Saiz

This topic is closed to new replies.

Advertisement