95
CS348a: Computer Graphics -- Geometric Modeling and Processing Chengcheng Tang Computer Science Dept. Stanford University Surface Parameterization 15 March 2017

CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Embed Size (px)

Citation preview

Page 1: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

CS348a: Computer Graphics --

Geometric Modeling and Processing

Chengcheng Tang

Computer Science Dept.

Stanford University

Surface Parameterization

15 March 2017

Page 2: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

PARTLY

BORROWED

Maks Ovsjanikov

Raif Rustamov

Justin Solomon

Mirela Ben-Chen

Julien Tierny

SIGGRAPH 2008 Course

Others…

Page 3: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Today

• Painting on Surfaces

Mari software

Painting directly on the 3d object

Substance 3D Painter

Page 4: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

What we would like to do

Page 5: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

The Basic Problem

?

Page 6: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Solution

Page 7: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization is …

Page 8: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Why Parameterize?

R.I.P.

Really

Interested in

Parameterization

Page 9: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Why Parameterize?

Texture Mappinghttp://www.blender.org/development/release-logs/blender-246/uv-editing/

Page 10: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization Problem

Given a surface (mesh) S in R3 and a domain Ω (e.g. plane):

Find a bijective map U: Ω ↔ S.

Page 11: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization for Texture

Mapping

Bodypaint 3D

Page 12: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization for Texture

MappingRendering workflow:

Page 13: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization – Typical

Domains

Page 14: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization – Boundary

Problem

Source: Mirela Ben-Chen

Page 15: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization – Many

Possibilities

Source: Mirela Ben-Chen

Page 16: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization – Applications

Recall Mesh simplification:

• Approximate the geometry using few triangles

~600k triangles~600 triangles

Idea:

• Decouple geometry from appearance

Page 17: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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.

Page 18: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization – Applications

Idea:

• Decouple geometry from appearance

• Encode a normal field inside each triangle

Normal Mapping

Cohen et al., ‘98

Cignoni et al. ‘98

Page 19: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization – Applications

Normal Mapping with parameterization:

• Store normal field as an RGB texture.

Page 20: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

20

Page 21: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

21

Page 22: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization – Applications

source: Mirela Ben-Chen

Page 23: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization – Applications

source: Mirela Ben-Chen

Page 24: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization – Applications

Gu, Gortler, Hoppe. Geometry Images.

SIGGRAPH 2002

Page 25: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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

Page 26: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization onto the plane

General problem:

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

Page 27: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization onto the plane

General problem:

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

Page 28: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization onto the plane

Simplified problem:

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

under some boundary constraints:

Page 29: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization onto the plane

Recall a related problem.

Mapping the Earth: find a parameterization of a 3d object onto a

plane.

Page 30: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Mapping the earth

Stereographic projection

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

Page 31: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Mapping the earth

Mercator

Gerardus Mercator (1569)Maps loxodromes to lines

Page 32: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Mapping the earth

Mercator (preserves angles, but distorts areas)

Gerardus Mercator (1569)Maps loxodromes to lines

Page 33: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

33

Page 34: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Mapping the earth

34http://thetruesize.com

Page 35: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

35

Page 36: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

The size of Westeros

compared to the USA

36

http://thewertzone.blogspot.com/2012/06/size-of-westeros-compared-to-usa.html

Page 37: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Mapping the earth

Lambert (preserves areas, but distorts angles)

Johann Heinrich Lambert (1772)

Page 38: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Mapping the earth

Lambert (preserves areas, but distorts angles)

Johann Heinrich Lambert (1772)

Page 39: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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

Page 40: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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.

Page 41: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Different kinds of Parameterization

Page 42: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Different kinds of Parameterization

Page 43: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Different kinds of Parameterization

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

ensure a bijective map

Page 44: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Spring Model for Parameterization

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

given constraints:

Model: imagine a spring at each edge of the mesh.

If the boundary is fixed, let the interior points find an equilibrium.

Page 45: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Spring Model for Parameterization

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

x

k: spring constant.

Page 46: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Spring Model for Parameterization

Given an embedding (parameterization) of a mesh, the potential

energy of the whole system:

Where is the spring constant of edge e between i and j

Goal: find the coordinates that would minimize E.

Note: the boundary vertices prevent the degenerate solution.

Page 47: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization with Barycentric Coordinates

