Post on 18-Dec-2015
transcript
Honours Graphics 2008
Session 6
Today’s focus
• Terrain rendering
• Heightfield generation
• Level-of-detail for terrain
Terrain
Terrain, cont.
• Typically only requires a 2D data set (height field) for rendering purposes
• Height fields often generated randomly, or pertubed from basic design
• Rendered using block or continuous level-of-detail algorithms
Height fields
Height field generation
• Different approaches to height field generation
• Includes algorithms that are based on recursive faults, circular alevation, midpoint displacement
• Often followed by a post-processing step to create a sense of erosion
Midpoint displacement
Heightfield post-processing• Simulated erosion, eliminate artifacts, etc.
Terrain rendering
• Terrain data sets can exceed gigabytes of data, covering millions of data points
• The large volume of data requires effective level-of-detail handling to reduce to manageable subsets
• Comes in block or continuous LOD variants
Terrain rendering, cont.
Block LOD
Block LOD, cont.
Block LOD, cont.
LOD metrics
• For a LOD scheme it is necessary to define some metric by which the required detail level can be determined
• Simplest LOD metric: things that are further away require less detail
LOD metrics, cont.
• Typical basic LOD metric considers distance, as well as variance of the underlying structure
• Variance describes the structural complexity – flat surfaces have a low variance; while complex, articulated surfaces have a high variance
LOD metrics, cont.
• Any number of additional metrics can be considered, for example:
• FOV metric• Silhouette metric• Line of Sight metric• Actor / entity metric• PVS metric
Continuous LOD
• A number of algorithms exist that can create continuously varying level of detail meshes on a per-frame basis
• In literature sometimes known as TINs (triangulated irregular networks)
• Includes among others work by Lindstrom, Röttger, and Duchaineau
Continuous LOD, cont.
• Duchaineau, famously, created ROAM• Functions by imposing a triangular binary tree
on the terrain data and performing split and merge operations on the tree
Continuous LOD, cont.
• ROAM is a frame-coherent algorithm
• Results from the prior frame can be incrementally changed for the current frame
• Requires little change in view from prior frame – but reduces computational overhead to 2 to 5% of full computation
Continuous LOD, cont.
• Diamond terrain algorithm, by Hakl• Improves on ROAM by changing the underlying
structure from a triangle binary tree to a triangle quadtree
Continuous LOD, cont.
• Improves hardware friendliness through generating a mesh that is more tri-strip friendly
• Requires half the split / merge operations to achieve the same detail level as ROAM
Homework
• Implement a random heightfield generator and display it at various degrees of refinement using a quadtree
• Due for session 7
• …and… project
Project
• Primary project for the course
• 40% of final mark
• Implement a traversable terrain renderer, should be able to do the following:• LOD scheme• FOV culling• Sky
• Due for last session of course