mesh simplification - computer...

62
Mesh Simplification

Upload: vanxuyen

Post on 10-Sep-2018

237 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Mesh Simplification

Page 2: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

ApplicationsApplications

• Oversampled 3D scan data• Oversampled 3D scan data

~150k triangles ~80k triangles

2

Page 3: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

ApplicationsApplications

• Overtessellation: E g iso surface extraction• Overtessellation: E.g. iso-surface extraction

3

Page 4: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

ApplicationsApplications

• Multi resolution hierarchies for• Multi-resolution hierarchies for – efficient geometry processing– level-of-detail (LOD) rendering

4

Page 5: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

ApplicationsApplications

• Adaptation to hardware capabilities• Adaptation to hardware capabilities

5

Page 6: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Size-Quality TradeoffSize Quality Tradeoff

errorerror

size

6

size

Page 7: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Problem StatementProblem Statement

• Given:• Given:

• Find: such that

1. and is minimal, or

2. and is minimal

• Respect additional fairness criteria– normal deviation, triangle shape, scalar attributes,

etc.

7

Page 8: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Mesh Decimation MethodsMesh Decimation Methods

• Vertex clustering• Vertex clustering

• Incremental decimation

Resampling• Resampling

• Mesh approximation

8

Page 9: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Vertex ClusteringVertex Clustering

• Cluster Generation• Cluster Generation

• Computing a representativep g p

• Mesh generation

• Topology changes

9

Page 10: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Vertex ClusteringVertex Clustering

• Cluster Generation• Cluster Generation– Uniform 3D grid– Map vertices to cluster cells

• Computing a representative• Computing a representative

• Mesh generation

• Topology changes

10

Page 11: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Vertex ClusteringVertex Clustering

• Cluster Generation• Cluster Generation– Hierarchical approach– Top-down or bottom-up

• Computing a representative• Computing a representative

• Mesh generation

• Topology changes

11

Page 12: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Vertex ClusteringVertex Clustering

• Cluster Generation• Cluster Generation

• Computing a representativep g p– Average/median vertex position

Error quadrics– Error quadrics

• Mesh generation

• Topology changes

12

Page 13: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Computing a RepresentativeComputing a Representative

Average vertex position

13

Page 14: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Computing a RepresentativeComputing a Representative

Median vertex position

14

Page 15: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Computing a RepresentativeComputing a Representative

Error quadrics

15

Page 16: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Error QuadricsError Quadrics

• Patch is expected to be piecewise flat• Patch is expected to be piecewise flat

• Minimize distance to neighboring triangles’ planesg g g p

16

Page 17: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Error QuadricsError Quadrics

• Squared distance of point p to plane q:• Squared distance of point p to plane q:

17

Page 18: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Error Quadrics

• Sum distances to planes q of vertex’

Error Quadrics

• Sum distances to planes qi of vertex neighboring triangles:

• Point p* that minimizes the error satisfies:Point p that minimizes the error satisfies:

18

Page 19: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

ComparisonComparison

d idi error quadricaverage median

19

Page 20: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Vertex ClusteringVertex Clustering

• Cluster Generation• Cluster Generation

• Computing a representativep g p

• Mesh generation– Clusters p ↔ {p0,...,pn}, q ↔ {q0,...,qm}

• Topology changesTopology changes

20

Page 21: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Vertex ClusteringVertex Clustering

• Cluster Generation• Cluster Generation

• Computing a representativep g p

• Mesh generation– Clusters p ↔ {p0,...,pn}, q ↔ {q0,...,qm} – Connect (p,q) if there was an edge (pi,qj)j

• Topology changes

21

Page 22: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Vertex ClusteringVertex Clustering

• Cluster Generation• Cluster Generation

• Computing a representativep g p

• Mesh generation

• Topology changes– If different sheets passIf different sheets pass

through one cellCan be non manifold– Can be non-manifold

22

Page 23: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

OutlineOutline

• Applications• Applications

• Problem Statement

• Mesh Decimation Methods– Vertex Clustering– Incremental Decimation– Extensions

23

Page 24: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Incremental DecimationIncremental Decimation

24

Page 25: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Incremental DecimationIncremental Decimation

• General Setup• General Setup

• Decimation operatorsp

• Error metrics

• Fairness criteria

Topolog changes• Topology changes

25

Page 26: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

General SetupGeneral Setup

• Repeat:

• pick mesh region

• apply decimation operatorpp y p

• Until no further reduction possible

26

Page 27: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Greedy OptimizationGreedy Optimization• For each regionFor each region• evaluate quality after decimation• enqeue(quality region)• enqeue(quality, region)

• Repeat:• get best mesh region from queue• apply decimation operator• update queuep q• Until no further reduction possible

27

Page 28: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Global Error ControlGlobal Error Control• For each regionFor each region• evaluate quality after decimation• enqeue(quality region)• enqeue(quality, region)

• Repeat:• get best mesh region from queue• if error < ε• apply decimation operatorpp y p• update queue• Until no further reduction possible

28

Until no further reduction possible

Page 29: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Incremental DecimationIncremental Decimation

• General Setup• General Setup

• Decimation operatorsp

• Error metrics

• Fairness criteria

Topolog changes• Topology changes

29

Page 30: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Decimation OperatorsDecimation Operators

• What is a "region" ?• What is a region ?

• What are the DOF for re-triangulation?g

• Classification– Topology-changing vs. topology-preserving– Subsampling vs. filtering– Inverse operation → progressive meshes

30

Page 31: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Vertex RemovalVertex Removal