Finding the optimum of:

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

Hence: barycentric coordinates.

Page 48: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization with Barycentric Coordinates

To find the solution in practice:

1. Fix the boundary points

2. Form linear equations

1. Assemble into two linear systems (one for each coordinate):

1. Solution of the linear system gives the coordinates:

Note: system is very sparse, can solve efficiently.

Page 49: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization with Barycentric Coordinates

Does this work?

Page 50: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Laplacian Matrix

Our system of equations (forgetting about boundary):

Alternatively, if we write it as:

We get:

L is not symmetric

L is symmetric

Page 51: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Example:

Uniform weights:

Parameterization with Barycentric Coordinates

Page 52: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Alternative: Simple realization

Goal: Assign (u,v)

coordinate to

each mesh vertex.

1. Fix (u,v) coordinates of boundary.

2. Want interior vertices to be at the center of

mass of neighbors:

Page 53: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Iterative Algorithm

1. Fix (u,v) coordinates of boundary.

2. Initialize (u,v) of interior points (e.g. using naïve).

3. While not converged: for each interior vertex, set:

1

32

5

4

6

7

Page 54: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

What do you think?

After many iterations

?Some random planar mesh

Page 55: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Expectation

After many iterations

It is already planar: best parameterization = itself

Page 56: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Reality… Why? How to avoid?

After many iterations

Converges to a somewhat uniform grid!

Triangle shapes and sizes are not preserved!

Page 57: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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.

Page 58: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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.

Page 59: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Parameterization with Barycentric Coordinates

Solution:

• Barycentric coordinates with respect to original points:

• If a point has 3 neighbors, then the

barycentric coordinates are unique.

• For more than 3 neighbors, many

possible choices exist.

Page 60: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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:

Page 61: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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:

Page 62: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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:

Page 63: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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:

: Laplace-Beltrami operator.

Page 64: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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

Given the boundary conditions.

Page 65: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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.

Page 66: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Recall the General Method:

To find the solution in practice:

1. Fix the boundary points

1. Assemble two linear systems (one for each coordinate):

1. Solution of the linear system gives the coordinates:

Page 67: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Barycentric Coordinates: Harmonic

Page 68: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Barycentric Coordinates: Mean-value

Page 69: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Results

Naive Harmonic

Page 70: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Barycentric Coordinates

Page 71: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Conformal Mappings

Most commonly used in practice.

Page 72: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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

Page 73: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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.

Page 74: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Fixed vs Free boundary

images by Mirela Ben-Chen

Page 75: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Fixed vs Free boundary

images by Mirela Ben-Chen

Page 76: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Fixed vs Free boundary

images by Mirela Ben-Chen

Page 77: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Fixed vs Free boundary

images by Mirela Ben-Chen

Page 78: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Free boundary methods

General approach:

Let the coordinates of the vertices be unknowns, construct an energy that

measures distortion.

given boundary

conditions

Page 79: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Free boundary methods

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

For a 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.

Page 80: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Free boundary methods

More generally:

Jacobian of the transformation

Page 81: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Free boundary methods

More generally:

Jacobian of the transformation

1. Isometric mapping:

2. Conformal mapping:

3. Equiareal mapping:

Page 82: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Free boundary methods

More generally:

Jacobian of the transformation

, e.g.:

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

Non-linear, difficult to optimize for.

Page 83: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Free boundary methods

More generally:

Jacobian of the transformation

Can show that:

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

Thus, e.g.

are quadratic in the target vertex coordinates.

leads to a linear system of equations.

Page 84: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Free boundary methods

More generally:

Jacobian of the transformation

Can show that:

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

Thus, e.g.

are quadratic in the target vertex coordinates.

leads to a linear system of equations.

Page 85: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Some results

Linear Methods:

Page 86: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

Some results

Non-linear Methods:

Page 87: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

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 Laplacianoperator

More general methods

Can get smaller distortion using non-linear optimization

Very difficult to guarantee bijectivity in general

Page 88: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

88

Page 89: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

89

Page 90: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

90

Page 91: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

91

Page 92: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

92

Page 93: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

93

Page 94: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

94

Page 95: CS348a: Computer Graphics -- Geometric Modeling and Processinggraphics.stanford.edu/courses/cs348a-17-winter/Lecture... ·  · 2017-03-19CS348a: Computer Graphics --Geometric Modeling

95