Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: simple TERRAIN?

  1. #1
    Member Contributor
    Join Date
    May 2001
    Location
    United Kingdom - London
    Posts
    71

    simple TERRAIN?

    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!

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Vancouver BC Canada
    Posts
    417

    Re: simple TERRAIN?

    Why not take a look at what FlightGear has done? (http://www.flightgear.org/)


    mmmmm Free Software.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Greece
    Posts
    477

    Re: simple TERRAIN?

    Regarding terrain tuts.There's a good one on gamasutra.com by Bryan Turner based on a version of the ROAM algorithm by the late Seumas McNally.It's not too simple,but not too complicated either and there's code for it in C++.There are others as well but this is the simplest one,I came up with about ROAM.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Karlsruhe, Germany
    Posts
    360

    Re: simple TERRAIN?

    I wouldn't use ROAM nowadays, its too CPU intensive and takes almost no advantage of the very fast graphics cards available today. I wouldn't start with a terrain.

    I prefer doing things down-up. Think what you may need:

    1. math routines for graphics and collision detection
    2. efficient and easy to use file IO
    3. think about how to organize stuff in 3D (data structures)
    4. visibility deternimation (VERY important for a terrain engine)
    5. how is you collision detection supposed to work
    6. physics (aerodynamics for a flight sim, collision response)
    7. terrain engine (efficient and good-looking)
    8. support for wide range of hardware (LOD)
    9. input & sound
    10. hmm, there a lot more...

    The order is unintesional. Think what you need more and what is not so important.
    Point 3 is very very important. Its not easy do organize your classes so that they are easy to use, easy to maintain, extensible and fast in execution (rendering speed).

    As far as terrain goes, there are many LOD algorithms out there but only a few a suitable for today's hardware and these few are not the best-looking. The problem with many terrain LOD algorithms is that they are very CPU intensive, thus not taking advantage of faster graphics pipeline. (Example: I've implemented ROAM and its gave me ~200000 triangles/second, without any LOD I get up to 3500000 triangles/second (fully textured and lit)). So its may be better to use a not-so-CPU intensive algorithm, which will allow you to push more geometry.

    Another big problem with terrain is texturing. Most flight sims have a problem that textures appear very blurry in a close-up terrain view. Is it better to use a unique texture or to use tiled textures? You decide for your project.

    There are many more aspects to consider, and enough work to do ...

    Hope this helps,
    -Lev

  5. #5
    Member Contributor
    Join Date
    May 2001
    Location
    United Kingdom - London
    Posts
    71

    Re: simple TERRAIN?

    thanx all! I am sure this will help! at least now I have some ideas!
    This seems to be not too easy stuff but....
    I have to do it!. One day hopefuly when I finish this project I'll post it here to help others! Thank you again!

  6. #6
    Senior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Cambridge, England
    Posts
    190

    Re: simple TERRAIN?

    Lev, I also found ROAM to be way too CPU intensive. You say that there are other algorithms better suited to modern hardware, which ones are they?

  7. #7
    Senior Member Regular Contributor
    Join Date
    May 2001
    Posts
    200

    Re: simple TERRAIN?

    is you have a look at the older crytek x-isle demo (geforce3 enhanced!) they dont use any terrain LOD at all. They do carry out some visibility (horizon) culling so they dont render chunks of island that are not visible BUT they basically chuck 60K+ poly's at the card as static geomatry and get 60fps on my P750+GF3.

    However, there is a place for ROAM (or other split/merge type LOD schemes.) I want to render an entire planet. I can't do this with brute force - it would need billions (at least!) of vertices to map an entire globe. I use a subset of ROAM to maintain a dynamic bintree. Yes it's CPU intensive but I can start way out and zoom way in and get 10m resolution (terrain generated in realtime using Noise3 based function)

    Rob J.

  8. #8
    Senior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Karlsruhe, Germany
    Posts
    360

    Re: simple TERRAIN?

    Don't disturb:

    one could use a multi resolution terrain, which has high memory requirenments though. I.e. you store a patch of say 32x32 vertices in 5 different resolutions and depending on a distance to the vew point you choose the appropriate resolution. This should be faster than ROAM with same triangle count, but it also gives more "popping". Well, but since its faster you can insrease detail level and the popping won't be that bad.

    -Lev

  9. #9
    Senior Member Regular Contributor nickels's Avatar
    Join Date
    Feb 2000
    Location
    Colorado
    Posts
    284

    Re: simple TERRAIN?

    The TIN (Triangulated Irregular Network) algorithm is the most efficient. It takes a field of elevation points and finds the point that is furthest from the current triangulation (which starts with two triangles covering the area). Now add the worst point, retriangulate, and repeat.
    This comes up with a non-uniform triangulation (the disadvantage), but with far less triangles and a better looking approximation to terrain. Combine this with some LOD switching and you have a scheme that many of the best IG's (Image Generators) use.

  10. #10
    Senior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Karlsruhe, Germany
    Posts
    360

    Re: simple TERRAIN?

    the irregularity is a _big_ disandantage when it comes to texturing, texture coordinates have to be genereted each frame, no good.

    1. long winded
    2. speed penalty

    Though I argree, TIN produces the best looking terrain with minimal triangle count of almost all many LOD algorithms.

    -Lev

Page 1 of 3 123 LastLast

Similar Threads

  1. Simple Cube not Showing up with simple Example ...
    By tmason in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-26-2014, 11:42 PM
  2. Terrain Generation / Displaying terrain
    By _Syndic in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 05-06-2013, 04:29 AM
  3. shaders, simple to well a bit more than simple :)
    By Andy Gilbert in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-22-2010, 08:05 AM
  4. how to do an simple terrain?
    By MofuX in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-04-2001, 01:15 PM
  5. simple TERRAIN?
    By robert_s in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 06-14-2001, 05:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean