R Real-Time Rendering l Ti R d i (Echtzeitgraphik) (Echtzeitgraphik) Dr. Michael Wimmer wimmer@cg tuwien ac at wimmer@cg.tuwien.ac.at
Levels of Detail
Basic Idea Problem: even after visibility, model may contain too many polygons contain too many polygons Idea: Simplify the amount of detail used to render small or distant objects Known as levels of detail (LOD) Known as levels of detail (LOD) Multiresolution modeling, polygonal simplification, geometric simplification, mesh i lifi ti t i i lifi ti h reduction, decimation, multiresolution modeling, … Vienna University of Technology 3
Definition Polygonal simplification methods simplify the polygonal geometry of small or distant objects polygonal geometry of small or distant objects Does not change rasterization Fragment count remains roughly identical Note: Note: Levels of detail, but: Level-of-detail rendering NOT: level of details! NOT: level of details! Vienna University of Technology 4
Traditional Approach Create levels of detail (LODs) for each object in a preprocess (or by hand): in a preprocess (or by hand): 10,108 polys l 1,383 polys l 474 polys l 46 polys l Vienna University of Technology 5
Traditional Approach At runtime, distant objects use coarser LODs: LODs: Vienna University of Technology 6
LOD Issues LOD generation Simplification methods Simplification methods How to reduce polygons Error measures Error measures Which polygons to reduce Runtime system R ti t LOD framework Which LODs are eligible LOD selection Criteria for which LODs are selected LOD switching g How to avoid artifacts Vienna University of Technology 7
Runtime system LOD framework Discrete Continuous (a.k.a. progressive) View-dependent e depe de t LOD selection Static (distance/projected area-based) Static (distance/projected area based) Reactive (react to last frames rendering time) Predictive (cost/benefit model) Predictive (cost/benefit model) LOD switching Hard switching (popping artifacts!) Hard switching (popping artifacts!) Blending (ill-defined because of z-buffer!) Geomorph Geomorph Vienna University of Technology 8
Creating LODs Main topic of this lecture! Si Simplification methods (“operators”) lifi ti th d (“ t ”) Geometry Edge collapse … Topology What criteria to guide simplification? Visual/perceptual criteria are hard Visual/perceptual criteria are hard Geometric criteria are more common Vienna University of Technology 9
Simplification Operators Local geometry simplification Iteratively reduce number of geometric Iteratively reduce number of geometric primitives (vertices, edges, triangles) Topology simplification Reducing number of holes tunnels cavities Reducing number of holes, tunnels, cavities Global geometry simplification Vienna University of Technology 10
Local Geometry Simplification Edge collapse Vertex-pair collapse Triangle collapse Triangle collapse Cell collapse Cell collapse Vertex removal General geometric replacement Vienna University of Technology 11
Edge Collapse v a Edge collapse v v new v b Vertexsplit p Hoppe, SIGGRAPH 96 ; Xia et al., Visualization 96 ; Hoppe, SIGGRAPH 97 ; Bajaj et al., Visualization 99 ; Gueziec et al. , CG&A 99 ; … Vienna University of Technology 12
v a Half-edge collapse Vertexsplit p 13 Half-Edge Collapse v a Vienna University of Technology v b
Watch for Mesh Foldovers v a Edge collapse v c c v d v new v b v d v c Calculate the adjacent face normals, then test if they would flip after simplification if they would flip after simplification If so, that simplification can be weighted heavier or disallowed heavier or disallowed Vienna University of Technology 14
Implementation: Watch for Identical / Non- Manifold Tris Edge collapse v a v v new v b Vienna University of Technology 15
Vertex-Pair Collapse v a Vertex pair collapse v v new v b Vertexsplit p Schroeder, Visualization 97 ; Garland & Heckbert, SIGGRAPH 97 ; Popovic & Hoppe, SIGGRAPH 97 ; El-Sana & Varshney, Eurographics 99 ; … Vienna University of Technology 16
Triangle Collapse Triangle i l collapse v a v c c v v new v b Hamann, CAGD 94 ; Gieng et al ., IEEE TVCG 98 Vienna University of Technology 17
Cell Collapse Grid based: Rossignac & Borrel, Modeling in Computer Graphics 93 g g p p Octree-based: Luebke & Erikson, SIGGRAPH 98 Vienna University of Technology 18
Vertex Removal Vertex Triangulation removal v a v a Schroeder et al., SIGGRAPH 92 ; Klein & Kramer, Spring Conf. On Comp. Graphics 97 Kl i & K S i C f O C G hi 97 Vienna University of Technology 19
General Geometric Replacement Replace a subset of adjacent triangles by a simplified set with same boundary simplified set with same boundary “Multi-triangulation ” Fairly general: can encode edge collapses, vertex removals and edge flips vertex removals, and edge flips Vienna University of Technology 20
Discussion / Comparison Edge collapse and triangle collapse: Simplest to implement Support geometric morphing across levels of detail Support non-manifold geometry Full edge vs half edge collapses: Full-edge vs. half-edge collapses: Full edge represents better simplifications Half-edge is more efficient in incremental encoding Half edge is more efficient in incremental encoding Cell collapse: Simple, robust Varies with rotation/translation of grid Vertex removal vs edge collapse H l Hole retriangulation is not as simple as edge collapse t i l ti i t i l d ll Smaller number of triangles affected in vertex removal Vienna University of Technology 21
Simplifying Geometry vs Topology Pure geometric simplification not enough Vienna University of Technology 22
Local Topology Simplification Collapsing vertex pairs (“pair contraction”) / virtual edges virtual edges Schroeder, Visualization 97 Popovic and Hoppe, SIGGRAPH 97 Garland and Heckbert SIGGRAPH 97 Garland and Heckbert, SIGGRAPH 97 Collapsing primitives in a cell Rossignac and Borrel, Modeling in Comp. Graphics 93 Luebke and Erikson, SIGGRAPH 97 Luebke and Erikson, SIGGRAPH 97 Vienna University of Technology 23
Virtual Edge Collapse Allow virtual edge collapses Limit no. of virtual edges (potentially O(n 2 ) ) O(n 2 ) ) Typical constraints: Typical constraints: Delaunay edges Edges that span neighboring cells in a spatial subdivision: octree, grids, etc. subdivision: octree, grids, etc. Maximum edge length Vienna University of Technology 24
Global Geometry Simplification Sample and reconstruct Ad Adaptive subdivision ti bdi i i Vienna University of Technology 25
Sample and Reconstruct Scatter surface with sample points Randomly Randomly Let them repel each other Reduce sample points Reconstruct surface Reconstruct surface Vienna University of Technology 26
Adaptive Subdivision Create a very simple base model that represents the model represents the model Selectively subdivide faces of base model until fidelity criterion met (draw) Big potential application: multiresolution Big potential application: multiresolution modeling Vienna University of Technology 27
Example 1: Vertex Clustering Rossignac and Borrel, 1992 O Operator: cell collapse t ll ll Apply a uniform 3D grid to the object A l if 3D id t th bj t Collapse all vertices in each grid cell to p g single most important vertex, defined by: Curvature (1 / maximum edge angle) Curvature (1 / maximum edge angle) Size of polygons (edge length) Filter out degenerate polygons Vienna University of Technology 28
Example 1: Vertex Clustering A Apply a uniform 3D grid to the object l if 3D id t th bj t Collapse all vertices in each grid cell to p g single most important vertex, defined by: Curvature (1 / maximum edge angle) Curvature (1 / maximum edge angle) Size of polygons (edge length) Filter out degenerate polygons Vienna University of Technology 29
Vertex Clustering Resolution of grid determines degree of simplification simplification Representing degenerate triangles Edges: OpenGL line primitive Edges: OpenGL line primitive Points: OpenGL point primitive Vienna University of Technology 30
Vertex Clustering Pros Very fast Very fast Robust (topology-insensitive) Cons Difficult to specify simplification degree Difficult to specify simplification degree Low fidelity (topology-insensitive) Underlying grid creates sensitivity to model orientation o e a o Vienna University of Technology 31
Creating LODs: Error Measures What criteria to guide simplification? Visual/perceptual criteria are hard Visual/perceptual criteria are hard Geometric criteria are more common E Examples: l Vertex-vertex distance Vertex-plane distance Point-surface distance Surface-surface distance Image-driven Image driven Issues: Error propagation? Error propagation? Need to include attributes (tex coords, …) Vienna University of Technology 32
Quadric Error Metric Vertex-plane distance Minimize distance to all planes at a vertex Minimize distance to all planes at a vertex Plane equation for each face: v p : Ax By Cz D 0 Distance to vertex v : x x T v y p A B C D z 1 1 Vienna University of Technology 33
Recommend
More recommend