1. Local Simplification Strategies
Local error: Compare new patch with previous iteration
• Fast
• Accumulates error
• Memory‐less
The Basic Algorithm
(1) Select the element with minimal error
(2) Perform simplification operation (remove/contract)
(3) Update error (local/global)
重复(1)-(3)Until mesh size / quality is achieved
顶点删除的误差度量
点越尖锐越重要。(Laplace,一圈夹角等)
- Measures
• Distance to plane
• Curvature - Usually approximated
• Average plane
• Discrete curvature
边收缩的误差度量
QEM,二次误差度量
用二次曲面拟合这条边。拟合得到系数矩阵,用矩阵性质度量扭曲。
(1) Choose point closest to set of planes (triangles)
(2) Sum of squared distances to set of planes is quadratic ⇒ has a minimum
用二次曲面来拟合,得到系数矩阵,用二次曲面性质来度量 [Garland & Heckbert 1997]
Given a plane, we can define a quadric Q
Q=(A,b,c)=(nnT,dn,d2)
measuring squared distance to the plane as
Q(V)=VTAV+2bTV+c
Q(V)=[xyz][a2abacabb2bcacbcc2][xyz]+2[adbdcd][xyz]+d2
Garland and Heckbert. Surface Simplification Using Quadric Error Metrics. Siggraph 1997.
- Sum of quadrics represents set of planes
∑i(nTiV+di)2=∑iQi(V)=(∑iQi)(V)
- Each vertex has an associated quadric
• Error(vi)=Qi(vi)
• Sum quadrics when contracting (vi,vj)→v′
• Cost of contraction is Q(v′)
Q=Qi+Qj=(Ai+Aj,bi+bj,ci+cj)
- Sum of endpoint quadrics determines v’
• Fixed placement: select v1 or v2
• Optimal placement: choose v’ minimizing Q(v′)
∇Q(V′)=0⇒V′=−A−1b
• Fixed placement is faster but lower quality
• But it also gives smaller progressive meshes
• Fallback to fixed placement if A is non‐invertible
Contracting Two Vertices
- Goal: Given edge e=(v1,v2), find contracted
v=(x,y,z) that minimizes Δ(v):
∂Δ/∂x=∂Δ/∂y=∂Δ/∂z=0
- Solve system of linear normal equations.
[q11q12q13q14q21q22q23q24q31q32q33q340001]V=[0001]
If no solution - select the edge midpoint
Visualizing Quadrics
- Quadric isosurfaces
• Are ellipsoids (maybe degenerate)
• Centered around vertices
• Characterize shape
• Stretch in least‐curved directions
简化后的折叠、翻转现象
Selecting Valid Pairs for Contraction
- Edges:
{(v1,v2):(v1v2). is in the mesh }
- Close vertices:
{(v1,v2):||v1−v2||<T}
- Threshold T is input parameter
Algorithm
- Compute Qv for all the mesh vertices
- Identify all valid pairs
- Compute for each valid pair (v1,v2) the contracted vertex v and its error Δ(v)
- Store all valid pairs in a priority queue (according to Δ(v))
- While reduction goal not met
• Contract edge (v1,v2) with the smallest error to v
• Update the priority queue with new valid pairs
Artifacts by Edge Collapse
收缩后会出现边的翻转
Pros and Cons
- Pros
• Error is bounded
• Allows topology simplification
• High quality result
• Quite efficient - Cons
• Difficulties along boundaries
• Difficulties with coplanar planes
• Introduces new vertices not present in the original mesh
Appearance‐based metrics
- Generalization required to handle appearance properties
- color
- texture
- normals
- etc.
- Treat each vertex as a 6‐vector [x,y,z,r,g,b]
- Assume this 6D space is Euclidean
- Of course, color space is only roughly Euclidean
- Scale xyz space to unit cube for consistency
- Assume this 6D space is Euclidean
Generalized Quadric Metric
Vertex | Dimension | |
---|---|---|
Color | [x y z r g b] | 6x6 quadrics |
Texture | [x y z s t] | 5x5 quadrics |
Norma | [x y z u v w] | 6x6 quadrics |
Color+Normal | [x y z r g b u v w] | 9x9 quadrics |
Q(V)=VTAV+2bTV+C
本文出自CaterpillarStudyGroup,转载请注明出处。 https://caterpillarstudygroup.github.io/GAMES102_mdbook/