a lightweight approach to repairing digitized polygon meshes marco attene imati-ge / cnr 2010...

54
A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Upload: adam-rogers

Post on 13-Jan-2016

246 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

A lightweight approach to repairing digitized polygon meshes

Marco Attene IMATI-GE / CNR

2010

Presented by Naitsat Alexander

Page 2: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Desirable meshes

• Closed watertight mesh• Single oriented manifold• No degenerated elements

Type of defects :– Defects in topology– Defects in geometry

2

link: [2]

Page 3: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Topological defects

3

[3]

Page 4: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Geometrical defects

4

[3]

Page 5: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Importance of mesh repairing

5

• Slicing for 3D printing • Partition into voxels

– Inside test for voxels

• Generation of tetrahedral meshes– Tetgen library

Page 6: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Volumetric algorithms + More robust

- Produce a new mesh

Surface algorithms+ Less aggressive

- Can’t handle too much defects

6

Repairing methods

[3]

Page 7: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Volumetric algorithms + More robust

- Produce a new mesh

Surface algorithms+ Less aggressive

- Can’t handle too much defects

7

Repairing methods

[6]

Page 8: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Volumetric algorithms + More robust

- Produce a new mesh

Surface algorithms+ Less aggressive

- Can’t handle too much defects

8

Repairing methods

[3]

Page 9: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

General steps in repairing

9

Polygonal mesh

Triangulation &

Preprocessing Fixing topology Fixing

Geometry

Triangle mesh of closed

manifold

Page 10: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Simplicial complexes

= set of subsets of {1,…n}

Realization of f:V R3

10

1

2

3

4

5

6

7

8

9

10

11

12

13 14

(1,5,6) (6,5,7) (9,6,8)l(6)=

l(6*)= {(1,5,6),(6,5,7),(9,6,8)}

V = {1,2,…,14}E = {{1,2},{1,3}, …,{1,6},

{2,3}…}F = {(1,2,3),(1,3,4),(1,4,2),…}

Page 11: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Simplicial complexes

• Simplicial neighborhood of order k (k-ring)

11

0 ( )t N t 1( )N t 2 ( )N t

t t t

0

1

( )

( ) | share vertex of ( )k k

N S S

N S t F t N S

[1]

Page 12: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Repairing topology

12

Polygonal mesh

Triangulation & Data init

Remove topological singularities

Orient meshno cuts

Triangle mesh of closed

manifold

Patch mesh holes

Keep the largest connected component

Page 13: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Repairing topology

13

Polygonal mesh

Triangulation & Data init

Remove topological singularities

Orient meshno cuts

Triangle mesh of closed

manifold

Patch mesh holes

Keep the largest connected component

Page 14: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Repairing topology

14

“Cutting and Stitching”

A. Gueziec, G. Taubin, F. Lazarus 2001

Polygonal mesh

Triangulation & Data init

Remove topological singularities

Orient meshno cuts

Triangle mesh of closed

manifold

Patch mesh holes

Keep the largest connected component

Page 15: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

v

Cutting and Stitching

1. Locating singularities• Singular edges• Singular isolated vertices

15

l(v)

e

rank(e)>2

Page 16: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Cutting and Stitching

1. Locating singularities• Singular edges• Singular isolated vertices

2. Cutting• Global and local

16

e3

l(v2)

l(v2)

v1

v2

e2e1

Page 17: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Local and Global cutting

17

local global

[4]

Page 18: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Cutting and Stitching

1. Locating singularities• Singular edges• Singular isolated vertices

2. Cutting• Global and local

3. Stitching

18

v1

l(v2)

e1

e2

v2

l(v1)

Page 19: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Stitching

19

• Pinching two adjacent edges that

were cut

[4]

Page 20: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Repairing topology

20

Polygonal mesh

Triangulation & Data init

Remove topological singularities

Orient meshno cuts

Triangle mesh of closed

manifold

Patch mesh holes

Keep the largest connected component

Page 21: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Repairing topology: long gaps

21

Polygonal mesh

Triangulation & Data init

Remove topological singularities

Orient meshno cuts Patch the

holes

Keep the largest connected component

Triangle mesh of closed

manifold

?

Page 22: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Repairing topology

22

Polygonal mesh

