Computer Graphics Remeshing Parameterization Convex mapping - - PDF document

computer graphics
SMART_READER_LITE
LIVE PREVIEW

Computer Graphics Remeshing Parameterization Convex mapping - - PDF document

The plan for today Reminder: triangle meshes What is parameterization and what is it good for: Texture mapping Computer Graphics Remeshing Parameterization Convex mapping Texture mapping and Harmonic mapping


slide-1
SLIDE 1

Computer Graphics

By Olga Sorkine Some slides courtesy of Pierre Alliez and Craig Gotsman

Texture mapping and parameterization

2

The plan for today

Reminder: triangle meshes What is parameterization and what is it good for:

Texture mapping Remeshing

Parameterization

Convex mapping Harmonic mapping

3

Triangle mesh

Discrete surface representation Piecewise linear surface (made of triangles)

4

Triangle mesh

Geometry:

Vertex coordinates (x1, y1, z1) (x2, y2, z2)

. . .

(xn, yn, zn) Connectivity (the graph) List of triangles (i1, j1, k1) (i2, j2, k2)

. . .

(im, jm, km)

5

2D parameterization

3D space (x,y,z) 2D parameter domain (u,v) boundary boundary

6

Application - Texture mapping

slide-2
SLIDE 2

7

Requirements

Bijective (1-1 and onto): No triangles fold over. Minimal “distortion”

Preserve 3D angles Preserve 3D distances Preserve 3D areas No “stretch”

8

Distortion minimization

Kent et al ‘92 Floater 97 Sander et al ‘01

Texture map

9

More texture mapping

10

Applications

Texture Mapping Remeshing Surface Reconstruction Morphing Compression

Remeshing

12

Remeshing examples

slide-3
SLIDE 3

13

More remeshing examples

14

Conformal parametrization

Texture map Tutte Shape-preserving Conformal

15

Non-simple domains

16

Cutting

17

Parameterization of closed genus-0 triangle meshes

Non-Constrained Planar Spherical

18

Convex mapping (Tutte, Floater)

Works for meshes equivalent to a disk First, we map the boundary to a convex polygon Then we find the inner vertices positions v1, v2, …, vn – inner vertices; vn+1, …, vN – boundary vertices

slide-4
SLIDE 4

19

Inner vertices

We constrain each inner vertex to be a weighted

average of its neighbors:

( )

1, 2, ,

i ij j j N i

, i n λ

= =

… v v

( )

, are not neighbors ( , ) (neighbours) 1

ij ij j N i

i j i j E λ λ

 = > ∈  =

λi,j

i j

20

Linear system of equations

( ) ( )\ ( )

1, 2, , 1, 2, ,

i ij j j N i i ij j ik k j N i B k N i B

0, i n , i n λ λ λ

∈ ∈ ∈

− = = − = =

∑ ∑ ∑

… … v v v v v

                =                                 − − − −

n n j n j j j

d

σ σ σ λ λ λ λ

2 1 2 1 , , 4 , 1 , 1

1 1 1 1

5 1 1 1

v v v

  • 21

Shape preserving weights

To compute λ1, …, λ5, a local embedding of the patch is found:

1) || pi – p || = || xi – x || 2) angle(pi, p, pi+1) = (2π /Σθi ) angle(vi, v, vi+1)

p4 p3 p5 p1 p p2 2D 3D

p = Σ λi pi

λi > 0 Σ λi = 1 ⇒ use these λ as edge weights. ∃ λi , v3 v2 v1 v4 v5 v θ1

22

Linear system of equations

A unique solution always exists Important: the solution is legal (bijective) The system is sparse, thus fast numerical

solution is possible

Numerical problems (because the vertices in the

middle might get very dense…)

23

Harmonic mapping

Another way to find inner vertices Strives to preserve angles (conformal) We treat the mesh as a system of springs. Define spring energy:

where vi are the flat position (remember that the boundary vertices vn+1, …, vN are constrained).

− =

E j i j i j i harm

k E

) , ( 2 ,

2 1 v v

24

Energy minimization – least squares

We want to find such flat positions that the

energy is as small as possible.

Solve the linear least squares problem!

( ).

) ( ) ( 2 1 2 1 ) , , , , , ( ) , (

) , ( 2 2 , ) , ( 2 , 1 1

∑ ∑

∈ ∈

− + − = = − = =

E j i j i j i j i E j i j i j i n n harm i i i

y y x x k k y y x x E y x v v v … …

Eharm is function of 2n variables

slide-5
SLIDE 5

25

Energy minimization – least squares

To find minimum: ∇Eharm= 0 Again, xn+1,…., xN and yn+1, …, yN are constrained.

) ( 2 2 1 ) ( 2 2 1

) ( , ) ( ,

= − = ∂ ∂ = − = ∂ ∂

∑ ∑

∈ ∈ i N j j i j i harm i i N j j i j i harm i

y y k E y x x k E x

26

Energy minimization – least squares

To find minimum: ∇Eharm= 0 Again, xn+1,…., xN and yn+1, …, yN are constrained.

n i y y k n i x x k

i N j j i j i i N j j i j i

, , 2 , 1 , ) ( , , 2 , 1 , ) (

) ( , ) ( ,

… … = = − = = −

∑ ∑

∈ ∈

27

The spring constants ki,j

The weights ki,j are chosen to minimize angles

distortion:

Look at the edge (i, j) in the 3D mesh Set the weight ki,j = cot α + cot β α β i j 3D

28

Discussion

The results of harmonic mapping are better than those of

convex mapping (local area and angles preservation).

But: the mapping is not always legal (the weights can be

negative for badly-shaped triangles…)

Both mappings have the problem of fixed boundary –

it constrains the minimization and causes distortion.

There are more advanced methods that do not require

boundary conditions.

See you next time