Terrain Rendering and LOD in Games - PowerPoint PPT Presentation

1 / 37
About This Presentation
Title:

Terrain Rendering and LOD in Games

Description:

overview of terrain algorithms. optimization criteria. Lindstrom algorithm. progressive meshes ... ROAM Wedgies! Wedgie basically a bounding volume ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 38
Provided by: abdennour8
Category:

less

Transcript and Presenter's Notes

Title: Terrain Rendering and LOD in Games


1
Terrain Rendering and LOD in Games
  • Abdennour El Rhalibi

2
Outline
  • overview of terrain algorithms
  • optimization criteria
  • Lindstrom algorithm
  • progressive meshes
  • ROAM
  • performance

3
Terrain Model
triangle mesh
texture image
4
The Data
  • Triangulated Irregular Networks (TIN)
  • Regular Grid Height Field
  • Tradeoffs?

5
Simplify!
  • We need to simplify our meshes!
  • Go from
  • Full Mesh -gt Simplified Mesh

6
Simplify!
  • Using view dependent metrics

actual view
overhead view
7
Overview of Terrain Algorithms
  • grid vs. TIN

8
Overview of Terrain Algorithms
  • Discrete LOD
  • Continuous LOD
  • grid-based
  • continuous LOD rendering by Lindstrom
  • Real-time Optimally Adapting Meshes (ROAM)
  • TIN-based
  • progressive meshes

9
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

10
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

11
Discrete LOD
  • The End Result of what were achieving
  • Low Detail Medium Detail Full Detail

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

13
Terrain LOD Basics 2
  • What can you do?
  • Ensure common vertices on edge of subdivision
  • 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

14
Terrain LOD Basics 3
  • Quadtrees and BinTrees

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

16
BinTrees (Binary Triangle Trees)
  • Cracks and T-junctions are solved!
  • Any two triangles differ by no more than one
    resolution level
  • A little harder to implement
  • Forced Splitting

17
Several Algorithms
  • Lindstroms Continuous LOD
  • Roettgers CLOAD Top-down version of Lindstrom
    CLOAD
  • ROAM (Duchaineau)
  • 3D Bounding Isosurfaces (Blow)
  • Caching geometry (Vis2002)
  • Visualization of Large Terrains Made Easy
  • SOAR

18
Optimization Criteria
  • time required to achieve a given triangle count
  • user specified view-dependent metrics
  • simplicity
  • strict frame rates
  • dynamic terrain
  • continuous changes
  • etc.

19
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

20
Continuous LOD by Lindstrom
  • Quad tree
  • bottom-up
  • block-basedvs.vertex-based

21
Progressive Meshes
  • PM representation
  • only single operationmerge (edge collapse)
  • split (vertex split)
  • view-dependent PM

22
ROAM
  • Real-Time Optimally Adapting Meshes
  • Mark Duchaineau, 1997
  • Binary Triangle Tree Structure
  • No need to worry about cracks
  • Can specify the desired number of triangles
  • Probably the most popular algorithm today

23
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

24
ROAM (1)
  • triangle bintree
  • top-downalgorithm
  • 2 priority queues
  • merge
  • split

25
Roam Structure
  • Triangle Subdivision

26
Binary Triangle Tree
  • Whats represented in each node of the tree

27
ROAM (2)
  • (mergeable) diamond
  • forced split gt
  • no effort to avoiddiscontinuities

28
ROAM Splitting and Merging diamonds
29
Splitting Nodes
  • Imagine the Diamond

30
Managing Splitting
  • The Recursive Split

31
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

32
What Cracks?
  • The T-Junction.

33
ROAM Wedgies!
  • Wedgie basically a bounding volume
  • Covers the (x,y) extent of a triangle and extends
    over the height range z-eT through zeT

34
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 Duchaineaus original ROAMing
Terrain paper (96)
35
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

36
Comparison
Lindstrom ROAM PM
elementary operation complex,1 vertex reduction basic,1 vertex reduction complex,2 vertices reduction
triangles rigth-isosceles rigth-isosceles introduces slivers
complexity O(mesh size) O(triangle changes) O(mesh size)
37
LOD for Games
  • Bryan Turner, gamasutra.com
  • Split-Only ROAM
  • No frame to frame coherence, but still performs
    very well
  • Seamus McNally, SMTerrain uses this same approach
  • GDC 2003 Course Materials Many notes
  • http//lodbook.com/course/2003/
Write a Comment
User Comments (0)
About PowerShow.com