Spring 2019 CSCI 621: Digital Geometry Processing 9.2 Decimation Hao Li http://cs621.hao-li.com 1
Last Time Parameterization � ⇥ 1 0 I ( u, v ) = • isometric 0 1 � ⇥ 1 0 • conformal I ( u, v ) = s ( u, v ) · 0 1 det( I ( u, v )) = 1 • equiareal � x T x T ⇥ u x u u x v I = x T x T u x v v x v 2
Last Time Harmonic Maps Z Z kr x k 2 = k x u k 2 + k x v k 2 d u d v • minimize Dirichlet energy: Ω Ω • Euler-Lagrange PDE ∆ x ( u, v ) = 0 Discrete Harmonic Maps Convex Combination Maps original uniform cotan mean mesh weights weights value 3
Last Time fixed vs. open boundaries texture atlases cutting the mesh → disk topology constrained parameterization 4
Mesh Optimization Smoothing • Low geometric noise Fairing • Simplest shape Decimation • Low complexity Remeshing • Triangle Shape 5
Mesh Decimation Oversampled 3D scan data ~150k triangles ~80k triangles 6
Mesh Decimation Over tesselation: e.g., Iso-surface extraction 7
Mesh Decimation Multi-resolution hierarchies for • efficient geometry processing • level-of-detail (LOD) rendering 8
Mesh Decimation Adaptation to hardware capabilities 9
Mesh Decimation Adaptation to hardware capabilities 10
Size-Quality Tradeoff error size 11
Problem Statement M � = ( V � , F � ) M = ( V , F ) Given , find such that |V � | = n < |V| ⇤ M � M � ⇤ • and is minimal, or |V � | ⇤ M � M � ⇤ < � • and is minimal M � M 12
Problem Statement M � = ( V � , F � ) M = ( V , F ) Given , find such that |V � | = n < |V| ⇤ M � M � ⇤ • and is minimal, or |V � | ⇤ M � M � ⇤ < � • and is minimal NP hard • Look for sub-optimal solution Respect additional fairness criteria • Normal deviation, triangle shape, colors,… 13
Outline Mesh Decimation methods • Vertex Clustering • Iterative Decimation 14
Vertex Clustering • Cluster Generation • Computing a representative • Mesh generation • Topology changes 15
Vertex Clustering • Cluster Generation • Uniform 3D grid • Map vertices to cluster cells • Computing a representative • Mesh generation • Topology changes 16
Vertex Clustering • Cluster Generation • Hierarchical approach • Top-down or bottom-up • Computing a representative • Mesh generation • Topology changes 17
Vertex Clustering • Cluster Generation • Computing a representative • Average/median vertex position • Error quadrics • Mesh generation • Topology changes 18
Computing a Representative average vertex position → low pass filter 19
Computing a Representative median vertex position → sub-sampling 20
Computing a Representative error quadrics → feature preservation 21
Error Quadrics Squared distance to plane p = ( x, y, z, 1) T , q = ( a, b, c, d ) T dist( q , p ) 2 = ( q T p ) 2 = p T � p =: p T Q q p qq T ⇥ 22
Error Quadrics Squared distance to plane p = ( x, y, z, 1) T , q = ( a, b, c, d ) T dist( q , p ) 2 = ( q T p ) 2 = p T � p =: p T Q q p qq T ⇥ a 2 ab ac ad b 2 ab bc bd Q q = c 2 ac bc cd d 2 ad bd cd 23
Error Quadrics Sum of distances to vertex planes �⇤ ⇥ dist( q i , p ) 2 = p T Q q i p = p T p =: p T Q p p ⇤ ⇤ Q q i i i i 24
Error Quadrics Sum of distances to vertex planes �⇤ ⇥ dist( q i , p ) 2 = p T Q q i p = p T p =: p T Q p p ⇤ ⇤ Q q i i i i Point that minimizes the error 0 q 11 q 12 q 13 q 14 0 p ∗ = q 21 q 22 q 23 q 24 0 q 31 q 32 q 33 q 34 0 0 0 1 1 25
Comparison average error quadric median 26
Vertex Clustering • Cluster Generation • Computing a representative • Mesh generation • Clusters p ⇔ { p 0 , . . . , p n } , q ⇔ { q 0 , . . . , q n } • Connect if there was an edge ( p i , q j ) ( p , q ) • Topology changes 27
Vertex Clustering • Cluster Generation • Computing a representative • Mesh generation • Topology changes • If different sheets pass through on cell • Can be non-manifold 28
Vertex Clustering • Cluster Generation • Computing a representative • Mesh generation • Topology changes • If different sheets pass through on cell • Can be non-manifold 29
Outline Mesh Decimation methods • Vertex Clustering • Iterative Decimation 30
Example 31
Incremental Decimation • General Setup • Decimation operators • Error metrics • Fairness criteria • Topology changes 32
General Setup Repeat: pick mesh region apply decimation operator Until no further reduction possible 33
Greedy Optimization For each region evaluate quality after decimation enqueue(quality, region) Repeat: pick best mesh region apply decimation operator update queue Until no further reduction possible 34
Global Error Control For each region evaluate quality after decimation enqueue(quality, region) Repeat: pick best mesh region if error < ε apply decimation operator update queue Until no further reduction possible 35
Incremental Decimation • General Setup • Decimation operators • Error metrics • Fairness criteria • Topology changes 36
Decimation Operators • What is a “region”? • What are the DOFs for re-triangulation? • Classification • topology-changing vs. topology-preserving • subsampling vs. filtering • inverse operation → progressive meshes 37
Vertex Removal Select a vertex to be eliminated 38
Vertex Removal Select all triangles sharing this vertex 39
Vertex Removal Remove the selected triangles, creating a hole 40
Vertex Removal Fill the hole with triangles 41
Decimation Operators • Remove vertex • Re-triangulate hole • Combinatorial DOFs • Sub-sampling Vertex Removal Vertex Insertion 42
Decimation Operators • Merge two adjacent triangles • Define new vertex position • Continuous DOF • Filtering Edge Collapse Vertex Split 43
Decimation Operators • Collapse edge into one end point • Special vertex removal • Special edge collapse • No DOFs • One operator per half-edge • Sub-sampling H. Hoppe: Progressive Meshes Halfedge Collapse Restricted Vertex Split 44
Edge Collapse 45
Edge Collapse 46
Edge Collapse 47
Edge Collapse 48
Edge Collapse 49
Edge Collapse 50
Edge Collapse 51
Edge Collapse 52
Edge Collapse 53
Edge Collapse (Flip!) 54
Application: Progressive Meshes 55
Priority Queue Updating 56
Incremental Decimation • General Setup • Decimation operators • Error metrics • Fairness criteria • Topology changes 57
Local Error Metrics Local distance to mesh [Schröder et al. ‘92] • Compute average plane • No comparison to original geometry 58
Global Error Metrics Simplification envelopes [Cohen al. ‘96] • Compute (non-intersecting) offset surfaces • Simplification guarantees to stay within bounds 59
Global Error Metrics (Two-sided) Hausdorff distance: Maximum distance between two shapes d ( A, B ) := max a ∈ A min b ∈ B ⇥ a � b ⇥ d ( A, B ) 6 = d ( B, A ) • In general • Computationally involved A d(A,B) B d(B,A) 60
Global Error Metrics Scan data: One-sided Hausdorff distance sufficient • From original vertices to current surface 61
Global Error Metrics Error quadrics [Garland, Heckbert 97] • Squared distance to planes at vertex • No bound on true error Q 3 = Q 1 + Q 2 Q 1 Q 2 p 3 p 1 p 2 solve p 3T Q 3 p 3 = min p i T Q i p i = 0 , < ε ? → ok i ={1,2} 62
Global Error Metrics Initialization: • Assign each vertex the quadric built from all its incident triangles’ planes Decimation: ( p 1 , p 2 ) → p 3 • After collapsing edge , simply add the Q 3 = Q 1 + Q 2 corresponding quadrics: Memory consumption • Quasi-global error metric with 10 floats per vertex 63
Complexity • number of vertices N = • Priority Queue for half edges 6 N log(6 N ) • • Error control • Local global O (1) ⇒ O ( N ) O ( N 2 ) • Local global O ( N ) ⇒ 64
Incremental Decimation • General Setup • Decimation operators • Error metrics • Fairness criteria • Topology changes 65
Fairness Criteria • Rate quality after decimation • Approximation error 66
Fairness Criteria • Rate quality after decimation • Approximation error r 1 • Triangle shape e 1 r 1 < r 2 e 1 e 2 e 2 r 2 67
Fairness Criteria • Rate quality after decimation • Approximation error • Triangle shape 68
Fairness Criteria • Rate quality after decimation • Approximation error • Triangle shape 69
Recommend
More recommend