Level of Detail: Generating LODs David Luebke University of Virginia.

Slides:



Advertisements
Similar presentations
 Over-all: Very good idea to use more than one source. Good motivation (use of graphics). Good use of simplified, loosely defined -- but intuitive --
Advertisements

Surface Simplification using Quadric Error Metrics Guowei Wu.
Surface Simplification Using Quadric Error Metrics Speaker: Fengwei Zhang September
Efficient access to TIN Regular square grid TIN Efficient access to TIN Let q := (x, y) be a point. We want to estimate an elevation at a point q: 1. should.
View-Dependent Simplification of Arbitrary Polygonal Environments David Luebke.
HLODs: Hierarchical Levels of Detail Hierarchical Simplifications for Faster Display of Massive Geometric Environments Carl Erikson, Dinesh Manochahttp://
Developer’s Survey of Polygonal Simplification Algorithms Based on David Luebke’s IEEE CG&A survey paper.
Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova.
Visibility Culling using Hierarchical Occlusion Maps Hansong Zhang, Dinesh Manocha, Tom Hudson, Kenneth E. Hoff III Presented by: Chris Wassenius.
Object-Space Visibility Culling Anthony Steed University College London Based upon material presented by Claudio T. Silva at Eurographics 1999 Slides,
UVA / UNC / JHU Perceptually Guided Simplification of Lit, Textured Meshes Nathaniel WilliamsUNC David LuebkeUVA Jonathan D. CohenJHU Michael KelleyUVA.
4.4. L EVEL OF D ETAIL Exploration of 3D mesh level-of-detail approaches.
5/1/2000Deepak Bandyopadhyay / UNC Chapel Hill 1 Extended Quadric Error Functions for Surface Simplification Deepak Bandyopadhyay COMP 258 F2000 Project.
High-Quality Simplification with Generalized Pair Contractions Pavel Borodin,* Stefan Gumhold, # Michael Guthe,* Reinhard Klein* *University of Bonn, Germany.
CS CS 175 – Week 4 Mesh Decimation General Framework, Progressive Meshes.
Haptic Rendering using Simplification Comp259 Sung-Eui Yoon.
View-Dependent Refinement of Progressive Meshes Hugues Hoppe Microsoft Research SIGGRAPH 97.
Mesh Simplification Global and Local Methods:
Smooth View-Dependent Level-of- Detail Control and its Application to Terrain Rendering Hugues Hoppe Microsoft Research.
Visualization and graphics research group CIPIC January 21, 2003Multiresolution (ECS 289L) - Winter Dynamic View-Dependent Simplification for Polygonal.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 11: Quadric Error Metrics Ravi Ramamoorthi Some material.
Visualization and graphics research group CIPIC January 21, 2003Multiresolution (ECS 289L) - Winter Surface Simplification Using Quadric Error Metrics.
ECS 289L A Survey of Mesh-Based Multiresolution Representations Ken Joy Center for Image Processing and Integrated Computing Computer Science Department.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 10: Mesh simplification Ravi Ramamoorthi Many slides courtesy.
Navigating and Browsing 3D Models in 3DLIB Hesham Anan, Kurt Maly, Mohammad Zubair Computer Science Dept. Old Dominion University, Norfolk, VA, (anan,
10/14/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Level of Detail.
Surface Simplification Using Quadric Error Metrics Michael Garland Paul S. Heckbert.
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Quadric Error Metrics 1/20 Quadric Error Metrics.
Level of Detail David Luebke University of Virginia.
Viewpoint Entropy-driven Simplification Pascual Castelló 1, Mateu Sbert 2, Miguel Chover 1 and Miquel Feixas 2 1 Universitat Jaume I de Castelló, Spain.
Dynamic Meshing Using Adaptively Sampled Distance Fields
Presented By Greg Gire Advised By Zoë Wood California Polytechnic State University.
Level of Detail & Visibility: A Brief Overview David Luebke University of Virginia.
10/02/2001CS 638, Fall 2001 Today Level of Detail Overview Decimation Algorithms LOD Switching.
DPL10/16/2015 CS 551/651: Simplification Continued David Luebke
Level of Detail: Choosing and Generating LODs David Luebke University of Virginia.
Surface Simplification Using Quadric Error Metrics Garland & Heckbert Siggraph 97.
Triangular Mesh Decimation
Levels of Detail COMP 770 3/25/09. Problem Models can be very detailed Look great when close up Last week we explored one way of attacking this problem.
Real-Time Rendering & Game Technology CS 446/651 David Luebke.
Interactive Rendering With Coherent Ray Tracing Eurogaphics 2001 Wald, Slusallek, Benthin, Wagner Comp 238, UNC-CH, September 10, 2001 Joshua Stough.
10/23/2001CS 638, Fall 2001 Today Terrain –Terrain LOD.
Mesh Coarsening zhenyu shu Mesh Coarsening Large meshes are commonly used in numerous application area Modern range scanning devices are used.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 8 Ravi Ramamoorthi
Level of Detail Management for Games David Luebke University of Virginia Introduction, Overview.
Hierarchical Error-Driven Approximation of Implicit Surfaces from Polygonal Meshes Takashi Kanai Yutaka Ohtake Kiwamu Kase University of Tokyo RIKEN, VCAD.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 7 Ravi Ramamoorthi
Surface Simplification Using Quadric Error Metrics Michael Garland Paul S. Heckbert August 1997 Michael Garland Paul S. Heckbert August 1997.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 9 Ravi Ramamoorthi
Solid Modeling 2002 A Multi-resolution Topological Representation for Non-manifold Meshes Leila De Floriani, Paola Magillo, Enrico Puppo, Davide Sobrero.
ALGORITHMS FOR POLYGON REDUCTION Author: Ing. Roman Schulz FIT VUT, 2008.
Level of Detail: Generating LODs David Luebke University of Virginia.
CSE554Contouring IISlide 1 CSE 554 Lecture 5: Contouring (faster) Fall 2015.
CSE554Contouring IISlide 1 CSE 554 Lecture 5: Contouring (faster) Fall 2013.
DPL2/10/2016 CS 551/651: Final Review David Luebke
David Luebke2/12/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
Mesh Resampling Wolfgang Knoll, Reinhard Russ, Cornelia Hasil 1 Institute of Computer Graphics and Algorithms Vienna University of Technology.
Rendering Large Models (in real time)
DPL3/9/2016 CS 551/651: Simplification Continued David Luebke
DPL3/10/2016 CS 551/651: Simplification Continued David Luebke
Advanced Computer Graphics (Spring 2013) Mesh representation, overview of mesh simplification Many slides courtesy Szymon Rusinkiewicz.
CSL 859: Advanced Computer Graphics Dept of Computer Sc. & Engg. IIT Delhi.
Real-Time Rendering & Game Technology CS 446/651 David Luebke.
1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.
CSE 554 Lecture 5: Contouring (faster)
Level of Detail: A Brief Overview
CS475 3D Game Development Level Of Detail Nodes (LOD)
Today Runtime LOD Spatial Data Structures Overview
Chap 10. Geometric Level of Detail
Run-Time LOD Run-time algorithms may use static or dynamic LOD models:
Presentation transcript:

Level of Detail: Generating LODs David Luebke University of Virginia

Review: Generating LODs Measuring error –Image-based ideas See Lindstrom & Turk, SIGGRAPH 2000

Review: Generating LODs Measuring error –Hausdorff distance One-sided: Two-sided: –Common approximations: Measure vertex-vertex distance, vertex-plane distance METRO: Sample H(A,B) by sprinkling points on triangles Quadrics: a variation of vertex-plane distance

Quadric Error Metric Goal: minimize distance to all planes at a vertex –Actually: minimize sum of squared distances to all planes Plane equation for each face: 0 :p  DCzByAx v           1 z y x DCBA T vp Distance to vertex v :

Squared Distance At a Vertex    )( ))(( vplanesp TT vppv    )( )( v p TT vppv v v vplanesp TT            )(    )( 2 )()( v p T vpv

Quadric Derivation (cont’d) pp T is simply the plane equation squared: The pp T sum at a vertex v is a matrix, Q:  vQvv T  )(              DCDBDAD CDCBCAC BDBCBAB ADACABA pp T

Q Construct a quadric Q for every vertex Q1Q1 Q2Q2 v2v2 v1v1 Q 1 T 1 Qvvcost edge  Sort edges based on edge cost –Suppose we contract to v 1 : –v 1 ’s new quadric is simply: Q 21 QQ  The edge quadric: Using Quadrics

Optimal Vertex Placement Each vertex has a quadric error metric Q associated with it –Error is zero for original vertices –Error nonzero for vertices created by merge operation(s) Minimize Q to calculate optimal coordinates for placing new vertex –Details in paper, involves inverting matrix –Authors claim 40-50% less error

Boundary Preservation To preserve important boundaries, label edges as normal or discontinuity For each face with a discontinuity, a plane perpendicular intersecting the discontinuous edge is formed. These planes are then converted into quadrics, and can be weighted more heavily with respect to error value.

Preventing Mesh Inversion Preventing foldovers: Calculate the adjacent face normals, then test if they would flip after simplification If foldover, that simplification can be weighted heavier or disallowed A A merge

Quadric Error Metrics Pros: –Fast! (70K poly bunny to 100 polygons in seconds) –Good fidelity even for drastic reduction –Robust -- handles non-manifold surfaces –Aggregation -- can merge objects

Quadric Error Metrics Cons: –Introduces non-manifold surfaces (bug or feature?) –Needs further extension to handle color (e.g., use 7x7 matrices)

View-Dependent LOD: Algorithms l Many good published algorithms: –Progressive Meshes by Hoppe [SIGGRAPH 96, SIGGRAPH 97, …] –Merge Trees by Xia & Varshney [Visualization 96] –Hierarchical Dynamic Simplification by Luebke & Erikson [SIGGRAPH 97] –Multitriangulation by DeFloriani et al –Others…

l I’ll describe (surprise) my own work –Algorithm: VDS Implementation: VDSlib –Similar in concept to most other algorithms Overview: The VDS Algorithm

l Overview of the VDS algorithm: –A preprocess builds the vertex hierarchy, a hierarchical clustering of vertices –At run time, clusters appear to grow and shrink as the viewpoint moves –Clusters that become too small are collapsed, filtering out some triangles

Data Structures l The vertex hierarchy –Represents the entire model –Hierarchy of all vertices in model –Queried each frame for updated scene l The active triangle list –Represents the current simplification –List of triangles to be displayed –Triangles added and deleted by operations on vertex tree

The Vertex Hierarchy l Each node in vertex hierarchy supports a subset of the model vertices –Leaf nodes support a single vertex from the original full-resolution model –The root node supports all vertices l For each node we also assign a representative vertex or proxy

The Vertex Tree: Folding And Unfolding A A 3 Fold Node A Unfold Node A l Folding a node collapses its vertices to the proxy l Unfolding the node splits the proxy back into vertices

Vertex Tree Example ABC D 3 E R Triangles in active list Vertex hierarchy

Vertex Tree Example ABC D 3 E R A Triangles in active list Vertex hierarchy

Vertex Tree Example BC D 3 E R A 3 A Triangles in active list Vertex hierarchy

Vertex Tree Example BC D 3 E R A 3 B A Triangles in active list Vertex hierarchy

Vertex Tree Example C D 3 E R A 3 B 8 9 AB Triangles in active list Vertex hierarchy

Vertex Tree Example C D 3 E R A 3 B C 8 9 AB Triangles in active list Vertex hierarchy

Vertex Tree Example D 3 E R A 3 B C ABC Triangles in active list Vertex hierarchy

Vertex Tree Example E D 3 R A 3 B C E ABC Triangles in active list Vertex hierarchy

Vertex Tree Example C D 3 R A B E AB E Triangles in active list Vertex hierarchy

Vertex Tree Example C103 R B E D A AB DE Triangles in active list Vertex hierarchy

Vertex Tree Example AC103 R B E D B DE Triangles in active list Vertex hierarchy

Vertex Tree Example AC103 R R B E D B DE Triangles in active list Vertex hierarchy

Vertex Tree Example ABC10 D 3 E R R Triangles in active list Vertex hierarchy

The Vertex Tree l At runtime, folds and unfolds create a cut or boundary across the vertex tree: This part of the model is represented at high detail This part in low detail

The Vertex Tree: Livetris and Subtris A 3 Fold Node A Unfold Node A Node->Subtris : triangles that disappear upon folding Node->Livetris : triangles that just change shape l Two categories of triangles affected:

The Vertex Tree: Livetris and Subtris l The key observation: –Each node’s subtris can be computed offline to be accessed quickly at run time –Each node’s livetris can be maintained at run time, or lazily evaluated upon rendering

View-Dependent Simplification l Any run-time criterion for folding and unfolding nodes may be used l Examples of view-dependent simplification criteria: –Screenspace error threshold –Silhouette preservation –Triangle budget simplification –Gaze-directed perceptual simplification

Screenspace Error Threshold l Nodes chosen by projected area –User sets screenspace size threshold –Nodes which grow larger than threshold are unfolded

Silhouette Preservation l Retain more detail near silhouettes –A silhouette node supports triangles on the visual contour –Use tighter screenspace thresholds when examining silhouette nodes

Triangle Budget Simplification l Minimize error within specified number of triangles –Sort nodes by screenspace error –Unfold node with greatest error, putting children into sorted list Repeat until budget is reached

View-Dependent Criteria: Other Possibilities l Specular highlights: Xia describes a fast test to unfold likely nodes l Surface deviation: Hoppe uses an elegant surface deviation metric that combines silhouette preservation and screenspace error threshold

View-Dependent Criteria: Other Possibilities l Sophisticated surface deviation metrics: See Jon’s talk! l Sophisticated perceptual criteria: See Martin’s talk! l Sophisticated temporal criteria: See Ben’s talk!

Implementing VDS: Optimizations l Asynchronous simplification –Parallelize the algorithm l Exploiting temporal coherence –Scene changes slowly over time l Maintain memory coherent geometry –Optimize for rendering –Support for out-of-core rendering

l Algorithm partitions into two tasks: l Run them in parallel Simplify Task Render Task Active Triangle List … Asynchronous Simplification Vertex Tree

Asynchronous Simplification l If S = time to simplify, R = time to render: –Single process = (S + R) –Pipelined = max(S, R) –Asynchronous = R l The goal: efficient utilization of GPU/CPU –e.g., NV_FENCE extension for asynchronous rendering

Temporal Coherence l Exploit the fact that frame-to-frame changes are small l Three examples: –Active triangle list –Vertex tree –Budget-based simplification

Exploiting Temporal Coherence l Active triangle list –Could calculate active triangles every frame –But…few triangles are added or deleted each frame –Idea: make only incremental changes to an active triangle list n Simple approach: doubly-linked list of triangles n Better: maintain coherent arrays with swapping

Unfolded Nodes Boundary Nodes Exploiting Temporal Coherence l Vertex Tree –Few nodes change per frame –Don’t traverse whole tree –Do local updates only at boundary nodes

Temporal Coherence: Triangle Budget Simplification l Exploiting temporal coherence in budget- based simplification –Introduced by ROAM [Duchaineau 97] –Start with tree from last frame, recalculate error for relevant nodes –Sort into two priority queues n One for potential unfolds, sorted on max error n One for potential folds, sorted on min error

Temporal Coherence: Triangle Budget Simplification l Then simplify: –While budget is met, unfold max node n This is the node whose folding has created the most error in the model –While budget is exceeded, fold min node n This is the node that introduces the least error when folded –Insert parents and children into queues Repeat until error max < error min

Optimizing For Rendering l Idea: maintain geometry in coherent arrays Active trianglesInactive triangles Unfolded nodesInactive nodesBoundary nodes

Optimizing For Rendering l Idea: use swaps to maintain coherence Unfolded nodesInactive nodesBoundary nodes ABCDEFGHIJKLMNOPQ Fold node D:

Optimizing For Rendering l Idea: use swaps to maintain coherence Unfolded nodesInactive nodesBoundary nodes ABCDEFGHIJKLMNOPQ Fold node D: Swap D with F

Optimizing For Rendering l Idea: use swaps to maintain coherence Unfolded nodesInactive nodesBoundary nodes ABCDEFGHIJKLMNOPQ Fold node D: Swap D with F

Optimizing For Rendering l Idea: use swaps to maintain coherence Unfolded nodesInactive nodesBoundary nodes ABCFEDGHIJKLMNOPQ Fold node D: Swap D with F

Optimizing For Rendering l Idea: use swaps to maintain coherence Unfolded nodesInactive nodesBoundary nodes ABCFEDGHIJKLMNOPQ Fold node D: Move Unfolded/Boundary Marker

Optimizing For Rendering l Idea: use swaps to maintain coherence Unfolded nodesInactive nodesBoundary nodes ABCFEDGHIJKLMNOPQ Fold node D: Deactivate D’s children (swap w/ last boundary node)

Optimizing For Rendering l Idea: use swaps to maintain coherence Unfolded nodesInactive nodesBoundary nodes ABCFEDGHLJKIMNOPQ Fold node D: Deactivate D’s children (swap w/ last boundary node)

Optimizing For Rendering l Idea: use swaps to maintain coherence Unfolded nodesInactive nodesBoundary nodes ABCFEDGHLJKIMNOPQ Fold node D: Deactivate D’s children (swap w/ last boundary node)

Optimizing For Rendering l Idea: use swaps to maintain coherence Unfolded nodesInactive nodesBoundary nodes ABCFEDGHLJKIMNOPQ Fold node D: Deactivate D’s children (swap w/ last boundary node)

Optimizing For Rendering l Idea: use swaps to maintain coherence Unfolded nodesInactive nodesBoundary nodes ABCFEDGKLJHIMNOPQ Fold node D: Deactivate D’s children (swap w/ last boundary node)

Optimizing For Rendering l Idea: use swaps to maintain coherence Unfolded nodesInactive nodesBoundary nodes ABCFEDGKLJHIMNOPQ Fold node D: Deactivate D’s children (swap w/ last boundary node)

Optimizing For Rendering: Vertex Arrays l Biggest win: vertex arrays –Actually, keep separate parallel arrays for rendering data (coords, colors, etc) Unfolded nodesInactive nodesBoundary nodes Vertex array!

Optimizing For Rendering: Vertex Arrays on GeForce2 Plain old triangles Triangles using vertex arrays Vertex arrays in fast memory

Out-of-core Rendering l Coherent arrays lend themselves to out- of-core simplification and rendering: … These need to be in memory…These do not

Out-of-core Rendering l Coherent arrays lend themselves to out- of-core simplification and rendering: –Only need active portions of triangle and node arrays –Implement arrays as memory-mapped files n Let virtual memory system manage paging n A prefetch thread walks boundary nodes, bringing their children into memory to avoid glitches

Summary: VDS Pros l Supports drastic simplification! –View-dependent; handles the Problem With Large Objects –Hierarchical; handles the Problem With Small Objects –Robust; does not require (or preserve) mesh topology

Summary: VDS Pros l Rendering can be implemented efficiently using vertex arrays l Supports rendering of models much larger than main memory

Summary: VDS Cons l Increases CPU, memory overhead l Hard to map efficiently onto GPU for efficient utilization

Summary: VDS Cons l Be aware of mesh foldovers:

A 7 Summary: VDS Cons l Be aware of mesh foldovers: 8

Summary: VDS Cons l Be aware of mesh foldovers: A

Summary: VDS Cons l Be aware of mesh foldovers: –These can be very distracting artifacts –Can prevent them at run-time n Add a normal-flipping test to fold criterion n Use a clever numbering scheme proposed by El- Sana and Varshney

View-Dependent Versus Discrete LOD l View-dependent LOD is superior to traditional discrete LOD when: –Models contain very large individual objects (e.g., terrains) –Simplification must be completely automatic (e.g., complex CAD models) –Experimenting with view-dependent simplification criteria

View-Dependent Versus Discrete LOD l Discrete LOD is often the better choice: –Simplest programming model –Reduced run-time CPU load –Easier to leverage hardware: n Compile LODs into vertex arrays/display lists n Stripe LODs into triangle strips n Optimize vertex cache utilization and such

View-Dependent Versus Discrete LOD l Applications that may want to use: –Discrete LOD n Video games (but much more on this later…) n Simulators n Many walkthrough-style demos –Dynamic and view-dependent LOD n CAD design review tools n Medical & scientific visualization toolkits n Terrain flyovers (much more later…)

Continuous LOD: The Sweet Spot? l Continuous LOD may be the right compromise on modern PC hardware –Benefits of fine granularity without the cost of view-dependent evaluation –Can be implemented efficiently with regard to n Memory n CPU n GPU

l Implementation: VDSlib –A public-domain view-dependent simplification and rendering package –Flexible C++ interface lets users: n Construct vertex trees for objects or scenes n Specify with callbacks how to simplify, cull, and render them –Available at VDSlib

VDSlib: Ongoing Work l Ongoing research projects using view- dependent simplification: –Out-of-core LOD for interactive rendering of truly massive models –Perceptually-guided view-dependent LOD, including gaze-directed techniques –Non-photorealistic rendering using VDSlib as a framework