Triangulation & Data init

Remove topological singularities

Orient meshno cuts

Triangle mesh of closed

manifold

Patch mesh holes

Keep the largest connected component

Stitch components

[5]

Page 23: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Repairing topology

23

1. Orient the seed triangle

2. Propagate orientation to entire mesh

3. Cut through inconsistently orientated triangles

4. If cuts were necessary then terminate

Polygonal mesh

Triangulation & Data init

Remove topological singularities

Orient meshno cuts

Triangle mesh of closed

manifold

Patch mesh holes

Keep the largest connected component

Page 24: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Repairing topology

24

Polygonal mesh

Triangulation & Data init

Remove topological singularities

Orient meshno cuts

Triangle mesh of closed

manifold

Patch mesh holes

Keep the largest connected component

P. Liepa. “Filling holes in meshes” 2003

Page 25: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes in meshes

• Main stages of the algorithm1. Compute a coarse triangulation to fill a hole

• Based on Barequet et al. 1995

2. Refine and smooth triangulation to match the surrounding density and geometry

25

[3]

Page 26: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes in meshes

Assumptions: • Holes are connected components of the boundary• Holes are simply connected polygons• No islands in holes

26

n verticesn-2 triangles

Self-intersections cannot be

excluded

Quality depends on boundary

distortion

Page 27: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes in meshes

Weight w(T) of triangulation T

27

( ) ( )

( ) area( )

( ) maximal dihedral angle

mixture of dihedral angle and area

t Tw T w t

w t t

w t

Page 28: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes in meshes

Weight w(T) of triangulation T

28

( ) ( )

( ) area( )

( ) maximal dihedral angle

mixture of dihedral angle and area

t Tw T w t

w t t

w t

Page 29: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes in meshes

• w(i,j) = minimal weight in triangulating sub-polygon i,i+1,…,j

w(2,9) = ?

29

[3]

Page 30: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes in meshes

30

• w(i,j) = minimal weight in triangulating sub-polygon i,i+1,…,j

