Top Banner
Parameterization
41

Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Jan 11, 2016

Download

Documents

Phebe Webb
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Parameterization

Page 2: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Introduction

• The goal of parameterization is to attach a coordinate system to the object– In particular, assign (2D) texture coordinates to the

3D vertices

• One application of mesh parameterization is texture mapping

2

Page 3: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

UVMapper in Blender

3

Page 4: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Introduction (cont)

• Another class of application concerns remeshing algorithm– converting from a mesh representation into an

alternative one

4

Page 5: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Introduction (cont)

• In summary, constructing a parameterization of a triangulated surface means finding a set of coordinates (ui,vi) associated to each vertex i.

• Moreover, the parameter space does not self-intersect.

5Self-intersect

Page 6: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Mappings in the PMP Book

• 5.3 Barycentric mappingTutte-Floater

Discrete Laplacian (Laplace-Beltrami)

• 5.4 Conformal mapping5.4.2 Least square conformal maps

5.4.4 (Geometric-based) ABF (angle-based flattening)

• [5.5 Distortion analysis based methods]

6

Page 7: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Barycentric Mapping

• One of the most widely used

• Based on Tutte’s barycentric mapping theorem from graph theory [Tutte60]

7

Page 8: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

WikipediaConvex combination

Barycentric coordinate system

8

Page 9: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Barycentric Mapping (cont)

• Fixing the vertices of the boundary on a convex polygon. The coordinates at the internal vertices are found by solving the equation.

One simple way:(without considering mesh geometry)

9

Page 10: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Example

5

1

0,00,0

3,02,01,05,04,0

j

jaa

aaaaa

0 1

3 2

4 5

7 6

3

3

2

2

1

1

5

5

4

4

0

0

3

33,0

2

22,0

1

11,0

5

55,0

4

44,0

0

00,0

0,0

3,0

0,0

2,0

0,0

1,0

0,0

5,0

0,0

4,0

0

v

u

v

u

v

u

v

u

v

u

v

u

v

ua

v

ua

v

ua

v

ua

v

ua

v

ua

a

a

a

a

a

a

a

a

a

a

10

Page 11: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

0

0

0

0

77,366,355,344,333,322,311,300,3

77,266,255,244,233,222,211,200,2

77,166,155,144,133,122,111,100,1

77,066,055,044,033,022,011,000,0

uauauauauauauaua

uauauauauauauaua

uauauauauauauaua

uauauauauauauaua

77,344,3

77,266,255,2

55,1

55,044,0

7

6

5

4

7,34,3

7,26,25,2

5,1

5,04,0

3

2

1

0

3,32,30,3

3,22,21,20,2

2,11,10,1

3,02,01,00,0

00

0

000

00

0

0

uaua

uauaua

ua

uaua

u

u

u

u

aa

aaa

a

aa

u

u

u

u

aaa

aaaa

aaa

aaaa

ij

jiii aa ,, 7,6,5,4:Boundary3,2,1,0:Internal

Ax = b, Solved by Gauss Seidel

11DETAILS

Page 12: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Discrete harmonic coordinates [Eck et al 1995]

Mean value coordinates [Floater 2003]

Other Alternatives

12

Page 13: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Mean Value Coordinate

13

Page 14: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

For some surfaces, fixing the boundary on a convex polygon may be problematic

“Free” boundary 14

Page 15: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Conformal Mapping

• Iso-u and iso-v lines are orthogonal• Minimize mesh distorsion

A conformal parameterization transforms a small circle into a small circle. It is locally a similarity transform.

vuXzyx T ,,,

15

Page 16: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Types of Distortion

• L stretch, L shear, AngD– Isometric (length-preserving)– Conformal (angle-preserving)– Equi-areal (area-preserving)

• Global isometric paramterization only exists for developable surfaces, with vanishing Gaussian curvature K(p) = 0 at all surface points

a developable surface is a surface with zero Gaussian curvature. That is, it is a "surface" that can be flattened onto a plane without distortion (i.e. "stretching" or "compressing"). 

16

Page 17: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

[Differential Geometry Primer]

• Gaussian curvature

17

Page 18: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Gradient in a Triangle

Study the inverse of parameterization: maps (X,Y) of the triangle to a point (u,v)

u intersects the iso-u lines; v intersects the iso-v lines

X, Y: orthonormal basis of the trianglexi, xj, xk: vertex coordinates in the XY basis

Conformality condition

vu

iso-u lines iso-v lines

18

DETAILS

Page 19: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

19

Page 20: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Least Square Conformal Map

Only developable surfaces admit a conformal paramterization.For general (non-developable) surface, LSCM minimizes an energy ELSCM that corresponds to the non-conformality of the application

ELSCM is invariant to translation and rotation in the parametric space. To have a unique minimizer, it is required to fixed at least two vertices.

Mimizing a quadratic form

From [Levy et al.2002], if the pinned vertices are chosen on the boundary, all the triangles are consistently oriented (no flips). 20

Page 21: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Quadratic Optimization

Quadratic form: a polynomial function that the degree is not larger than two.

G is symmetric

