honours graphics 2008 session 6. today’s focus terrain rendering heightfield generation...
TRANSCRIPT
![Page 1: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/1.jpg)
Honours Graphics 2008
Session 6
![Page 2: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/2.jpg)
Today’s focus
• Terrain rendering
• Heightfield generation
• Level-of-detail for terrain
![Page 3: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/3.jpg)
Terrain
![Page 4: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/4.jpg)
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
![Page 5: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/5.jpg)
Height fields
![Page 6: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/6.jpg)
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
![Page 7: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/7.jpg)
Midpoint displacement
![Page 8: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/8.jpg)
Heightfield post-processing• Simulated erosion, eliminate artifacts, etc.
![Page 9: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/9.jpg)
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
![Page 10: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/10.jpg)
Terrain rendering, cont.
![Page 11: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/11.jpg)
Block LOD
![Page 12: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/12.jpg)
Block LOD, cont.
![Page 13: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/13.jpg)
Block LOD, cont.
![Page 14: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/14.jpg)
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
![Page 15: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/15.jpg)
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
![Page 16: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/16.jpg)
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
![Page 17: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/17.jpg)
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
![Page 18: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/18.jpg)
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
![Page 19: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/19.jpg)
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
![Page 20: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/20.jpg)
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
![Page 21: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/21.jpg)
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
![Page 22: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/22.jpg)
![Page 23: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/23.jpg)
Homework
• Implement a random heightfield generator and display it at various degrees of refinement using a quadtree
• Due for session 7
• …and… project
![Page 24: Honours Graphics 2008 Session 6. Today’s focus Terrain rendering Heightfield generation Level-of-detail for terrain](https://reader034.vdocuments.mx/reader034/viewer/2022050714/56649d215503460f949f614a/html5/thumbnails/24.jpg)
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