terrain level of detail
Skip this Video
Download Presentation
Terrain Level of Detail

Loading in 2 Seconds...

play fullscreen
1 / 32

Terrain Level of Detail - PowerPoint PPT Presentation

  • Uploaded on

Terrain Level of Detail. John Tran Computer Science Department University of Virginia <[email protected]>. Why Terrain LOD?.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Terrain Level of Detail' - ramya

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
terrain level of detail

Terrain Level of Detail

John Tran

Computer Science Department

University of Virginia

why terrain lod
Why Terrain LOD?
  • “It seems you can’t shake a stick in the world of terrain visualization without hitting a reference to LOD Terrain Algorithms” –Bryan Turner (gamasutra.com)
the data
The Data
  • Regular Grid Height Field
  • Triangulated Irregular Networks (TIN)
  • Tradeoffs?
terrain lod vs traditional lod
Terrain LOD vs Traditional LOD
  • Easier
    • Constrained geometry (generally)
    • More specialized and simpler algorithms
  • Harder
    • Continuous and large models
    • Simultaneously very close and far away
    • Necessitates view-dependent LOD
    • Out-of-core

From Martin Reddy’s 2002 SIGGRAPH course

a discrete lod approach
A Discrete LOD approach
  • View-Independent, camera location-dependent
  • Still involves subdividing terrain
    • Render closer subdivisions at higher resolution
  • Popping
  • Will get cracks and T-junctions
terrain lod basics
Terrain LOD Basics
  • Cracks, T-junctions
  • How do we solve this?
terrain lod basics 2
Terrain LOD Basics 2
  • Can’t use edge/vertex collapse techniques from last lecture – Why not?
  • What can you do?
    • Ensure common vertices on edge of subdivision
      • Looks awkward
    • Draw a triangle to fill that spot
    • Force a crack into a T-junction
  • There must be an easier way…
    • Subdivide the terrain such that this is easier or done for free
terrain lod basics 3
Terrain LOD Basics 3
  • Quadtrees and BinTrees
Easy to implement

Each quad is actually two triangles

Still have cracks and T-junctions

bintrees binary triangle trees
A little harder to implement

Forced Splitting

Cracks and T-junctions are solved!

Any two triangles differ by no more than one resolution level

BinTrees (Binary Triangle Trees)
several algorithms
Several Algorithms
  • Lindstrom’s Continuous LOD
  • ROAM (Duchaineau)
    • 3D Bounding Isosurfaces (Blow)
    • Caching geometry (Vis2002)
  • Visualization of Large Terrains Made Easy
    • SOAR
continuous lod for height fields
Continuous LOD for Height Fields
  • Peter Lindstrom et al., 1996
  • Used a binary vertex tree
  • Frame-to-frame coherence
  • Introduced user-controllable screen space error threshold
  • Real-Time Optimally Adapting Meshes
  • Mark Duchaineau, 1997 (LLNL)
  • Binary Triangle Tree Structure
    • No need to worry about cracks, etc
  • Can specify the desired number of triangles
  • Probably the most popular algorithm today
roam main concepts
ROAM – Main Concepts
  • Split and Merge
  • Two priority queues
    • One for splits and one for merge
    • Allows for frame-to-frame coherence
  • Error Metrics for Splits and Merges
  • Geomorphing – introduced, but rarely needed
  • Incremental triangle stripping introduced
roam priority queues
ROAM – Priority Queues
  • One priority queue for splits, one for merges, and use a greedy algorithm to triangulate
  • Priority = error metric
    • Nested world space bounds
    • Geometric screen distortion
    • Line of site
    • How do we calculate these error metrics?
roam wedgies
ROAM – Wedgies!
  • Wedgie – basically a bounding volume
    • Covers the (x,y) extent of a triangle and extends over the height range z-eT through z+eT
roam splitting algorithm
ROAM – Splitting Algorithm

Let T = the base triangulation

For all t in T, insert t into Q

While T is too small or inaccurate

Identify highest priority t in Q

Force-split t