Minimizer occurs at its stationary point:

21

Page 22: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Least Square

(m > n)

Minimize the sum of residuals:

F is a quadratic form

Minimizer found at stationary point

22

Page 23: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Least Square with Reduced D.O.F.

nff xxx 1Free parameters

nnfl xxx 1Lock parameters

23

Page 24: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

2

1

3

0

1

3

0

2

3

2

0

3

2

0

2

2

1

0

2

1

0

u

u

u

RM

v

v

v

MA

u

u

u

RM

v

v

v

MA

u

u

u

RM

v

v

v

MAE cccbbbaaaLSCM

0

3

2

1

0

3

2

1

0

v

v

v

v

u

u

u

u

-AaRMa AaMa

Fixed vertices 1 & 2(u1,v1) & (u2,v2) locked

0

2

1

2

1

3

0

3

0

v

v

u

u

v

v

u

u

Variable change columns swap

0

1

3

2

24

2

0

1

a

0

2 3

b

0

3 1

c

Page 25: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

0

2

1

2

1

3

0

3

0

v

v

u

u

v

v

u

u

Af Al

2

1

2

1

3

0

3

0

v

v

u

u

v

v

u

u

Af Al

25

Page 26: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

ELSCM is invariant to translation and rotation in the parametric space. To have a unique minimizer, it is required to fixed at least two vertices.

26

Page 27: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

27

Page 28: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Angle-Based Flattening (ABF)[Sheffer & de Sturler 2000]

Finding (ui,vi) coordinates, in terms of angles, Stable (ui,vi) to i conversion

Constraints:Constrained quadratic optimization with equality constraintsNonlinear optimization

(wheel consistency)

28

Page 29: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Wheel Consistency

2

1

3

1

2

3

1sin

sin

sin

sin

sin

sin

sinsinsinsinsinsin

0sinsinsinsinsinsin

3

3

2

2

1

1

321321

321321

a b

c

1sin

sin

sin

sin

sin

sin

sin

sin

sinsin:law Sine

3

3

2

2

1

1

1

1

11

c

a

b

c

a

b

a

b

ba

29

Page 30: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

1963

1995

2003

2002

30

Page 31: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Other Issues

Segmentation and atlas

Page 32: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

32

Page 33: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Model Segmentation

• Planar parameterization is only applicable to surfaces with disk topology

• Closed surfaces and surfaces with genus greater than zero have to be cut prior to planar parameterization

• Cut to reduce complexity (to reduce distortion)• Cut introduce cross-cut discontinuities• Segmentation technique (partition the surface into

multiple charts) and seam generaton technique (introduce cuts into the surface but keep it as a single chart)

33

Page 34: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Numerical Optimization

From “Mesh Parameterization,

Theory and Practice”,

Siggraph 2007 Coursenote

Page 35: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Sparse Linear System

SOR (successive over-relaxation)• Simplest, both from the conceptual and the

implementation points of view

35

Page 36: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

SOR (cont)New Update Scheme: Successive Over-Relaxation

1

36

Page 37: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

Other Methods

• Conjugate gradient method• Sparse direct solvers (LU)

Summary• SOR-like methods are easy to understand and

implement, but do not perform well for more than 10K variables

• Direct methods are most efficient, but consume considerable amounts of memory

37

Page 38: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

References

• “Polygon Mesh Processing”, Mario Botsch, Leif Kobbelt, Mark Pauly, Pierre Alliez and Bruno Levy, AK Peters, 2010

• “Mesh Parameterization: Theory and Practice”, Kai Hormann, Bruno Lévy and Alla Sheffer, ACM SIGGRAPH Course Notes, 2007

• “Least Squares Conformal Maps for Automatic Texture Atlas Generation”, Bruno Lévy, Sylvain Petitjean, Nicolas Ray and Jérome Maillot, ACM SIGGRAPH conference proceedings, 2002

38

Page 39: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

0

0

0

0

77,366,355,344,333,322,311,300,3

77,266,255,244,233,222,211,200,2

77,166,155,144,133,122,111,100,1

77,066,055,044,033,022,011,000,0

uauauauauauauaua

uauauauauauauaua

uauauauauauauaua

uauauauauauauaua

0

7

6

5

4

3

2

1

0

u

u

u

u

u

u

u

u

Ai Ab

7

6

5

4

3

2

1

0

u

u

u

u

u

u

u

u

Ai Ab

39BACK

Page 40: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

[From Siggraph Course 2007]

Study inverse of parameterization (X,Y) (u,v)

(i,j,k) barycentric coordinates, computed as:

40

kkjjii

kkjjii

vvvYXv

uuuYXu

),(

),(

Page 41: Parameterization. Introduction The goal of parameterization is to attach a coordinate system to the object –In particular, assign (2D) texture coordinates.

MT solely depends on the geometry of the triangle T

u=

41

k

j

i

kji

kji

k

j

i

kjikkjjii

u

u

u

TTuuu

X

u

Y

X

TuuuuuuuuuYXu

2

1

2

1

12

1),(

Similarly, we can get Y

u

BACK