flipCode - Tech File - Alex Champandard [an error occurred while processing this directive]
Alex Champandard
Click the name for some bio info

E-Mail: alex@base-sixteen.com

   08/11/1999, The Right Landscape Engine For You!

Firstly I'd like to appologise for the lack of updates. I've been extremely busy on various projects, many of which you will find out about pretty soon, others you may be familiar with since I have been working on them for quite a while now. As you may have noticed, most of these projects focus on landscape rendering. I'd like to share a bit of the experience I gained.

Firstly voxel engines. The most common voxel engines, like OpenVL are only capable of rendering the world with 4 degrees of freedom (no looking up and down). If you can put up with that limitation, then that type of voxel engine is the best choice. Implementing level of detail is really easy, just like clipping. Most current voxel engines are not textured, or at least a texture at a very big scale just like a lightmap. But tile based texturing can easily be implemented (see http://atlas.cs.york.ac.uk/~ajc116/OpenVL.html ). It is also possible to render the vertically textured spans with hardware acceleration, making the engine run that much faster. If well implemented, the changes in LOD in this case will be much less noticeable.

There is another type of voxel engine, more generic this time since it can render at 6 DOF, like in the demo Toasted (Cubic Team) and the popular game Outcast. This gives the player much more freedom, but at the cost of speed. Indeed, the 4 DOF engines only need a single ray cast per vertical line. The 6 DOF engines need one ray cast per pixel! Hence the loss of speed. 6 DOF voxel engines would be my choice for rendering photo realistic but not realtime landscapes.

Fractal landscapes are amazing. You can randomly generate a landscape at any LOD, of any size, as far in the distance as you wish! This is fine as long as the landscape is not to be "played" on, so this method is not ideal for games. Fair enough, you can roughly determine what the landscape will look like by seeding the first few passes. To do this you can design a very small version of the landscape (32x32) and use the fractal algorithm to fill in the gaps. You can also precalculate the "would have been random" values to make sure the landscape will tessellate in the same way on any PC.

The ROAM algorithm is another LOD method that can split the landscape into variable size triangle meshes. This implies that a large heightmap of the landscape is kept in memory. I'm not too familiar with this algorithm. I just felt it needed to be mentionned since some future games (in development) will use it.

Another alternative is bezier patches. The advantage being you can generate a perfectly smooth landscape over which you have total control. The disadvantage being it's more of a hassle to make the landscape look varied (not all perfect curves), but creating a good editor would solve that problem. Another problem that may arise is texturing, depending on how regular your patches are. If you stick with grid aligned patches, you should be ok. As for LOD, bezier patches are ideal. You can easily tessellate according to depth, and accordng to angle with the camera. But one of many problems that arises with LOD is inter patch cracking., which you can easily fix with edge collapsing. This would be my choise for a future game engine, even though it would imply the most work.

As you may have noticed, most of these ideas are LOD based. I'm pretty much convinced that will be a key factor for landscape engines in the near future, especially for being able to draw far into the distance. It's a gamble to take LOD for granted (like Drakan does, pfff :P ), since client processing power varies hugely. Even though it's a lot more work to include LOD, I strongly recommend it. And don't take my word for which type of engine to use, do some of your own research :)

  • 01/05/2002 - A.I., Websites and Voxels
  • 03/05/2001 - State Of The Art Character Animation
  • 01/24/2001 - Alternate Programming Languages
  • 01/11/2001 - The Sound Of Silence
  • 09/20/2000 - Engine prototypes, yet more landscape LOD and hard body physics
  • 07/13/2000 - Good Practice (TM)
  • 06/13/2000 - Revision Week Indeed
  • 04/11/2000 - Escape From Inactivity ;)
  • 01/05/2000 - Generic Shaders
  • 12/03/1999 - Start Of Term: Lots Of Good Intensions :)
  • 10/06/1999 - Dynamic LOD, Landscape Generation and much more...
  • 09/22/1999 - Water Contest Entry: Rendering Raytraced Refraction with 3D Hardware
  • 09/16/1999 - More About Bezier Patches And Fractals
  • 08/11/1999 - The Right Landscape Engine For You!
  • 07/12/1999 - Leftovers From The Contest: Fixing TP7's Runtime Error 200 bug
  • 07/01/1999 - Introduction

  • This document may not be reproduced in any way without explicit permission from the author and flipCode. All Rights Reserved. Best viewed at a high resolution. The views expressed in this document are the views of the author and NOT neccesarily of anyone else associated with flipCode.

    [an error occurred while processing this directive]