1 / 32

Terrain Level of Detail

Terrain Level of Detail. John Tran Computer Science Department University of Virginia <jdt6a@cs.virginia.edu>. Why Terrain LOD?.

ramya
Télécharger la présentation

Terrain Level of Detail

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Terrain Level of Detail John Tran Computer Science Department University of Virginia <jdt6a@cs.virginia.edu>

  2. 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)

  3. The Data • Regular Grid Height Field • Triangulated Irregular Networks (TIN) • Tradeoffs?

  4. 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

  5. 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

  6. Terrain LOD Basics • Cracks, T-junctions • How do we solve this?

  7. 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

  8. Terrain LOD Basics 3 • Quadtrees and BinTrees

  9. Easy to implement Each quad is actually two triangles Still have cracks and T-junctions Quadtrees

  10. 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)

  11. Several Algorithms • Lindstrom’s Continuous LOD • ROAM (Duchaineau) • 3D Bounding Isosurfaces (Blow) • Caching geometry (Vis2002) • Visualization of Large Terrains Made Easy • SOAR

  12. 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

  13. ROAM • 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

  14. 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

  15. ROAM – Splitting and Merging diamonds

  16. 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?

  17. 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

  18. 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)

  19. 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

  20. 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

  21. 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

  22. 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

  23. 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

  24. 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)

  25. 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

  26. 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)

  27. 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!

  28. Visualization of Large Terrains Made Easy τ = 2 pixels 79,382 triangles τ = 4 pixels 25,100 triangles τ = screen space error threshold

  29. 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

  30. 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

  31. More Problems with Terrain LOD • QuadTIN (VIS2002) • Large Textures • Paging/Streaming and Out-of-core Techniques

  32. Summary • Any questions?

More Related