DIGITAL GEOMETRY PROCESSING Algorithms for Representing, Analyzing - - PowerPoint PPT Presentation

digital geometry processing
SMART_READER_LITE
LIVE PREVIEW

DIGITAL GEOMETRY PROCESSING Algorithms for Representing, Analyzing - - PowerPoint PPT Presentation

DIGITAL GEOMETRY PROCESSING Algorithms for Representing, Analyzing and Comparing 3D shapes Announcement If taking course for credit: Submit all of the basic exercises (the code + 1 paragraph description in case you had trouble). Submit


slide-1
SLIDE 1

DIGITAL GEOMETRY PROCESSING

Algorithms for Representing, Analyzing and Comparing 3D shapes

slide-2
SLIDE 2

Announcement

If taking course for credit:

  • Submit all of the basic exercises (the code + 1

paragraph description in case you had trouble).

  • Submit one bonus exercise and a 2-3 page write-up

describing the implementation and the results.

  • Of course, can pick your own project if you want.
slide-3
SLIDE 3

Today

  • Surface Parameterization
slide-4
SLIDE 4

Today

  • Painting on Surfaces

Mari software Painting directly on the 3d object Substance 3D Painter

slide-5
SLIDE 5

Parameterization

Canonical application: texture mapping

slide-6
SLIDE 6

What we would like to do

slide-7
SLIDE 7

Parameterization Problem

Given a surface (mesh) S in R3 and a domain Ω (e.g. plane): Find a bijective map U: Ω ↔ S.

slide-8
SLIDE 8

Parameterization for Texture Mapping

Bodypaint 3D

slide-9
SLIDE 9

Parameterization for Texture Mapping

Rendering workflow:

slide-10
SLIDE 10

Parameterization – Typical Domains

slide-11
SLIDE 11

Parameterization – Boundary Problem

Source: Mirela Ben-Chen

slide-12
SLIDE 12

Parameterization – Many Possibilities

Source: Mirela Ben-Chen

slide-13
SLIDE 13

Parameterization – Applications

Recall Mesh simplification:

  • Approximate the geometry using few triangles

~600k triangles ~600 triangles

Idea:

  • Decouple geometry from appearance
slide-14
SLIDE 14

Parameterization – Applications

Recall Mesh simplification:

  • Approximate the geometry using few triangles

Idea:

  • Decouple geometry from appearance

Observation: appearance (light reflection) depends on the geometry + normal directions.

slide-15
SLIDE 15

Parameterization – Applications

Idea:

  • Decouple geometry from appearance
  • Encode a normal field inside each triangle

Normal Mapping

Cohen et al., ‘98 Cignoni et al. ‘98

slide-16
SLIDE 16

Parameterization – Applications

Normal Mapping with parameterization:

  • Store normal field as an RGB texture.
slide-17
SLIDE 17

Parameterization – Applications

source: Mirela Ben-Chen

slide-18
SLIDE 18

Parameterization – Applications

source: Mirela Ben-Chen

slide-19
SLIDE 19

Parameterization – Applications

Gu, Gortler, Hoppe. Geometry Images. SIGGRAPH 2002

slide-20
SLIDE 20

Parameterization – Applications

General Idea: Things become easier in a canonical domain (e.g. on a plane). Other Applications:

  • Surface Fitting
  • Editing
  • Mesh Completion
  • Mesh Interpolation
  • Morphing and Transfer
  • Shape Matching
  • Visualization

slide-21
SLIDE 21

Parameterization onto the plane

General problem:

  • Given a mesh (T, P) in 3D find a bijective mapping

g(pi) = ui = (ui, vi)

g : P → R2

g(p1)

g(p2)

slide-22
SLIDE 22

Parameterization onto the plane

General problem:

  • Given a mesh (T, P) in 3D find a bijective mapping

g : P → R2

g(pi) = ui = (ui, vi)

slide-23
SLIDE 23

Parameterization onto the plane

Simplified problem:

  • Given a mesh (T, P) in 3D find a bijective mapping

g : P → R2

g(pi) = ui = (ui, vi)

under some boundary constraints:

g(pi) =?

g(bj) = uj for some {bj}

g(bj) =

slide-24
SLIDE 24

Parameterization onto the plane

Recall a related problem. Mapping the Earth: find a parameterization of a 3d object onto a plane.