Update split queue as follows:

Remove t and other split triangles from Q

Add any new triangles to Q

Adapted from Duchaineau’s original ROAMing Terrain paper (96)

roam merging and splitting
ROAM – Merging AND Splitting
  • Splitting is straightforward, but so is merging
  • Make two priority queues, Qs and Qm
  • Add another check:

if T is too large or too accurate

identify lowest priority elements T and TB in Qm

Merge (T, TB)

Update queues:

Remove all merged children from Qs

Add merge parents T, TB to Qs

Remove T, TB from Qm

Add all newly-mergeable diamonds to Qm

roam notes
ROAM – Notes
  • Also need to check if the previous frame is finished rendering and update priorities for all elements if not
  • For more details on algorithm, read the ROAMing Terrain paper
roam demo
ROAM – Demo
  • Bryan Turner, gamasutra.com
  • “Split-Only ROAM”
  • No frame to frame coherence, but still performs very well
  • Seamus McNally, SMTerrain uses this same approach
bounding roam with 3d isosurfaces
Bounding ROAM with 3D Isosurfaces
  • Jonathon Blow (2000)
  • ROAM doesn’t work well for densely sampled data – large number of unnecessary wedgie calculations
  • Screen-space error metrics compress 3D geometric data into a 1D scalar value
  • Instead, use all 3 dimensions, and have bounding volumes (spheres) determine visibility
  • 65% less triangles than ROAM
caching geometry
Caching Geometry
  • Josh Levenberg, Vis2002
    • “Fast View-Dependent Level-of-Detail Rendering Using Cached Geometry”
    • Not yet published
  • Uses ROAM, but also caches geometry of “aggregate triangles” on the video card (VAR)
  • Claim 4x faster with caching
visualization of large terrains made easy
Visualization of Large Terrains Made Easy
  • P. Lindstrom and V. Pascucci (Vis2001)
  • Few dozen lines of C-code
  • Uses regular grid bintree
  • Now implemented as SOAR (Stateless, One-pass adaptive Refinement)
visualization of large terrains made easy 2
Visualization of Large Terrains Made Easy (2)
  • Focus on “the manner in which the data is laid out to achieve good memory coherency”
    • Using mmap system call
    • Let the OS take care of paging
visualization of large terrains made easy 3
Visualization of Large Terrains Made Easy (3)
  • “Longest edge bisection”
    • Monotonic!
    • Implicit parent-child relationships – no need for priority queues
  • Represent this mesh using a DAG of the vertices
  • They used a nested sphere hierarchy for object space and screen space testing (similar to Blow)
visualization of large terrains made easy 4
Visualization of Large Terrains Made Easy (4)
  • Separate threads for rendering and geometry updates
  • Mesh refinement, view frustum culling, and FULL triangle stripping
  • All done in one pass over the mesh
    • No Frame-to-frame coherence needed!
visualization of large terrains made easy28
Visualization of Large Terrains Made Easy

τ = 2 pixels

79,382 triangles

τ = 4 pixels

25,100 triangles

τ = screen space error threshold

implementing a terrain in your scene graph
Implementing a terrain in your Scene Graph
  • Anyone have tips?
  • Most games use a modified ROAM algorithm
    • Although a static approach may be easy, it will be inaccurate and it will show
  • Keep the terrain fairly small if possible
    • i.e. Don’t have a 10k x 10k grid if you only want to show a single mountain
implementing a terrain in your scene graph30
Implementing a terrain in your Scene Graph
  • Where to go for more info?
    • LODbook.com
    • Virtual Terrain Project (www.vterrain.org)
    • Duchaineau’s ROAM homepage (www.cognigraph.com/ROAM_homepage/)
    • SOAR (www.cc.gatech.edu/~lindstro/software/soar/)
  • There are other basic algorithms
    • ie TIN-based algorithms
more problems with terrain lod
More Problems with Terrain LOD
  • QuadTIN (VIS2002)
  • Large Textures
  • Paging/Streaming and Out-of-core Techniques
  • Any questions?