See what's going on with flipcode!




 

Texturing My Landscape
Question submitted by Anoymous (29 June 2000)




Return to The Archives
 
  I'm having problems texturing an LOD landscape engine (using QuadTrees). Should I use one large texture for the whole thing or is there a good way to place (and change between) smaller textures on an LOD landscape engine like this? I'd like to be able to place details like dirt pathes.  
 

 
  The concept is simple: at each level of detail step, four quads are combined into a single quad (resulting in a "4:1 polygon"). Also, the four textures covering the four initial quads are sampled down (using a 2x2 box filter -- reducing each to 1/4th the total size.) These four textures are then combined into a single "4:1 texture" which gets applied to the new 4:1 polygon.

As more LODs are generated (further and further from the camera) you can reduce the textures an extra step or two.

Be careful though... at the boundaries of LODs, there will be a row of polygons, followed by a row of 4:1 polygons. In this, you'll find t-junctions. And worse, you'll find that the lower detail row doesn't match the same topography at the point of the t-junction. This means that the lower detail row needs to be tessellated to match:





Response provided by Paul Nettle
 
 

This article was originally an entry in flipCode's Ask Midnight, a Question and Answer column with Paul Nettle that's no longer active.


 

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