See what's going on with flipcode!


Submitted by , posted on 10 August 2002

Image Description, by

Here's a pair of screenshots from my Chunked LOD terrain demo. My goal was to create a hardware-friendly LOD method without too many compromises. It turned out pretty well. The system has high triangle throughput at high framerates, low CPU overhead, works within a guaranteed max pixel error, and has full geomorphing (no pops). The number of triangles rendered is higher than with a primitive-level LOD scheme like Lindstrom-Koller or ROAM, by 1.5-2x or so, but the CPU overhead is much lower. The view above is scaled down from a pair of 1024x768 screenshots. The window contains ~300K tris, and renders at around 27 fps (8.6M tris/sec) on my machine (1GHz P3, GeForce2Go). The max pixel error is set at 2.5. Better video cards provide higher framerate.

Other features:
  • Texture quadtree tiling: in the image above, the source texture is 32K x 32K texels. It's being rendered using vanilla OpenGL texture calls, using a couple hundred active quadtree tiles which are each 128 x 128.

  • Background paging: the demo can work off of large geometry and texture files on disk, only pulling in the pieces that are necessary to draw a particular view. In the image above, the dataset represents several GB of uncompressed data. The original heightfield was 16K x 16K x 16 bits, plus the texture is 32K x 32K. After preprocessing, it's about 500MB on disk (including JPEG compression of the texture data), while the demo runs within about 100MB of RAM. Most of the paging work happens in a background thread, to avoid hitches in framerate.
  • The code is all public domain, so you are encouraged to do whatever you want with it. The precompiled demo runs on Win32, but the code also compiles and runs under Linux. Try it out, and send me bugfixes!

    The homepage of the project is:

    There is more documentation there, and links to the downloads and SourceForge project.

    Image of the Day Gallery



    Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
    Please read our Terms, Conditions, and Privacy information.