Archived

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

building a simple TERRAIN?

This topic is 5958 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

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!

Share this post


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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I''m not robert, but I''m still going to thank you for the links. They will help me, so thanks!

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites