3D Surface Parameterization Olga Sorkine, May 2005.

46
3D Surface 3D Surface Parameterization Parameterization Olga Sorkine, May 2005 Olga Sorkine, May 2005

Transcript of 3D Surface Parameterization Olga Sorkine, May 2005.

Page 1: 3D Surface Parameterization Olga Sorkine, May 2005.

3D Surface Parameterization3D Surface Parameterization

Olga Sorkine, May 2005Olga Sorkine, May 2005

Page 2: 3D Surface Parameterization Olga Sorkine, May 2005.

Part OnePart One

Parameterization and PartitionParameterization and Partition

Some slides borrowed from Pierre Alliez and Craig Gotsman

Page 3: 3D Surface Parameterization Olga Sorkine, May 2005.

What is a parameterization?What is a parameterization?

S S R R3 3 - given surface - given surface

D D R R22 - parameter domain - parameter domain

ss : D : D S 1-1 and onto S 1-1 and onto

),(

),(

),(

),(

vuz

vuy

vux

vus

Page 4: 3D Surface Parameterization Olga Sorkine, May 2005.

Example – flattening the earthExample – flattening the earth

Page 5: 3D Surface Parameterization Olga Sorkine, May 2005.

Isoparametric curves Isoparametric curves on the surfaceon the surface

One parameter fixed, one varies:One parameter fixed, one varies:

Family 1 (varying u): Family 1 (varying u): LLv0 v0 ((uu)) = = ss((uu, v, v00))

Family 2 (varying v): Family 2 (varying v): MMu0 u0 ((vv)) = = ss((vv00, , vv))

Page 6: 3D Surface Parameterization Olga Sorkine, May 2005.

Analytic example:Analytic example:

Parameters: Parameters: u = x, v = yu = x, v = y

D = D = [[––1,1]1,1][[––1,1]1,1]. .

z = zz = z((x,yx,y)) = – = –((xx22+y+y22))

ss((x,yx,y)) = = ((x, y, zx, y, z((x,yx,y))))

Page 7: 3D Surface Parameterization Olga Sorkine, May 2005.

-1

1

h

Another example:Another example:

Parameters: Parameters: , , hh

D = D = [0,[0,]][[––1,1]1,1]

xx((, h, h)) = cos = cos(())

yy((, h, h)) = h = h

zz((, h, h)) = sin = sin(())

Page 8: 3D Surface Parameterization Olga Sorkine, May 2005.

Triangular MeshTriangular Mesh

• Standard Standard discretediscrete 3D surface representation 3D surface representation in Computer Graphics – piecewise linearin Computer Graphics – piecewise linear

• Mesh GeometryMesh Geometry: list of vertices (3D points of : list of vertices (3D points of the surface)the surface)

• Mesh Connectivity or TopologyMesh Connectivity or Topology: description : description of the facesof the faces

Page 9: 3D Surface Parameterization Olga Sorkine, May 2005.

Triangular MeshTriangular Mesh

Page 10: 3D Surface Parameterization Olga Sorkine, May 2005.

Triangular MeshTriangular Mesh

Page 11: 3D Surface Parameterization Olga Sorkine, May 2005.

Mesh RepresentationMesh Representation

GeometryGeometry::vv1 1 – (x – (x11, y, y11, z, z11))

vv2 2 – (x– (x22, y, y22, z, z22))

vv3 3 – (x– (x33, y, y33, z, z33))......vvn n – (x– (xnn, y, ynn, z, znn))

TopologyTopology::Triangle listTriangle list

{v{v11, v, v22, v, v33}}......{v{vkk, v, vll, v, vmm}}

vv11

vv22vv33

vvnn

Page 12: 3D Surface Parameterization Olga Sorkine, May 2005.

Mesh ParameterizationMesh Parameterization

• Uniquely defined by mapping mesh Uniquely defined by mapping mesh vertices to the parameter domain:vertices to the parameter domain:

UU : {v : {v11, …, v, …, vnn}} D D R R22

UU(v(vii) = () = (uuii, v, vii))

• No two edges cross in the plane (in No two edges cross in the plane (in DD))

Mesh parameterization Mesh parameterization mesh embedding mesh embedding

Page 13: 3D Surface Parameterization Olga Sorkine, May 2005.

Mesh parameterizationMesh parameterization

Parameter domainD R2

Mesh surface

S R3

EmbeddingEmbedding

UU

ParameterizatioParameterizatio

nn ss

s = U -1

Page 14: 3D Surface Parameterization Olga Sorkine, May 2005.

Mesh parameterizationMesh parameterization

Page 15: 3D Surface Parameterization Olga Sorkine, May 2005.

Mesh parameterizationMesh parameterization

ss and and UU are piecewise-linear are piecewise-linear

Linear inside each mesh triangleLinear inside each mesh triangle

In 2D In 3DUU

ss

A mapping between two triangles is a unique affine

mapping

Page 16: 3D Surface Parameterization Olga Sorkine, May 2005.

A B

C

P

Barycentric coordinatesBarycentric coordinates

, , , , , ,

, , , , , ,

, , denotes the (signed) area of the triangle

P B C P C A P A BP A B C

A B C A B C A B C

Page 17: 3D Surface Parameterization Olga Sorkine, May 2005.

Mapping triangle to triangleMapping triangle to triangless

p1p2

p3

q1 q2

q3

3321

212

321

131

321

32

,,

,,

,,

,,

,,

,,)( q

ppp

ppq

ppp

ppq

ppp

pp pppps

Page 18: 3D Surface Parameterization Olga Sorkine, May 2005.

• Only topological disks can be embeddedOnly topological disks can be embedded

• Other topologies must be “cut” or partitionedOther topologies must be “cut” or partitioned

Page 19: 3D Surface Parameterization Olga Sorkine, May 2005.

Non-simple domainsNon-simple domains

Page 20: 3D Surface Parameterization Olga Sorkine, May 2005.

CuttingCutting

Page 21: 3D Surface Parameterization Olga Sorkine, May 2005.

Applications of parameterizationApplications of parameterization

• Texture mappingTexture mapping

• Surface resampling (remeshing)Surface resampling (remeshing)– Mesh compressionMesh compression– Multiresolution analysisMultiresolution analysis

Using parameterization, we can Using parameterization, we can operate on the 3D surface as if it operate on the 3D surface as if it were flatwere flat

Page 22: 3D Surface Parameterization Olga Sorkine, May 2005.

Texture mappingTexture mapping

Page 23: 3D Surface Parameterization Olga Sorkine, May 2005.

Texture mappingTexture mapping

Page 24: 3D Surface Parameterization Olga Sorkine, May 2005.

Texture mappingTexture mapping

Page 25: 3D Surface Parameterization Olga Sorkine, May 2005.

Remeshing Remeshing

Page 26: 3D Surface Parameterization Olga Sorkine, May 2005.

Remeshing Remeshing

Page 27: 3D Surface Parameterization Olga Sorkine, May 2005.

Remeshing Remeshing

parameterizationparameterization

resamplingresampling

Page 28: 3D Surface Parameterization Olga Sorkine, May 2005.

RemeshingRemeshing

Page 29: 3D Surface Parameterization Olga Sorkine, May 2005.

Remeshing examplesRemeshing examples

Page 30: 3D Surface Parameterization Olga Sorkine, May 2005.

More remeshing examplesMore remeshing examples

Page 31: 3D Surface Parameterization Olga Sorkine, May 2005.

Bad parameterization…Bad parameterization…

Page 32: 3D Surface Parameterization Olga Sorkine, May 2005.

Distortion measuresDistortion measures

• Angle preservationAngle preservation

• Area preservationArea preservation

• StretchStretch

• etc...etc...

Page 33: 3D Surface Parameterization Olga Sorkine, May 2005.

Bad parameterizationBad parameterization

Page 34: 3D Surface Parameterization Olga Sorkine, May 2005.

Better…Better…

Page 35: 3D Surface Parameterization Olga Sorkine, May 2005.

Distortion minimizationDistortion minimization

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

Texture map

Page 36: 3D Surface Parameterization Olga Sorkine, May 2005.

Resampling problemsResampling problems

Cat mesh Distortingembedding

Resamplingon regular grid

Page 37: 3D Surface Parameterization Olga Sorkine, May 2005.

Dealing with distortion and Dealing with distortion and non-disk topologynon-disk topology

ProblemsProblems: :

1) Parameterization of complex surfaces 1) Parameterization of complex surfaces introduces introduces distortion. distortion.