w(2,9) = min ( w((2,3,9)) + w(3,9),

Page 31: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes in meshes

31

• w(i,j) = minimal weight in triangulating sub-polygon i,i+1,…,j

w(2,9) = min ( w((2,3,9)) + w(3,9),

w(2,4)+w((2,4,9)) + w(4,9),

Page 32: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes in meshes

32

• w(i,j) = minimal weight in triangulating sub-polygon i,i+1,…,j

w(2,9) = min ( w((2,3,9)) + w(3,9),

w(2,4)+w((2,4,9)) + w(4,9),w(2,5)+w((2,5,9)) + w(5,9),

Page 33: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes in meshes

33

• w(i,j) = minimal weight in triangulating sub-polygon i,i+1,…,j

w(2,9) = min ( w((2,3,9)) + w(3,9),

w(2,4)+w((2,4,9)) + w(4,9),w(2,5)+w((2,5,9)) + w(5,9),w(2,6)+w((2,6,9)) + w(6,9),

Page 34: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes in meshes

34

• w(i,j) = minimal weight in triangulating sub-polygon i,i+1,…,j

w(2,9) = min ( w((2,3,9)) + w(3,9),

w(2,4)+w((2,4,9)) + w(4,9),w(2,5)+w((2,5,9)) + w(5,9),w(2,6)+w((2,6,9)) + w(6,9),w(2,7)+w((2,7,9)) + w(7,9),

Page 35: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes in meshes

• w(i,j) = minimal weight in triangulating sub-polygon i,i+1,…,j

w(2,9) = min ( w((2,3,9)) + w(3,9),

w(2,4)+w((2,4,9)) + w(4,9),w(2,5)+w((2,5,9)) + w(5,9),w(2,6)+w((2,6,9)) + w(6,9),w(2,7)+w((2,7,9)) + w(7,9),w(2,8)+w((2,8,9)) )

35

Page 36: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes in meshes

• w(0,n) = minimal weight in triangulating the boundary

• Recursive formula

• O(n3) complexity

(Dynamic programming)

36

0

(0, ) min (0, ) (0, , ) ( , )

( , 1) 0m n

w n w m w m n w m n

w i i

Page 37: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Filling holes : results

37

[3]

Page 38: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Degeneracy removal

38

Mesh Mk←0

T← narrow trianglesk← k+1

Fixed mesh

Remove Nk(T) & Path holes

T Fix triangles &update T

k> kmax ?

T

Failure YesNo

Page 39: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Repairing geometry

39

Mesh Mk←0

T← narrow trianglesk← k+1

Fixed mesh

Remove Nk(T) & Path holes

• Epsilon geometry to locate narrow triangles• Repairing by swap & collapse method

T Fix triangles &update T

k> kmax ?

T

Failure YesNo

Page 40: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Swap and Collapse

• Nearly flat triangle with >-– Swap edge against

• Other narrow triangles with <– Collapse edge against

• Check if swap/collapse is legal

40

=arcsin(10-

5) [1]

Page 41: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Degeneracy removal

41

Mesh Mk←0

T← narrow trianglesk← k+1

Fixed mesh

Remove Nk(T) & Path holes

• Maximal number of iterations = 3

T Fix triangles &update T

k> kmax ?

T

Failure YesNo

Page 42: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Degeneracy removal

42

Mesh Mk←0

T← narrow trianglesk← k+1

Fixed mesh

Remove Nk(T) & Path holes

• Remove possible disconnected components• Next loop of repairing is made only for effected

triangles

T Fix triangles &update T

k> kmax ?

T

Failure YesNo

Page 43: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Removal of self intersections

43

Mesh Mk←0 Init voxels Fixed

mesh

Remove Nk(T) & Path holes

T T← self intersecting trianglesk← k+1

k> kmax ?

T

Failure YesNo

Page 44: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Removal of self intersections

44

Mesh Mk←0 Init/update voxels Fixed

mesh

Remove Nk(T) & Path holes

• Building 100x100x100 voxels• After 1st loop storing only voxels of effected

triangles

T T← self intersecting trianglesk← k+1

k> kmax ?

T

Failure YesNo

Page 45: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Removal of self intersections

45

Mesh Mk←0 Init/update voxels Fixed

mesh

Remove Nk(T) & Path holes

• Maximal number of iterations = 3• Remove possible disconnected components

T T← self intersecting trianglesk← k+1

k> kmax ?

T

Failure YesNo

Page 46: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Repairing geometry : flow

46

Mesh M

Degeneracy removal with

kmax= 3

Fixed mesh

M’

Self intersection removal with

kmax= 3

T← narrow triangles

T

T success

failure

maximum of 10 iterations

Page 47: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Results

47

topology

geometry

[1]

Page 48: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Results

48

geometrytopology

[1]

Page 49: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Comparison

Other methods for mesh repairing

1. S. Bischoff and L. Kobbelt. “Structure preserving cad model repair” 2005

2. F. Nooruddin and G. Turk. “Simplification and repair of polygonal models using volumetric techniques” 2003

3. T. Ju. “Robust repair of polygonal models” 2004

49

Page 50: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Comparison

50

11534 faces 12634 faces 17174 faces 110908 faces 363776 faces

Original Current method Method 1 Method 2 Method 3

[1]

Page 51: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Failure cases

51[1]

Page 52: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Improvements

• Parallel computations• More efficient search for self-intersection

– Adapting voxel size / octree resolution to the mesh

• Repairing topology and geometry in a single loop– There is overlap between the topology and the geometry

stages

52

Page 53: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

References

1) A lightweight approach to repairing digitized polygon meshes. Marco Attene.

2) Polygon Mesh Repairing: An Application Perspective. Marco Attene, Marcel Campen and Leif Kobbelt. 2012

3) Model Repair. Leif Kobbelt RWTH Aachen University .

4) Cutting and stitching : Converting sets of polygons to manifold surfaces. A. Gueziec, G. Taubin, F. Lazarus, and B. Horn.

5) Automatic mesh-healing technique for model repair and finite element model generation. C.S. Chong, A. Senthil Kumar, H.P. Lee.

6) A Practical Guide to Polygon Mesh Repairing. Marcel Campen, Marco Attene and Leif Kobbelt.

53

Page 54: A lightweight approach to repairing digitized polygon meshes Marco Attene IMATI-GE / CNR 2010 Presented by Naitsat Alexander

Thank you

Questions ?

54