slide-25
SLIDE 25

Mapping the earth

Stereographic projection

Hipparchus (190–120 B.C.) Maps circles to circles

slide-26
SLIDE 26

Mapping the earth

Mercator

Gerardus Mercator (1569)

slide-27
SLIDE 27

Mapping the earth

Mercator projection

Maps loxodromes (rhumb lines) to straight lines

Source: Jason Davies https://www.jasondavies.com/maps/loxodrome/

slide-28
SLIDE 28

Mapping the earth

Mercator (preserves angles, but distorts areas)

Gerardus Mercator (1569) Maps loxodromes to lines

slide-29
SLIDE 29

Mapping the earth

Lambert (preserves areas, but distorts angles)

Johann Heinrich Lambert (1772)

slide-30
SLIDE 30

Different kinds of Parameterization

Various notions of distortion: 1. Equiareal: preserving areas (up to scale) 2. Conformal: preserving angles of intersections 3. Isometric: preserving geodesic distances (up to scale) Theorem: Isometric = Conformal + Equiareal

slide-31
SLIDE 31

Different kinds of Parameterization

Intrinsic properties: Those that depend on angles and distances on the surface. E.g. Intrinsic: geodesic distances Extrinsic: coordinates of points in space Remark: Intrinsic properties are preserved by isometries. Bad news: Gauss’s Theorema Egregium: curvature is an intrinsic property. There is no isometric mapping between a sphere and a plane.

slide-32
SLIDE 32

Different kinds of Parameterization

slide-33
SLIDE 33

Different kinds of Parameterization

slide-34
SLIDE 34

Different kinds of Parameterization

Since we are dealing with a triangle mesh, we first need to ensure a bijective map

slide-35
SLIDE 35

Spring Model for Parameterization