Select a vertex to be eliminatedbe eliminated

31

Page 32: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Vertex RemovalVertex Removal

Select all triangles sharing this vertexsharing this vertex

32

Page 33: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Vertex RemovalVertex Removal

Remove the selected trianglesselected triangles, creating the hole

33

Page 34: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Vertex RemovalVertex Removal

Fill the hole with new trianglesnew triangles

34

Page 35: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Decimation OperatorsDecimation Operators

Vertex Removal

V t I tiVertex Insertion

• Remove vertex

R t i l t h l• Re-triangulate hole– Combinatorial degrees of freedom

35

Page 36: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Decimation OperatorsDecimation Operators

Vertex Split

Edge Collapse

Vertex Split

• Merge two adjacent vertices

• Define new vertex position– Continuous degrees of freedomg– Filter along the way

36

Page 37: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Decimation OperatorsDecimation Operators

Half-Edge Collapse

C ll d i t d i t

Restricted Vertex Split

• Collapse edge into one end point– Special case of vertex removal– Special case of edge collapse

• No degrees of freedomNo degrees of freedom• Separates global optimization from local

optimization37

optimization

Page 38: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Half-Edge CollapseHalf Edge Collapse

38

Page 39: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Half-Edge CollapseHalf Edge Collapse

39

Page 40: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Half-Edge CollapseHalf Edge Collapse

40

Page 41: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Half-Edge CollapseHalf Edge Collapse

41

Page 42: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Half-Edge CollapseHalf Edge Collapse

42

Page 43: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Half-Edge CollapseHalf Edge Collapse

43

Page 44: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Half-Edge CollapseHalf Edge Collapse

44

Page 45: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Half-Edge CollapseHalf Edge Collapse

45

Page 46: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Half-Edge CollapseHalf Edge Collapse

46

Page 47: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Half-Edge CollapseHalf Edge Collapse

!flip

47

Page 48: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Incremental DecimationIncremental Decimation

• General Setup• General Setup

• Decimation operatorsp

• Error metrics

• Fairness criteria

Topolog changes• Topology changes

48

Page 49: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Local Error Metrics

• Local distance to mesh

Local Error Metrics

• Local distance to mesh– Compute average plane– No comparison to original geometry

49

Page 50: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Global Error MetricsGlobal Error Metrics

• Error quadrics• Error quadrics– Squared distance to planes at vertex– No bound on true error

Q3 = Q1+Q2Q3 Q1+Q2

p

Q2

Q1v3

solve v3TQ3v3 = min

< ? k

p1 p2

piTQipi = 0, i={1,2}

< ε ? → ok

50

Page 51: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Incremental DecimationIncremental Decimation

• General Setup• General Setup

• Decimation operatorsp

• Error metrics

• Fairness criteria

Topolog changes• Topology changes

51

Page 52: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Fairness Criteria

• Rate quality of decimation operation

Fairness Criteria

• Rate quality of decimation operation– Approximation error– Triangle shape– Dihedral anglesg– Valence balance– ...

52

Page 53: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Fairness Criteria

• Rate quality after decimation

Fairness Criteria

• Rate quality after decimation– Approximation error

r1

– Triangle shape– Dihedral angles

1

g– Valence balance– ...

r2

53

Page 54: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Fairness Criteria

• Rate quality after decimation

Fairness Criteria

• Rate quality after decimation– Approximation error– Triangle shape– Dihedral anglesg– Valence balance– ...

54

Page 55: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Fairness Criteria

• Rate quality after decimation

Fairness Criteria

• Rate quality after decimation– Approximation error– Triangle shape– Dihedral anglesg– Valence balance

Color differences– Color differences– ...

55

Page 56: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Fairness Criteria

• Rate quality after decimation

Fairness Criteria

• Rate quality after decimation– Approximation error– Triangle shape– Dihedral anglesg– Valence balance

Color differences– Color differences– ...

56

Page 57: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Fairness Criteria

• Rate quality after decimation

Fairness Criteria

• Rate quality after decimation– Approximation error– Triangle shape– Dihedral anglesg– Valence balance

Color differences– Color differences– ...

57

Page 58: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Fairness Criteria

• Rate quality after decimation

Fairness Criteria

• Rate quality after decimation– Approximation error– Triangle shape– Dihedral anglesg– Valence balance

Color differences– Color differences– ...

58

Page 59: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Incremental DecimationIncremental Decimation

• General Setup• General Setup

• Decimation operatorsp

• Error metrics

• Fairness criteria

Topolog changes• Topology changes

59

Page 60: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Topology Changes ?

• Merge vertices across non edges

Topology Changes ?

• Merge vertices across non-edges– Changes mesh topology– Need spatial neighborhood information– Generates non-manifold meshes

Vertex ContractionVertex Contraction

Vertex Separation

60

Page 61: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

Topology Changes ?

• Merge vertices across non edges

Topology Changes ?

• Merge vertices across non-edges– Changes mesh topology– Need spatial neighborhood information– Generates non-manifold meshes

manifold non-manifold

61

Page 62: Mesh Simplification - Computer graphicsgraphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08... · Mesh Simplification. Applications • Oversampled 3D scan dataOversampled

ComparisonComparison

• Vertex clustering• Vertex clustering– fast, but difficult to control simplified mesh– topology changes, non-manifold meshes– global error bound, but often not close to optimumg , p

• Incremental decimation with quadric error metrics – good trade-off between mesh quality and speed– explicit control over mesh topology– restricting normal deviation improves mesh quality

62