Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Best OpenGL-friendly terrain algorithm

  1. #1
    Member Newbie
    Join Date
    Feb 2008
    Location
    Budapest
    Posts
    36

    Best OpenGL-friendly terrain algorithm

    My question is surely a bit naive but I was curious about other's opinions about this very simple question: what is in your opinion the most suitable terrain algorithm to be hardware-accelerated using OpenGL?

    I am at the point of deciding what terrain algorithm implement for my OpenGL project and the two most probable solutions I found are:
    1- Geometry Clipmaps: http://research.microsoft.com/~hoppe/#gpugcm
    2- Plain Geomipmapping like Ogre3D and Irrlicht do: http://www.flipcode.com/archives/Fas...pMapping.shtml

    The ROAM 2 algorithm seems also interesting and suitable to be accelerated by modern GPUs but couldn't find enough information about its internal working.

    What do you think is the algorithm with the best tradeoff between performances and coding simplicity? From this point of view geomipmapping to me seems still the safest choice.

    It would be very interesting to know what problems / performance issues other programmers found meanwhile coding their OpengGL terrain engine and what algorithms they use.

  2. #2
    Senior Member OpenGL Guru knackered's Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    2,833

    Re: Best OpenGL-friendly terrain algorithm

    depends on the scale of the terrain you're rendering.

    geoclipmapping (the GPU-enhanced version)
    pros:
    low batch count, very fine controllable incremental updates from system memory to video memory (eliminating frame rate stutters during updates). Altitude makes no difference to CPU overhead. Geomorphing is easy.
    cons:
    needs SM3.0 hardware, is a bit complicated to code, quite difficult to combine with other types of terrain geometry (like drop-in local terrain meshes).

    geomipmapping
    pros:
    simple to code, easy to combine with drop-in terrain meshes, doesn't require any particular hardware features.
    cons: (only did a quick test implementation years ago, so maybe these things are solvable)
    quite high batch counts with altitude, so CPU burden goes up as you go up. Geomorphing is a bit more fiddly.

  3. #3
    Member Newbie
    Join Date
    Feb 2008
    Location
    Budapest
    Posts
    36

    Re: Best OpenGL-friendly terrain algorithm

    Thanks knackered,
    I also ran into some papers from IRIS about clipmaps and they seem to be similar in some way to John Carmack's Megatexture algorithm.

    See for example:
    http://www.cs.virginia.edu/~gfx/Cour...ng/Clipmap.pdf
    http://developer.download.nvidia.com...0/Clipmaps.pdf

    I think there should be an OpenGL extension that supports clipmaps (like DX10 does) but couldn't find it.

    Did anyone tried the clipmaps-megatexture kind of approach using OpenGL?

  4. #4
    Senior Member Regular Contributor
    Join Date
    Aug 2007
    Posts
    107

    Re: Best OpenGL-friendly terrain algorithm


  5. #5
    Senior Member Regular Contributor
    Join Date
    Oct 2002
    Location
    San Diego, CA, USA
    Posts
    209

    Re: Best OpenGL-friendly terrain algorithm

    When I was working with terrain, I found that the SOAR terrain technique was rather well suited. http://www.cc.gatech.edu/~lindstro/software/soar/

    Back then, of course, there wasn't much in the way of shaders, but what really impressed me about this algorithm is that it didn't lag out when the viewpoint turns quickly, like ROAM implementations and other terrain LOD techniques did. This algorithm leverages the cache rather than looking up data in RAM. It's rather interesting.

  6. #6
    Member Newbie
    Join Date
    Feb 2008
    Location
    Budapest
    Posts
    36

    Re: Best OpenGL-friendly terrain algorithm

    Thanks 147-2, the SOAR algorithm seems very interested also because supports out of core databases which is a feature that I would need at some point. Implementing out of core databases doesn't seem trivial at all with geometry clipmaps. Another big doubt I have about geometry clipmaps is the management of spherical terrains.
    If I'm not wrong also OpenSceneGraph uses a terrain engine that is very similar to (if not based on) SOAR.

  7. #7
    Junior Member Newbie
    Join Date
    Mar 2007
    Location
    Berlin, Germany
    Posts
    6

    Re: Best OpenGL-friendly terrain algorithm

    Quote Originally Posted by HollanErno
    Implementing out of core databases doesn't seem trivial at all with geometry clipmaps.
    This should be no problem at all, you just load the tiles you need. I'm using geometry clipmaps with images larger than two terabytes (>25gb compressed) on commodity pcs. See http://www.zib.de/clasen/?page_id=31 for a general overview on how to update the geometry clipmap.

    Quote Originally Posted by HollanErno
    Another big doubt I have about geometry clipmaps is the management of spherical terrains.
    This has been solved two years ago, see http://www.zib.de/clasen/?page_id=6 .

    And if you want to download the source code for all of this, check out https://svn.zib.de/lenne3d/ . Binaries are available at https://svn.zib.de/lenne3d/install/current/win32_vc9/ .

    Malte

  8. #8
    Member Newbie
    Join Date
    Feb 2008
    Location
    Budapest
    Posts
    36

    Re: Best OpenGL-friendly terrain algorithm

    Thanks Malte! Congratulations for the huge job done! The techniques described in your papers to me seem the more advanced, general and complete terrain system I ever saw till now, it's basically my dream-terrain-engine made reality! Now I got to study a lot of stuff it seems...

    Thanks again and keep up the great job!

  9. #9
    Member Newbie
    Join Date
    Feb 2008
    Location
    Budapest
    Posts
    36

    Re: Best OpenGL-friendly terrain algorithm

    Malte: just one question, does your program uncompress on the fly the database? If so, what compression scheme do you use, arithmetic coding?

    About the paper on arithmetic coding you published: aren't there patent issues on using such algorithm?

    Thanks

  10. #10
    Senior Member OpenGL Guru knackered's Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    2,833

    Re: Best OpenGL-friendly terrain algorithm

    you could also just look into ray casting into a clipmap stack.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 06-23-2009, 11:59 PM
  2. Math-friendly matrices?
    By apeternier in forum OpenGL: General
    Replies: 17
    Last Post: 01-18-2008, 12:25 PM
  3. GPU friendly data
    By melliott in forum COLLADA
    Replies: 1
    Last Post: 03-17-2005, 11:37 AM
  4. Replies: 3
    Last Post: 04-02-2001, 08:26 AM
  5. How an Ortho W-Friendly Projection Matrix must look???
    By rlopez3d in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 03-30-2001, 03:14 AM

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