Spring 2017 CSCI 621: Digital Geometry Processing 9.1 Surface Parameterization Hao Li http://cs621.hao-li.com 1
Modeling 2
Modeling 3
Viewpaint The creation of a 3D assets surface, including that surface’s color, texture, opacity, and reflectivity (or specularity). 4
Viewpaint Rango: Creating creature scale textures in ZBrush... 5
Viewpaint (Wrinkle Pass) 6
Color Maps 7
Wet Maps 8
bump Maps 9
Motivation Texture Mapping Levy et al.: Least squares conformal maps for automatic texture atlas generation , SIGGRAPH 2002. 10
Motivation Normal Mapping 11
Motivation 12
Motivation 13
Motivation 14
Mesh Parameterization Find a 1-to-1 mapping between given surface mesh and 2D parameter domain 15
Unfolding Earth A C B D C A B D 16
Spherical Coordinates π φ φ θ −π θ 0 2 π � θ ⇤ ⌅ sin θ sin φ ⇥ cos θ sin φ ⇥� ⇧ ⌃ φ cos φ 17
Desirable Properties Low distortion Bijective mapping 18
Cartography orthographic stereographic Mercator Lambert preserves angles preserves area = conformal = equiareal Floater, Hormann: Surface Parameterization: A Tutorial and Survey , Advances in Multiresolution for Geometric Modeling, 2005 19
More Maps 20
Demo: Parameterization 21
Recall: Differential Geometry Parametric surface representation x : Ω � IR 2 S � IR 3 ⇥ x u x v x ( u, v ) p y ( u, v ) ( u, v ) ⇤⇥ z ( u, v ) Regular if • Coordinate functions x,y,z are smooth • Tangents are linearly independent x u � x v ⇥ = 0 22
Definitions A regular parameterization is x : Ω → S • Conformal (angle preserving), if the angle of every pair of S intersecting curves on is the same as that of the Ω corresponding pre-images in . • Equiareal (area preserving) if every part of is mapped Ω S onto a part of with the same area • Isometric (length preserving), if the length of any arc on S Ω is the same as that of its pre-image in . 23
Distortion Analysis x : IR 2 → IR 3 u = ( u, v ) x = ( x, y, z ) Jacobian transforms infinitesimal vectors x u x v d x = J d u J = y u y v z u z v � d x � 2 = (d u ) T J T J d u = (d u ) T I d u 24
First Fundamental Form Characterizes the surface locally � x T x T ⇥ u x u u x v I = x T x T u x v v x v Allows to measure on the surface d u T � ⇥ cos θ = 1 I d u 2 / ( ⇥ d u 1 ⇥ · ⇥ d u 2 ⇥ ) • Angles d s 2 = d u T I d u • Length d A = det( I ) d u d v • Area 25
Isometric Maps x ( u, v ) A regular parameterization is isometric, iff its first fundamental form is the identity: � ⇥ 1 0 I ( u, v ) = 0 1 A surface has an isometric parameterization iff it has zero Gaussian curvature 26
Cylinder 27
Conformal Maps (A-Similar-AP) x ( u, v ) A regular parameterization is conformal, iff its first fundamental form is a scalar multiple of the identity: � ⇥ 1 0 I ( u, v ) = s ( u, v ) · 0 1 f 28
Conformal Flow 29 Crane et al. Spin Transformations of Discrete Surfaces, ACM Siggraph 2011
Equiareal Maps x ( u, v ) A regular parameterization is equiareal, iff the determinant of its first fundamental form is 1: det( I ( u, v )) = 1 30
Relationships An isometric parameterization is conformal and equiareal, and vice versa: isometric ⇔ conformal + equiareal Isometric is ideal, but rare. In practice, people try to compute: • Conformal • Equiareal • Some balance between the two 31
Harmonic Maps • A regular parameterization is harmonic, iff it x ( u, v ) satisfies ∆ x ( u, v ) = 0 • isometric ⇒ conformal ⇒ harmonic • Easier to compute than conformal, but does not preserve angles 32
Harmonic Maps • A harmonic map minimizes the Dirichlet energy Z Z kr x k 2 = k x u k 2 + k x v k 2 d u d v Ω Ω • Variational calculus then tells us that ∆ x ( u, v ) = 0 • If is harmonic and maps the boundary of x : Ω → S ∂ Ω Ω ⊂ R 2 a convex region homeomorphically onto the boundary , then is one-to-one. ∂ S x 33
Parameterization Goal • Piecewise linear mapping of a discrete 3D triangle mesh onto a planar 2D polygon • Slightly different situation: Given a 3D mesh, compute the inverse parameterization 34
Floater’s Parameterization 35
Floater’s Parameterization • For Quadrilateral Patch • Fix the parameters of the boundary vertices on a unit square • Derive the bijection for each of the interior vertices v i u by solving 36
Floater’s Algorithm • Compute for each the i v ( i ) • Compute a local parameterization for that preserves the aspect ratio of the angle and length • Compute that satisfies • Solve the sparse equation for u ( v i ) , i = 1 . . . n 37
Discrete Harmonic Maps • Map the boundary homeomorphically to some ∂ S (convex) polygon in the parameter plane ∂ Ω • Minimize the Dirichlet energy of by solving the u corresponding Euler-Lagrange PDE ∆ S u = 0 • Requires discretization of Laplace-Beltrami • Compare to surface fairing 38
Discrete Harmonic Maps • System of linear equations � ∀ v i ∈ S : w ij ( u ( v j ) − u ( v i )) v j ∈ N 1 ( v i ) α ij w ij = cot α ij + cot β ij v i v j β ij • Properties of system matrix: • Symmetric + positive definite → unique solution • Sparse → efficient solvers 39
Discrete Harmonic Maps • But… • Does the same theory hold for discrete harmonic maps as for harmonic maps? • In other words, is it possible for triangles to flip or become degenerate? 40
Convex Combination Maps • If the linear equations are satisfied � w ij ( u ( v j ) − u ( v i )) v j ∈ N 1 ( v i ) and if the weights satisfy � w ij > 0 w ij = 1 ∧ v j ∈ N 1 ( v i ) then we get a convex combination mapping. 41
Convex Combination Maps • Each is a convex combination of u ( v j ) u ( v i ) � u ( v i ) = w ij u ( v j ) v j ∈ N 1 ( v i ) • If is a convex combination map that u : S → Ω maps the boundary homeomorphically to the ∂ S Ω ⊂ R 2 boundary of a convex region , then ∂ Ω u is one-to-one. 42
Convex Combination Maps • Uniform barycentric weights w ij = 1 / valence( v i ) • Cotangent weights ( if ) α ij + β ij < π > 0 w ij = cot( α ij ) + cot( β ij ) α ij δ ij v i γ ij • Mean value weights v j β ij w ij = tan( δ ij / 2) + tan( γ ij / 2) ⇥ p j � p i ⇥ (no negative weights, even for obtuse angles) 43
Convex Combination Maps • Comparison original uniform mean cotan mesh weights value weights (shape preserving) 44
Fixing the Boundary • Choose a simple convex shape • Triangle, square, circle • Distribute points on boundary • Use chord length parameterization Fixed boundary can create high distortion 45
Open Boundary Mappings • Include boundary vertices in the optimization • Produces mappings with lower distortion 46
Open Boundary Mappings 47
Need disk-like topology • Introduce cuts on the mesh 48
Naive Cut, Numerical Problems 49
Smart Cut, Free Boundary 50
Texture Atlas Generation • Split model into number of patches (atlas) • because higher genus models cannot be mapped onto plane and/or • because distortion, the number of patches will be too high eventually Levy, Petitjean, Ray, Maillot: Least Squares Conformal Maps for Automatic Texture Atlas Generation , SIGGRAPH, 2002 51
Texture Atlas Generation • Split model into number of patches (atlas) • because higher genus models cannot be mapped onto plane and/or • because distortion, the number of patches will be too high eventually Levy, Petitjean, Ray, Maillot: Least Squares Conformal Maps for Automatic Texture Atlas Generation , SIGGRAPH, 2002 52
Non-Planar Domains seamless, continuous parameterization of genus-0 surfaces 53
Global Parameterization – Range Images 54
Constrained Parameterizations Levy: Constraint Texture Mapping , SIGGRAPH 2001. 55
Literature • Book, Chapter 5 • Hormann et al.: Mesh Parameterization, Theory and Practice, Siggraph 2007 Course Notes • Floater and Hormann: Surface Parameterization: a tutorial and survey, advances in multiresolution for geometric modeling, Springer 2005 • Hormann, Polthier, and Sheffer, Mesh Parameterization: Theory and Practice, SIGGRAPH Asia 2008 Course Notes 56
Next Time Decimation 57
http://cs621.hao-li.com Thanks! 58
Recommend
More recommend