New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh...

of 57 /57
Triangular Mesh/Mesh Simplification Qixing Huang Feb. 23 th 2017

Transcript of New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh...

Page 1: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Triangular Mesh/Mesh Simplification

Qixing Huang

Feb. 23th 2017

Page 2: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Review: Course Structure

3D Reconstruction 3D Representations 3D Understanding

[Wu et al. 15]

Page 3: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Review: 3D Representations

Point Cloud

Parametric

Implicit Triangular Mesh

Scene Graph

Page 4: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Review: Pointcloud to Implicit Surface

Radial Basis Function[Carr et al. 01]

Page 5: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Review: Implicit->Mesh[Lorensen and Cline 87]

Page 6: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Polygon Mesh Processing

Mesh Simplification

Mesh Parameterization

Mesh Analysis (3D Understanding)

Mesh Deformation

Page 7: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Mesh Simplification

Page 8: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Applications

• Oversampled 3D scan data

~150k triangles ~80k triangles

Page 9: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Applications

• Overtessellation: E.g. iso-surface extraction

Page 10: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Applications

• Multi-resolution hierarchies for

– efficient geometry processing

– level-of-detail (LOD) rendering

Page 11: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Applications

• Adaptation to hardware capabilities

Page 12: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Size-Quality Tradeoff

error

size

Page 13: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Problem Statement

• Given: M = (V,F)

• Find: M’ = (V’,F’) such that

– |V’| = n < |V| and d(M,M’) is minimal, or

– d(M,M’) < eps and |V’| is minimal

• Respect additional fairness criteria– Normal deviation, triangle shape, scalar attributes, etc.

Page 14: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Mesh Decimation Methods

• Vertex clustering

• Incremental decimation

• Resampling

• Mesh approximation

Page 15: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Mesh Decimation Methods

• Vertex clustering

• Incremental decimation

• Resampling

• Mesh approximation

Page 16: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Vertex Clustering

• Cluster Generation

• Computing a representative

• Mesh generation

• Topology changes

Page 17: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Vertex Clustering

• Cluster Generation

– Uniform 3D grid

– Map vertices to cluster cells

• Computing a representative

• Mesh generation

• Topology changes

Page 18: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Vertex Clustering

• Cluster Generation

– Hierarchical approach

– Top-down or bottom-up

• Computing a representative

• Mesh generation

• Topology changes

Page 19: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Vertex Clustering

• Cluster Generation

• Computing a representative

– Average/median vertex position

– Error quadrics

• Mesh generation

• Topology changes

Page 20: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Computing a Representative

Average vertex position

Page 21: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Computing a Representative

Median vertex position

Page 22: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Computing a Representative

Error quadrics

Page 23: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Error Quadrics

• Patch is expected to be piecewise flat

• Minimize distance to neighboring triangles’ planes

Page 24: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Error Quadrics

• Squared distance of point p to plane q

Page 25: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Error Quadrics

• Sum distances to planes qi of vertex’

neighboring triangles

• Point p* that minimizes the error satisfies:

Page 26: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Comparison

Page 27: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Vertex Clustering

• Cluster Generation

• Computing a representative

• Mesh generation

– Clusters p<-> {p0,…, pn}, q<-> {q0,…, qm}

• Topology changes

Page 28: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Vertex Clustering

• Cluster Generation

• Computing a representative

• Mesh generation

– Clusters p<-> {p0,…, pn}, q<-> {q0,…, qm}

– Connect (p,q) if there was an edge (pi, qi)

• Topology changes

Page 29: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Vertex Clustering

• Cluster Generation

• Computing a representative

• Mesh generation

• Topology changes

– If different sheets pass through one cell

– Can be non-manifold

Page 30: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Incremental Decimation

Page 31: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Incremental Decimation

Page 32: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Incremental Decimation

• General Setup

• Decimation operators

• Error metrics

• Fairness criteria

Page 33: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

General Setup

• Repeat:

– Pick mesh region

– Apply decimation operator

• Until no further reduction possible

Page 34: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Variant I --- Greedy Optimization

• For each region– evaluate quality after decimation

– enqeue(quality, region)

• Repeat:– get best mesh region from queue

– apply decimation operator

– update queue

• Until no further reduction possible

Page 35: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Variant II --- Global Error Control

• For each region– evaluate quality after decimation

– enqeue(quality, region)

• Repeat:– get best mesh region from queue

– If error < eps• Apply decimation operator

• Update queue

• Until no further reduction possible

Page 36: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Incremental Decimation

• General Setup

• Decimation operators

• Error metrics

• Fairness criteria

Page 37: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Decimation Operators

• What is a “region”?

• What are the DOF for re-triangulation?

• Classification

– Topology-changing vs. topology-preserving

– Inverse operation -> progressive meshes [Hoppe et al….]

Page 38: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Vertex Removal

Select a vertex tobe eliminated

Page 39: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Vertex Removal

Select all trianglessharing this vertex

Page 40: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Vertex Removal

Remove theselected triangles,creating the hole

Page 41: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Vertex Removal

Fill the hole withnew triangles

Page 42: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Decimation Operators

• Remove vertex

• Re-triangulate hole– Combinatorial degrees of freedom

Page 43: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Decimation Operators

• Merge two adjacent vertices

• Define new vertex position

– Continuous degrees of freedom

Page 44: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Decimation Operators

• Collapse edge into one end point

– Special case of vertex removal

– Special case of edge collapse

• No degrees of freedom

Page 45: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Fairness Criteria

• Rate quality of decimation operation

– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– …

Page 46: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Fairness Criteria

• Rate quality of decimation operation

– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– …

Page 47: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Incremental Decimation

• General Setup

• Decimation operators

• Error metrics

• Fairness criteria

Page 48: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Local Error Metrics

• Local distance to mesh

– Compute average plane

– No comparison to original geometry

Page 49: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Global Error Metrics

• Error quadrics

– Squared distance to planes at vertex

– No bound on true error

[Garland and Heckbert 97]4k+ citations on Google Scholar

Page 50: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Incremental Decimation

• General Setup

• Decimation operators

• Error metrics

• Fairness criteria

Page 51: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Fairness Criteria

• Rate quality of decimation operation

– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– …

Page 52: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Fairness Criteria

• Rate quality of decimation operation

– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– …

Page 53: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Fairness Criteria

• Rate quality of decimation operation

– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– …

Page 54: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Fairness Criteria

• Rate quality of decimation operation

– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– …

Page 55: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Fairness Criteria

• Rate quality of decimation operation

– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– …

Page 56: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Implementation – Half Edge Data Structure

Reading: https://doc.cgal.org/latest/HalfedgeDS/index.html

Page 57: New Triangular Mesh/Mesh Simplificationhuangqx/2018_CS395_Lecture_19.pdf · 2018. 11. 5. · Mesh Simplification Mesh Parameterization Mesh Analysis (3D Understanding) Mesh Deformation.

Comparison

• Vertex clustering

– fast, but difficult to control simplified mesh

– Topology changes, non-manifold meshes

– Global error bound, but often not close to optimum

• Incremental decimation with quadratic error metrics

– good trade-off between mesh quality and speed

– explicit control over mesh topology

– restricting normal deviation improves mesh quality