2) Only topological disk can be embedded.2) Only topological disk can be embedded.

SolutionSolution: : partitionpartition and/or and/or cutcut the mesh into the mesh into several patches, parameterize each patch several patches, parameterize each patch independently.independently.

Page 38: 3D Surface Parameterization Olga Sorkine, May 2005.

PartitionPartition

Page 39: 3D Surface Parameterization Olga Sorkine, May 2005.

Introducing seams (cuts)Introducing seams (cuts)

Page 40: 3D Surface Parameterization Olga Sorkine, May 2005.

Introducing seams (cuts)Introducing seams (cuts)

Page 41: 3D Surface Parameterization Olga Sorkine, May 2005.

Introducing seams (cuts)Introducing seams (cuts)

Page 42: 3D Surface Parameterization Olga Sorkine, May 2005.

Introducing seams (cuts)Introducing seams (cuts)

Page 43: 3D Surface Parameterization Olga Sorkine, May 2005.

Partition – problemsPartition – problems

• Discontinuity of parameterizationDiscontinuity of parameterization

• Visible artifacts in texture mappingVisible artifacts in texture mapping

• Require special treatmentRequire special treatment– Vertices along seams have several (u,v) Vertices along seams have several (u,v)

coordinatescoordinates– Problems in mip-mappingProblems in mip-mapping

Make seams short and hide them

Page 44: 3D Surface Parameterization Olga Sorkine, May 2005.

Piecewise continuous Piecewise continuous parameterizationparameterization

Page 45: 3D Surface Parameterization Olga Sorkine, May 2005.

SummarySummary

• “ “Good” parameterization = non-distortingGood” parameterization = non-distorting– Angles and area preservationAngles and area preservation– Continuous param. of complex surfaces cannot Continuous param. of complex surfaces cannot

avoid distortion.avoid distortion.

• “ “Good” partition/cut:Good” partition/cut:– Large patches, minimize seam lengthLarge patches, minimize seam length– Align seams with features (=hide them)Align seams with features (=hide them)

Page 46: 3D Surface Parameterization Olga Sorkine, May 2005.

End of Part OneEnd of Part One