Mesh Shape Editing - University of...

33

Transcript of Mesh Shape Editing - University of...

Page 1: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Mesh Shape Editing

Computer Animation and Visualisation

Lecture 16

Taku Komura

Page 2: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Today

– Remeshing by the harmonic scalar field

– Laplacian mesh editing

– As-rigid-as possible shape interpolation

– Deformation Transfer

Page 3: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Remeshing & Simplification • Using the harmonic scalar field and the

isoparametric lines, we can re-mesh the object • By reducing the sampling rate, we can conduct

simplification

Page 4: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Background• Points from range sensors are too dense

• And the triangle shapes are usually random and have undesirable shapes – Want to reduce the vertices– We may want the vertices to be sampled uniformly

• For simulation purpose, quad mesh is better

• A method to remesh polygon data into uniform quad mesh data Dong et al. 2005

Page 5: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Harmonic Scalar Fields

Laplace equation boundary conditions A u that satisfies this equation is called harmonic

function u produces a smooth transition between ui s.

When heat diffuses over some material, it follows the Laplace equation

s.t.

Page 6: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Laplace equation for a mesh

Page 7: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

After computing u

Once u is computed for all the vertices, we can interpolate and compute their values for anywhere in the triangles

We can compute the gradient lines and the isometric lines on the surface of the object

Then, we can uniformly sample points on the surface

Page 8: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

• Quadrangulation process

U = 0

U = 1

Page 9: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

More results

Page 10: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Editing shapes

• For animating rigid/articulated objects, we can use previous techniques like rigging

• Let’s think of animating cloths, clay, rubber, soft tissues, dolls, etc

Page 11: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Editing shapes• Usually, it is easier to edit a given shape rather

than modeling it from the beginning

• What is important when editing shapes?

• Keeping the local information unchanged–For faces, the local details of parts such as

the eyes, nose, and mouth must be similar to the original mesh

–Laplacian coordinates

–As-rigid-as possible

Page 12: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Laplacian Mesh Editing[Sorkine ‘04]

• The user specifies the region of interest (ROI) (the area to be edited)

• The user directly moves some of the vertices • The rest of ROI is decided by minimizing the

error function

Page 13: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Laplacian coordinates

• Assuming all polygons are split into triangles

• Every vertex vi is surrounded by a group of vertices Ni

• coordinate i will be represented by the difference between vi and the average of its neighbors

Page 14: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Laplacian coordinates (2)

• Suppose the new position of the vertices are v'i

• We want to keep the Laplacian coordinates the same after the deformation

• T is a homogeneous transformation of scaling, rotation, and translation

Page 15: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Laplacian coordinates (3)

• We also want to constrain the position of some points (keeping vi’ close to ui)

• After all, we want to compute v’ such that it minimizes the following function

Page 16: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Some more …http://www.youtube.com/watch?v=Yn3P4EK8sYE&feature=channel_page

Page 17: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Dealing with Volume Loss[Zhou ‘05]

• Sometimes the shape might shrink as we allow scaling for the transformation

• It might be better to keep the volume the same

Page 18: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Creating a Volumetric Graph

• Add internal vertices and edges • Compute and preserve the details for the internal structure

Page 19: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Some Results

Page 20: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

What if we want to interpolate different shapes?

– Not just editing the shapes but need to morph it to the target shape

Page 21: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

As-Rigid-As Possible Shape Interpolation [Alexa ’00]

• Interpolating the shapes of the two polygons so that each triangle (2D) / tetrahedron (3D) transformation appears as rigid as possible

Page 22: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Interpolating the shapes of triangles Represent the interpolation of triangles by

rotation & scaling

• linear interpolation

• rotation & scaling

Page 23: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Least-Distorting Triangle-to-Triangle Morphing

• Say the three vertices P=(p1,p2,p3) are morphed to Q=(q1,q2,q3)

• We want to compute an affine transform that produces Q=A P

• The intermediate vertice will be computed by

V(t)=A(t) P

• A is decomposed into the rotation part R(t) and scaling part and S.

• We can compute the rotation and scaling using singular component decomposition

Page 24: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Closed-Form Vertex Paths for a Triangulation

• As vertices are shared by many triangles, we cannot interpolate each triangle by the above mentioned method

• Let us assume the affine transformation we apply by B{i, j, k} : {i,j,k} are indices of vertices

original translation intermediate

Page 25: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Keeping the transformation similar to A{i, j, k}

• A vertex configuration that minimizes the error between A and B

Page 26: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Some 2D results

Page 27: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

3D objects

• The method is applicable to polyhedra

• Tetrahedralization is applied to polyhedra and the tetrahedra are morphed so that they are as rigid as possible

Page 28: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

More results

Page 29: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

As-rigid-as possible shape manipulation [Igarashi et al. 05]

• interactive manipulation of characters based on the “as-rigid-as-possible” concept

• http://www-ui.is.s.u-tokyo.ac.jp/~takeo/research/rigid/index.html• http://www.youtube.com/watch?v=1M_oyUEOHK8

Page 30: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Deformation Transfer

• Applying the motion of one character to another• For the corresponding triangle t and t’, we can

compute the affine transformation that transforms t to t’ – t’ = R t + d (R : rotation matrix, d : translation)

• When one character has moved, its movements can be mapped to the other character

• Use the method in slide 23 to keep the connectivity

Page 31: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Some results of mapping the motion to another

http://www.youtube.com/watch?v=bhvsUSUoSOE

Page 32: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Summary

• Harmonic scalar fields (remeshing) • Deforming surfaces

– Laplacian Coordinates– As-rigid-as possible shape interpolation

• Deformation Transfer

Page 33: Mesh Shape Editing - University of Edinburghhomepages.inf.ed.ac.uk/tkomura/cav/presentation16.pdf · 2012-03-16 · Mesh Shape Editing Computer Animation and Visualisation Lecture

Readings• Alexa et al. “As-rigid-as-possible shape interpolation SIGGRAPH

’00• Igarashi et al. “As-rigid-as-possible shape manipulation”,

SIGGRAPH ‘05• O. Sorkine, D. Cohen-Or, Y. Lipman, M. Alexa, C.

Rössl and H.-P. Seidel, “Laplacian Surface Editing”, Eurographics Symposium on Geometry Processing (2004)

• Large Mesh Deformation Using the Volumetric Graph Laplacian– Kun Zhou, Jin Huang, John Snyder, Xinguo Liu, Hujun Bao, Baining Guo,

Heung-Yeung Shum. ACM SIGGRAPH 2005, 496-503.

• Dong et al. Harmonic functions for quadrilateral remeshing of arbitrary manifolds, Comput. Aided Geom. Des. 22, 5. 2005