computer graphics
play

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


  1. 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 parameterization By Olga Sorkine 2 Some slides courtesy of Pierre Alliez and Craig Gotsman Triangle mesh Triangle mesh � Geometry: � Discrete surface representation � Vertex coordinates � Piecewise linear surface (made of triangles) (x 1 , y 1 , z 1 ) (x 2 , y 2 , z 2 ) . . . (x n , y n , z n ) � Connectivity (the graph) � List of triangles (i 1 , j 1 , k 1 ) (i 2 , j 2 , k 2 ) . . . (i m , j m , k m ) 4 3 Application - Texture mapping 2D parameterization 3D space ( x,y,z ) 2D parameter domain ( u,v ) boundary boundary 6 5

  2. Distortion minimization Requirements � Bijective (1-1 and onto): No triangles fold over. � Minimal “distortion” � Preserve 3D angles � Preserve 3D distances � Preserve 3D areas Texture map � No “stretch” Kent et al ‘92 Floater 97 Sander et al ‘01 8 7 Applications More texture mapping � Texture Mapping � Remeshing � Surface Reconstruction � Morphing � Compression 10 9 Remeshing Remeshing examples 12

  3. Conformal parametrization More remeshing examples Tutte Shape-preserving Conformal Texture map 14 13 Cutting Non-simple domains 16 15 Convex mapping (Tutte, Floater) Parameterization of closed genus-0 triangle meshes � Works for meshes equivalent to a disk � First, we map the boundary to a convex polygon � Then we find the inner vertices positions v 1 , v 2 , …, v n – inner vertices; v n+1 , …, v N – boundary vertices Spherical Non-Constrained Planar 18 17

  4. Linear system of equations Inner vertices � We constrain each inner vertex to be a weighted ∑ − λ = = v v 0, i 1, 2, … , n i ij j average of its neighbors: j N i ∈ ( ) ∑ ∑ j − λ = λ = v v v , i 1, 2, … , n ∑ i ij j ik k = λ = v v , i 1, 2, … , n ∈ ∈ j N i ( )\ B k N i ( ) ∩ B i ij j λ i,j ∈ j N i ( ) i  − λ − λ  σ 1  v     0 i j , are not neighbors  1 , j 1 , j   1   1  1 d 1 λ = >  1  σ  v    ij ∈ 0 ( , ) i j E (neighbours)  2 2       1 = ∑ λ = 1       ij  − λ  �  �    ∈ j N i ( ) 4 , j  1      − λ σ 1 v       n , j n n 5 20 19 Linear system of equations Shape preserving weights v θ 1 3D p 1 2D � A unique solution always exists p 5 v 1 v 4 p 2 v 5 � Important: the solution is legal (bijective) p p 4 v 3 v 2 p 3 � The system is sparse, thus fast numerical To compute λ 1 , …, λ 5 , a local embedding of the patch is found : solution is possible 1) || p i – p || = || x i – x || � Numerical problems (because the vertices in the 2) angle ( p i , p , p i+1 ) = (2 π / Σ θ i ) angle ( v i , v , v i+1 ) middle might get very dense…) p = Σ λ i p i ⇒ use these λ as edge weights . λ i > 0 ∃ λ i , Σ λ i = 1 22 21 Energy minimization – least squares Harmonic mapping � Another way to find inner vertices � We want to find such flat positions that the � Strives to preserve angles (conformal) energy is as small as possible. � We treat the mesh as a system of springs. � Solve the linear least squares problem! � Define spring energy: = v ( x , y ) i i i 1 ∑ 2 = − 1 E k v v ∑ 2 E ( x , … , x , y , … , y ) = k v − v = harm i , j i j 2 harm 1 n 1 n i , j i j 2 ( i , j ) ∈ E ( i , j ) ∈ E ( ) . 1 ∑ = − 2 + − 2 k ( x x ) ( y y ) where v i are the flat position (remember that the boundary i , j i j i j 2 ∈ ( i , j ) E vertices v n+1 , …, v N are constrained). E harm is function of 2n variables 24 23

  5. Energy minimization – least squares Energy minimization – least squares � To find minimum: ∇ E harm = 0 � To find minimum: ∇ E harm = 0 ∂ 1 ∑ ∑ − = = = − = k ( x x ) 0 , i 1 , 2 , … , n E 2 k ( x x ) 0 i , j i j ∂ harm i , j i j x 2 ∈ j ∈ N ( i ) i j N ( i ) ∑ ∂ − = = 1 k ( y y ) 0 , i 1 , 2 , … , n ∑ = − = E 2 k ( y y ) 0 i , j i j ∂ harm i , j i j y 2 ∈ j N ( i ) j ∈ N ( i ) i � Again, x n+1 ,…., x N and y n+1 , …, y N are constrained. � Again, x n+1 ,…., x N and y n+1 , …, y N are constrained. 26 25 Discussion The spring constants k i,j � The results of harmonic mapping are better than those of � The weights k i,j are chosen to minimize angles convex mapping (local area and angles preservation). distortion: � But: the mapping is not always legal (the weights can be � Look at the edge ( i, j ) in the 3D mesh negative for badly-shaped triangles…) � Set the weight k i,j = cot α + cot β � Both mappings have the problem of fixed boundary – it constrains the minimization and causes distortion. i � There are more advanced methods that do not require β boundary conditions. α 3D j 28 27 See you next time

Recommend


More recommend