Download presentation
Presentation is loading. Please wait.
Published byDelphia Lloyd Modified over 9 years ago
1
“Level of Detail Management for 3D Games” Martin Reddy Pixar Animation Studios Terrain Level Of Detail
2
Contents l Background –History, applications, data sizes l Important Concepts –regular grids v TINs, quadtrees v bintrees, out-of-core paging, web streaming l Implementations –Lindstrom 96, Duchaineau 97, Röttger 98, Hoppe 98, DeFloriani 00, Lindstrom 01 l Available software
3
Gameplay Goals for Terrain l Large enough to travel around for hours l Detailed when seen at human scale l Dynamic modification of terrain data l Runs at high, stable frame rates l Need fast rotation of viewpoint From Jonathan Blow’s SIGGRAPH 2000 Course:
4
Background l One of the first real uses of LOD l Important for applications such as –Flight simulators –Terrain-based computer games –Geographic Information Systems (GIS) –Virtual tourism, real-estate, mission planning l Sustained R&D since the 1970s l Other terms include –generalization (GIS)
5
Terrain LOD Example Screenshot of the Grand Canyon with debug view using the Digital Dawn Toolkit, now incorporated into Crystal Space Screenshot of the Grand Canyon with debug view using the Digital Dawn Toolkit, now incorporated into Crystal Space
6
Terrain LOD vs Generic LOD l Terrain is easier... –Geometry is more constrained –Normally uniform grids of height values –More specialized and simpler algorithms l Terrain is more difficult... –Continuous and very large models –Simultaneously very close and far away –Necessitates view-dependent LOD –Often requires paging from disk (out-of-core)
7
Large Terrain Databases l USGS GTOPO30 –30 arc-second (~1 km) resolution elevation –43,200 x 21,600 = 1.8 billion triangles l NASA EOS satellite ASTER –30-m resolution elevation data –from 15-m near infrared stereo imagery l USGS National Elevation Dataset (NED) –50,000 quads at around 50 GB
8
Regular Grids l Uniform array of height values l Simple to store and manipulate l Encode in raster formats (DEM, GeoTIFF) l Easy to interpolate to find elevations l Less disk/memory (only store z value) l Easy view culling and collision detection l Used by most implementers
9
TINs l Triangulated Irregular Networks l Fewer polygons needed to attain required accuracy l Higher sampling in bumpy regions and coarser in flat ones l Can model maxima, minima, ridges, valleys, overhangs, caves l Used by Hoppe 98 & DeFloriani 00
10
LOD Hierarchy Structures QuadTree Hierarchy BinTree Hierarchy
11
Quadtrees l Each quad is actually two triangles l Produces cracks and T-junctions l Easy to implement l Good for out-of-core operation
12
Bintrees l Terminology –binary triangle tree (bintree, bintritree, BTT) –right triangular irregular networks (RTIN) –longest edge bisection l Easier to avoid cracks and T-junctions l Neighbor is never more than 1 level away l Used by Lindstrom 96 & Duchaineau 97
13
Cracks and T-Junctions l Avoid cracks: –Force cracks into T-junctions / remove floating vertex –Fill cracks with extra triangles l Avoid T-junctions: –Continue to simplify...
14
Avoiding T-junctions
15
Split(BinTri *tri) { if tri->BottomNeighbor is valid { if tri->BottomNeighbor->BottomNeighbor != tri { Split(tri->BottomNeighbor) } Split2(tri) Split2(tri->BottomNeighbor) tri->LeftChild->RightNeighbor = tri->BottomNeighbor->RightChild tri->RightChild->LeftNeighbor = tri->BottomNeighbor->LeftChild tri->BottomNeighbor->LeftChild->RightNeighbor = tri->RightChild tri->BottomNeighbor->RightChild->LeftNeighbor = tri->LeftChild } else { Split2(tri) tri->LeftChild->RightNeighbor = 0; tri->RightChild->LeftNeighbor = 0; } Split2(tri) { tri->LeftChild = AllocateBinTri(); tri->RightChild = AllocateBinTri(); tri->LeftChild->LeftNeighbor = tri->RightChild tri->RightChild->RightNeighbor = tri->LeftChild tri->LeftChild->BottomNeighbor = tri->LeftNeighbor if tri->LeftNeighbor is valid { if tri->LeftNeighbor->BottomNeighbor == tri { tri->LeftNeighbor->BottomNeighbor = tri->LeftChild } else { tri->LeftNeighbor->RightNeighbor = tri->LeftChild } tri->RightChild->BottomNeighbor = tri->RightNeighbor if tri->RightNeighbor is valid { if tri->RightNeighbor->BottomNeighbor == tri { tri->RightNeighbor->BottomNeighbor = tri->RightChild } else { tri->RightNeighbor->LeftNeighbor = tri->RightChild } tri->LeftChild->LeftChild = 0 tri->LeftChild->RightChild = 0 tri->RightChild->LeftChild = 0 tri->RightChild->RightChild = 0 } Pseudo code to do triangle splitting and avoid T-junctions Code by S. McNally on GameDev.net, optimized by A. Ögren
16
Out-of-core operation l Virtual memory solutions –mmap() used by Lindstrom 01 –VirtualAlloc() / VirtualFree() used by Hoppe 98 l Explicit paging from disk –NPSNET (NPS): Falby 93 –VGIS (GVU): Davis 99 –OpenGL Performer Active Surface Def (ASD) –SGI InfiniteReality (IR) Clipmapping
17
Streaming over the Web l TerraVision (SRI) – Leclerc 94, Reddy 99
18
TerraVision Movie
19
Texture issues l Need to handle paging of imagery as well as geometry (satellite imagery resolution is generally > than elevation resolution) l Hardware support for paging (clipmaps) l Detail textures for close-to-ground detail l Texture compression useful?
20
Lindstrom et al. 1996 l One of first real-time view-dependent algorithms, referred to as continuous LOD (CLOD) l Regular grid, bintree, quadtree blocks –Mesh broken into rectangular blocks with a top-down coarse-grained simplification –Then per-vertex simplification performed within each block l Frame-to-frame coherence: –Maintain an active cut of blocks –Only visit vertices if could change in frame
21
Lindstrom et al. 1996 l Vertex removal scheme Merge based upon a measure of screen- space error between the two surfaces, Merge based upon a measure of screen- space error between the two surfaces, Used a nonlinear mapping of to represent 0..65535 in only 8 bits Used a nonlinear mapping of to represent 0..65535 in only 8 bits
22
Lindstrom et al. 1996 Hunter-Liggett US Army base 2-m res 8 x 8km 32 M polys
23
Lindstrom et al. 1996
24
Duchaineau et al. 1997 l Real-time Optimally Adapting Meshes (ROAM) l Regular grid, bintree, 2 priority queues: –1 priority-ordered list of triangle splits –1 priority-ordered list of triangle merges l Frame coherence –pick up from previous frame’s queue state l Very popular with source code and implementation notes available
25
Duchaineau et al. 1997 l “Split-Only” ROAM often used in games –Used by Seumas McNally in TreadMarks l Removes the frame coherence portion –Don’t need 2 priority-sorted queues l Implementation available as SMTerrain in the vterrain.org VTP software l Good article on Split-Only ROAM at Gamasutra by Bryan Turner
26
Duchaineau et al. 1997 ROAM Split and Merge “Diamonds”
27
Duchaineau et al. 1997 l Principal metric was screen-based geometric error with guaranteed bound on the error l Hierarchy of volumes called wedgies l Covers the (x,y) extent of a triangle and extends over the height range z-e T through z+e T
28
Duchaineau et al. 1997
29
Röttger et al. 1998 l Extended Lindstrom’s CLOD work l Regular grid, quadtree, top-down l World space metric considered: –viewer distance & terrain roughness l Integrated vertex geomorphing l Deal with tears by skipping center vertex of higher resolution adjacent edge
30
Röttger et al. 1998 Hawai’i
31
Hoppe 1998 l View-Dependent Progressive Meshes (VDPM) from Hoppe 97 applied to terrain l TIN-based, out-of-core (VirtualAlloc/Free) l Integrated vertex geomorphing l Tears between blocks avoided by not simplifying at block boundaries l Notes that larger errors can occur between grid points and precomputes maximum height deviations
32
Hoppe 1998 Grand Canyon, Arizona 4,097 x 2,049 8 x 4 blocks of 513 x 513
33
Hoppe Video
34
DeFloriani et al. 2000 l VARIANT. Uses Multi-Triangulation (MT) l General TIN approach applied to terrain l Plug in different simp. & error routines l Supports analyses: visibility, elevation along a path, contour extraction, viewshed l Frame coherence (use previous state) l Freely available C++ library for MT
35
DeFloriani et al. 2000
36
Lindstrom & Pascucci 2001 l Visualization of Large Terrains Made Easy l Regular gridded, top-down, bintree l Out-of-core with mmap() and spatial org. l Fast hierarchical culling, triangle stripping, and optional multithreading of refinement and rendering tasks l Uses a nesting of error metric terms (bounding spheres)
37
Lindstrom & Pascucci 2001 Puget Sound, Washington 16,385 x 16,385 512 MB
38
Lindstrom & Pascucci Video
39
Available Software l Virtual Terrain Project (VTP) –http://www.vterrain.org/ l TerraVision –http://terravision.sourceforge.net/ l SOAR –http://www.cc.gatech.edu/~lindstro/software/soar/ l ROAM –http://www.cognigraph.com/ROAM_homepage/ l Source code links (ROAM, VTP, MT, etc.) –http://www.LODBook.com/source/
40
Terrain Data Resources l Large Terrain Databases –http://www.cc.gatech.edu/projects/large_models/ l Terrain Models on LODBook.com –http://www.LODBook.com/terrain/ l GeoVRML Data Resources Page –http://www.geovrml.org/data/
41
End of Presentation
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.