Given a mesh (T, P) in 3D find a bijective mapping g(pi) = ui = ( given constraints: g(bj) = uj for some {bj} Model: imagine a spring at each edge of the mesh. If the boundary is fixed, let the interior points find an equilibrium.

slide-36
SLIDE 36

Spring Model for Parameterization

Recall: potential energy of a spring stretched by distance x:

E(x) = 1 2kx2

x

k: spring constant.

slide-37
SLIDE 37

Spring Model for Parameterization

Given an embedding (parameterization) of a mesh, the potential energy of the whole system:

E = X

e

1 2Dekue1 ue2k2 = 1 2

n

X

i=1

X

j∈Ni

1 2Dijkui ujk2

Where is the spring constant of edge e between i and j De = Dij Goal: find the coordinates that would minimize E. {ui} Note: the boundary vertices prevent the degenerate solution.

slide-38
SLIDE 38

Parameterization with Barycentric Coordinates

Finding the optimum of:

E = 1 2

n

X

i=1

X

j∈Ni

1 2Dijkui ujk2

∂E ∂ui = 0 ⇒

X

j∈Ni

Dij(ui − uj) = 0

ui = X

j∈Ni

λijuj, where λij =

Dij P

j∈Ni Dij

I.e. each point must be an convex combination of its neighbors.

ui =

Hence: barycentric coordinates.

slide-39
SLIDE 39

Parameterization with Barycentric Coordinates

To find the solution in practice:

1. Fix the boundary points 2. Form linear equations 3. Assemble into two linear systems (one for each coordinate): 4. Solution of the linear system gives the coordinates: Note: system is very sparse, can solve efficiently.

ui = (ui, vi)

LU = ¯ U, LV = ¯ V

if i ∈ B if i / ∈ B ui = bi, ui − X

j∈Ni

λijuj = 0,

Lij =    1 if i = j −λij if j ∈ Ni, i / ∈ B

  • therwise

bi, i ∈ B

slide-40
SLIDE 40

Parameterization with Barycentric Coordinates

Does this work?

slide-41
SLIDE 41

Laplacian Matrix

Our system of equations (forgetting about boundary):

ui = X

j∈Ni

λijuj, where λij = Dij P

j∈Ni Dij

Lij =    1 if i = j −λij if j ∈ Ni

  • therwise

LU = 0

Alternatively, if we write it as:

ui X

j∈Ni

Dij = X

j∈Ni

Dijuj

We get:

Lij = 8 < : P

k∈Ni Dij

if i = j −Dij if j ∈ Ni

  • therwise

LU = 0

L is not symmetric L is symmetric

slide-42
SLIDE 42

Example: Uniform weights:

Dij = 1

Parameterization with Barycentric Coordinates

slide-43
SLIDE 43

Linear Reproduction:

  • If the mesh is already planar we want to recover the original

coordinates.

Parameterization with Barycentric Coordinates

Problem:

  • Uniform weights do not achieve linear reproduction
  • Same for weights proportional to distances.
slide-44
SLIDE 44

Linear Reproduction:

  • If the mesh is already planar we want to recover the original

coordinates.

Parameterization with Barycentric Coordinates

Problem:

  • Uniform weights do not achieve linear reproduction
  • Same for weights proportional to distances.

Solution:

  • If the weights are barycentric with respect to original points:

The resulting system will recover the planar coordinates.

pi = X

j∈Ni

λijpj, X

j∈Ni

λij = 1

slide-45
SLIDE 45

Parameterization with Barycentric Coordinates

Solution:

  • Barycentric coordinates with respect to original points:

pi = X

j∈Ni

λijpj, X

j∈Ni

λij = 1

pi

pj pj

pj

  • If a point has 3 neighbors, then the

barycentric coordinates are unique.

  • For more than 3 neighbors, many

possible choices exist. pi

slide-46
SLIDE 46

Conformal Mappings

Riemann Mapping Theorem: Any surface topologically equivalent to a disk, can be conformally mapped to a unit disk.

Some good news.

Cauchy-Riemann equations: If a map (x,y) (u,v) is conformal then u(x,y) and v(x,y) satisfy:

∂u ∂x = ∂v ∂y

x

y

u v

∂u ∂y = −∂v ∂x

slide-47
SLIDE 47

Conformal Mappings

Riemann Mapping Theorem: Any surface topologically equivalent to a disk, can be conformally mapped to a unit disk.

Some good news.

Cauchy-Riemann equations: If a map (x,y) (u,v) is conformal then both u and v are harmonic: ✓ ∂2 ∂x2 + ∂2 ∂y2 ◆ v = 0 ✓ ∂2 ∂x2 + ∂2 ∂y2 ◆ u = 0

x

y

u v

slide-48
SLIDE 48

Conformal Mappings

Riemann Mapping Theorem: Any surface topologically equivalent to a disk, can be conformally mapped to a unit disk.

Some good news.

Cauchy-Riemann equations: If a map (x,y) (u,v) is conformal then both u and v are harmonic:

∆u = 0 ∆v = 0

x

y

u v

slide-49
SLIDE 49

Conformal Mappings

Riemann Mapping Theorem: Any surface topologically equivalent to a disk, can be conformally mapped to a unit disk.

Some good news.

If a map (u,v) is conformal then both u and v are harmonic:

S

∆Su = 0

∆Sv = 0

∆S : Laplace-Beltrami operator.

slide-50
SLIDE 50

Harmonic Mappings

Harmonic mappings easiest to compute, but may not preserve angles. May not be bijective. Harmonic maps minimize Dirichlet energy: Recap: Isometric => Conformal => Harmonic

ED(f) = 1 2 X

S

krSfk2

Given the boundary conditions.

slide-51
SLIDE 51

Harmonic Mappings

Theorem (Rado-Kneser-Choquet): If f : S → R2 is harmonic and maps the boundary ∂S onto the boundary ∂S* of some convex region S* ⊂ R2, then f is bijective.

slide-52
SLIDE 52

Recall the General Method:

To find the solution in practice:

1. Fix the boundary points 2. Assemble two linear systems (one for each coordinate): 3. Solution of the linear system gives the coordinates: ui = (ui, vi)

LU = ¯ U, LV = ¯ V

bi, i ∈ B

Lij = 8 > > < > > : 1 if i = j, i ∈ B P

j∈Ni Dij

if i = j, i / ∈ B −Dij if j ∈ Ni, i / ∈ B

  • therwise
slide-53
SLIDE 53

Barycentric Coordinates

Dij

slide-54
SLIDE 54

Barycentric Coordinates

Dij

slide-55
SLIDE 55

Barycentric Coordinates

slide-56
SLIDE 56

Conformal Mappings

Most commonly used in practice.

slide-57
SLIDE 57

Conformal Mappings

Fixing the boundary:

  • Simple convex shape (triangle, square, circle)
  • Distribute points on boundary

– Use chord length parameterization

  • Fixed boundary can create high distortion
slide-58
SLIDE 58

Conformal Mappings

Fixing the boundary:

  • Simple convex shape (triangle, square, circle)
  • Distribute points on boundary

– Use chord length parameterization

  • Fixed boundary can create high distortion

“Free” boundary is better: harder to optimize for.

slide-59
SLIDE 59

Fixed vs Free boundary

images by Mirela Ben-Chen

slide-60
SLIDE 60

Fixed vs Free boundary

images by Mirela Ben-Chen

slide-61
SLIDE 61

Fixed vs Free boundary

images by Mirela Ben-Chen

slide-62
SLIDE 62

Fixed vs Free boundary

images by Mirela Ben-Chen

slide-63
SLIDE 63

Free boundary methods

General approach: Let the coordinates of the vertices be unknowns, construct an energy that measures distortion.

f

E(f) = X

t∈triangles

distortion(t|f) (uopt, vopt) = arg min

f=(u,v)

E(f)

given boundary conditions

slide-64
SLIDE 64

Free boundary methods

Least squares conformal maps for automatic texture atlas generation, Levy et al., SIGGRAPH 2002

For any triangle: If the mapping is conformal, the angles shouldn’t change. Keep the angles, let the coordinates be unknown. Leads to a least squares problem.

(u3, v3)

(u2, v2)

(u1, v1)

α1

α2

α3

slide-65
SLIDE 65

Free boundary methods

More generally:

E(f) = X

t∈triangles

distortion(t|f)

distortion(t|f) = H(Jf(t))

Jacobian of the transformation

Jf(t) :

slide-66
SLIDE 66

Free boundary methods

More generally:

distortion(t|f) = H(Jf(t))

Jacobian of the transformation

Jf(t) :

Jf(t) = UΣV T = U   σ1 σ2   V T

  • 1. Isometric mapping:
  • 2. Conformal mapping:
  • 3. Equiareal mapping:

σ1 = σ2 = 1 σ1σ2 = 1 σ1/σ2 = 1

slide-67
SLIDE 67

Free boundary methods

More generally:

distortion(t|f) = H(Jf(t))

Jacobian of the transformation

Jf(t) :

Jf(t) = UΣV T = U   σ1 σ2   V T H(Jf(t)) = H(σ1, σ2), e.g.:

HMIPS(σ1, σ2) = σ1 σ2 + σ2 σ1

MIPS: An efficient global parameterization method, Hormann and Greiner, Curve and Surface design, ‘99

Non-linear, difficult to optimize for.

slide-68
SLIDE 68

Free boundary methods

More generally:

distortion(t|f) = H(Jf(t))

Jacobian of the transformation

Jf(t) :

Jf(t) = UΣV T = U   σ1 σ2   V T

Can show that:

Surface Parameterization: a Tutorial and Survey, Floater and Hormann, AMGM, 2005

Thus, e.g.

σ2

1 + σ2 2

and σ1σ2

are quadratic in the target vertex coordinates.

H(σ1, σ2) = (σ1 − σ2)2

leads to a linear system of equations.

slide-69
SLIDE 69

Free boundary methods

More generally:

distortion(t|f) = H(Jf(t))

Jacobian of the transformation

Jf(t) :

Can show that: is equivalent to: Enforcing the Cauchy-Riemann equations in the least squares sense:

Surface Parameterization: a Tutorial and Survey, Floater and Hormann, AMGM, 2005

H(σ1, σ2) = (σ1 − σ2)2

EC(u, v) = 1 2 ✓∂u ∂x − ∂v ∂y ◆2 + ✓∂u ∂y + ∂v ∂x ◆2!

slide-70
SLIDE 70

Some results

Linear Methods:

slide-71
SLIDE 71

Some results

Non-linear Methods:

slide-72
SLIDE 72

Conclusions

Surface parameterization:

  • No perfect mapping method
  • A very large number of techniques exists
  • Conformal model:
  • Nice theoretical properties
  • Leads to a simple (linear) system of equations
  • Closely related to the Poisson equation and Laplacian operator
  • More general methods
  • Can get smaller distortion using non-linear optimization
  • Very difficult to guarantee bijectivity in general