As-Rigid-As-Possible Shape Manipulation - …david/Classes/ICG/Talks/rigid...As-Rigid-As-Possible...

17
Introduction Overview Algorithm Results Results Demo As-Rigid-As-Possible Shape Manipulation T. Igarashi 1 , T. Mascovich 2 J. F. Hughes 3 1 The University of Tokyo 2 Brown University 3 PRESTO, JST SIGGRAPH 2005 Presented by: Prabin Bariya T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

Transcript of As-Rigid-As-Possible Shape Manipulation - …david/Classes/ICG/Talks/rigid...As-Rigid-As-Possible...

IntroductionOverviewAlgorithm

ResultsResults

Demo

As-Rigid-As-Possible Shape Manipulation

T. Igarashi1, T. Mascovich2 J. F. Hughes3

1The University of Tokyo 2Brown University

3PRESTO, JST

SIGGRAPH 2005Presented by: Prabin Bariya

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Introduction

Interactive shape manipulation technique for 2D shapes, withoutusing a skeleton or FFD.

Introduces internal model rigidity into shape manipulation.

Uses a quadractic error metric so the minimization problem isformulated as a set of simultaneous linear equations.

The problem is split into two least-squares minimization problems(rotation and scale) that are solved sequentially.

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Introduction

The user chooses handle points within the shape and moveseach handle to a desired location.The system the moves, rotates and deforms the shape to matchthe new handle locations while minimizing distortions.

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Triangulation

The boundary of the shape should be represented as a simpleclosed polygon.

The system generates a triangulated mesh inside the boundaryof the shape.

Near equilateral triangles are used for better results.

Mesh should not be too large.

Resulting triangulation is the rest shape.

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Registration and Compilation

The system performs a pre-computation, called registration, toaccelerate computation during the interaction.When handles are added or removed, additionalpre-computations are performed, called compilation.Compilation allows computation of resulting shape, given handleconfigurations.

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Step 1Step 2

Algorithm

Input: xy-coordinates of the handles.Output: xy-coordinates of the free vertices that minimizedistortion.Uses two independent quadratic error functions for the rotationand scaling.Final result is obtained by sequentially solving two least-squaresproblems.

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Step 1Step 2

Scale-Free Construction

Generates an intermediate result by minimizing an error functionthat allows rotation and uniform scaling.For a triangle in rest shape {v0,v1,v2},v2 = v0 + x01v0v1 + y01R90v0v1.Given a deformed triangle {v ′0,v

′1,v

′2}, vdesired

2 can be computedsimilarly.

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Step 1Step 2

Scale-Free Construction

Then, Ev2 = ‖vdesired2 − v ′2‖

2.

And, E{v0,v1,v2} = ∑i=1,2,3 ‖vdesiredi − v ′i ‖

2

Error for the entire mesh is sum of error for all triangles,expressed in matrix form as: E1{v ′} = v′TGv′

⇒ G′u+Bq = 0

Only q changes during manipulation.

G can be pre-computed during registration and G′−1B duringcompilation.

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Step 1Step 2

Scale Adjustment

Step 1 doesn capture changes in scale and is handled here.First each triangle in the rest shape is fitted in the intermediateresult, allowing rotation and translation.For a triangle {v ′0,v

′1,v

′2} in the intermediate result, we need to

find a new triangle {vfitted0 ,vfitted

1 ,vfitted2 } that is congruent to the

corresponding triangle {v0,v1,v2} in the rest shape.

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Step 1Step 2

Fitting triangles

The fitted triangle should minizeEf{vfitted

0 ,vfitted1 ,vfitted

2 }= ∑i=1,2,3 ‖vfitted

i − v ′i ‖2.

Approximate by first minimizing the error allowing uniform scaling.

Like before, we have:vfitted

2 = vfitted0 + x01vfitted

0 vfitted1 + y01R90vfitted

0 vfitted1

So the fitting functional is a quadratic in the four free variablesw = (v0xfitted ,v0yfitted ,v1xfitted ,v1yfitted)

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Step 1Step 2

Fitting triangles

Minimize Ef by setting partial derivaties over w to zero.

⇒ dEfdw = Fw+C = 0

F is fixed for a given mesh, so can be pre-computed and invertedduring registration.

C is defined by the result of Step 1 and is computed duringmanipulation.

Scale the fitted triangle obtained by solving this equation by afactor of ‖vfitted

0 − vfitted1 ‖/‖v0− v1‖

This makes the fitted triangle congruent to the correspondingtriangle in the rest shape.

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Step 1Step 2

Generating final result

Need to reconcile vertices of several triangles that correspond tothe same mesh vertex.For a triangle {v ′′0 ,v ′′1 ,v ′′2 } and corresponding fitted triangle{vfitted

0 ,vfitted1 ,vfitted

2 }, a quadratic edge error function is defined:

E2{v ′′0 ,v ′′1 ,v ′′2 }= ∑(i,j)∈{(0,1),(1,2),(2,0)} ‖v ′′i v ′′j − vfitted

i vfittedj ‖

2

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Step 1Step 2

Generating final result

The optimal position for a vertex is some average of the positionsdesired by each triangle in which it appears.

The error for the entire mesh is given by: E2v ′′ = v′′THv′′+ fv′′+c

H is defined by the connectivity of the original mesh and, f and care determined by the fitted triangles.

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Step 1Step 2

Generating final result

To minimize E2, setting partial derivatives over u to zero, we get:H′u+Dq+ f0 = 0

H can be precomputed during registration and, H ′ and D duringcompilation.

f0 is computed during manipulation using fitted triangles.

Final result obtained by solving the last equation usingpre-computed LU factorization of H ′.

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Results

Pentium III 1GHz processor, 756MB memory and Javaimplementation.

Real-time performance.

Interaction deterioriates starting at around 300 vertices.

Fairly robust against uneven triangulation and irregularly spacedmesh.

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Results

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation

IntroductionOverviewAlgorithm

ResultsResults

Demo

Demo

T. Igarashi, T. Mascovich, J. F. Hughes As-Rigid-As-Possible Shape Manipulation