FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell...

52
FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec Rivers Doug James Cornell University

Transcript of FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell...

Page 1: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

FastLSM: Fast Lattice Shape Matching for RobustReal-Time Deformation

Alec Rivers Doug James

Cornell University

Page 2: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Soft body simulation

2

Page 3: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Speed StabilityRange of

deformationSimplicity

Physical accuracy

Explicit methods √ X √ √ √

Implicit methods; corotational; invertible FEM[Terzopoulos & Fleischer 1988; Mueller et al. 2002; Irving et al. 2004]

X √ √ X √

Reduced models[Pentland & Williams 1989; Debunne et al. 2001; Grinspun et al. 2002;Barbic & James 2005]

√ √ X X √

Shape matching[Mueller et al. 2005] √ √ X √ X

FastLSM √ √ √ √ X3

Page 4: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Speed StabilityRange of

deformationSimplicity

Physical accuracy

Explicit methods √ X √ √ √

Implicit methods; corotational; invertible FEM[Terzopoulos & Fleischer 1988; Mueller et al. 2002; Irving et al. 2004]

X √ √ X √

Reduced models[Pentland & Williams 1989; Debunne et al. 2001; Grinspun et al. 2002;Barbic & James 2005]

√ √ X X √

Shape matching[Mueller et al. 2005] √ √ X √ X

FastLSM √ √ √ √ X3

Page 5: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Speed StabilityRange of

deformationSimplicity

Physical accuracy

Explicit methods √ X √ √ √

Implicit methods; corotational; invertible FEM[Terzopoulos & Fleischer 1988; Mueller et al. 2002; Irving et al. 2004]

X √ √ X √

Reduced models[Pentland & Williams 1989; Debunne et al. 2001; Grinspun et al. 2002;Barbic & James 2005]

√ √ X X √

Shape matching[Mueller et al. 2005] √ √ X √ X

FastLSM √ √ √ √ X3

Page 6: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Speed StabilityRange of

deformationSimplicity

Physical accuracy

Explicit methods √ X √ √ √

Implicit methods; corotational; invertible FEM[Terzopoulos & Fleischer 1988; Mueller et al. 2002; Irving et al. 2004]

X √ √ X √

Reduced models[Pentland & Williams 1989; Debunne et al. 2001; Grinspun et al. 2002;Barbic & James 2005]

√ √ X X √

Shape matching[Mueller et al. 2005] √ √ X √ X

FastLSM √ √ √ √ X3

Page 7: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Speed StabilityRange of

deformationSimplicity

Physical accuracy

Explicit methods √ X √ √ √

Implicit methods; corotational; invertible FEM[Terzopoulos & Fleischer 1988; Mueller et al. 2002; Irving et al. 2004]

X √ √ X √

Reduced models[Pentland & Williams 1989; Debunne et al. 2001; Grinspun et al. 2002;Barbic & James 2005]

√ √ X X √

Shape matching[Mueller et al. 2005] √ √ X √ X

FastLSM √ √ √ √ X3

Page 8: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Speed StabilityRange of

deformationSimplicity

Physical accuracy

Explicit methods √ X √ √ √

Implicit methods; corotational; invertible FEM[Terzopoulos & Fleischer 1988; Mueller et al. 2002; Irving et al. 2004]

X √ √ X √

Reduced models[Pentland & Williams 1989; Debunne et al. 2001; Grinspun et al. 2002;Barbic & James 2005]

√ √ X X √

Shape matching[Mueller et al. 2005] √ √ X √ X

FastLSM √ √ √ √ X3

Page 9: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Speed StabilityRange of

deformationSimplicity

Physical accuracy

Explicit methods √ X √ √ √

Implicit methods; corotational; invertible FEM[Terzopoulos & Fleischer 1988; Mueller et al. 2002; Irving et al. 2004]

X √ √ X √

Reduced models[Pentland & Williams 1989; Debunne et al. 2001; Grinspun et al. 2002;Barbic & James 2005]

√ √ X X √

Shape matching[Mueller et al. 2005] √ √ X √ X

FastLSM √ √ √ √ X3

Page 10: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Speed StabilityRange of

deformationSimplicity

Physical accuracy

Explicit methods √ X √ √ √

Implicit methods; corotational; invertible FEM[Terzopoulos & Fleischer 1988; Mueller et al. 2002; Irving et al. 2004]

X √ √ X √

Reduced models[Pentland & Williams 1989; Debunne et al. 2001; Grinspun et al. 2002;Barbic & James 2005]

√ √ X X √

Shape matching[Mueller et al. 2005] √ √ X √ X

FastLSM √ √ √ √ X3

Page 11: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Shape matching[Mueller et al. 2005]

• Particles at mesh vertices• Save initial positions as

rest configuration• Move particles

independently• Match rest configuration

to particles• Push particles towards goal positions

4

Page 12: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Shape matching – cont.• Quadratic shape matching

• Multiple clusters

5

Page 13: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Shape matching – limitations

• Limited range of deformation

• Can be slow with many clusters

• Boundary issues

• No interior volumes6

Page 14: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Shape matching – limitations

• Limited range of deformation

• Can be slow with many clusters

• Boundary issues

• No interior volumes6

Page 15: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Shape matching – limitations

• Limited range of deformation

• Can be slow with many clusters

• Boundary issues

• No interior volumes6

Page 16: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Our contributions

• Lattice shape matching–New framework for shape

matching-based deformation–Addresses many of these

concerns

• Fast summation optimization

7

Page 17: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

• Voxelize mesh

• Many overlapping small regions

Lattice shape matching

8

Page 18: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

• One region centered at each lattice index

• Breadth-first search to depth w

Region generation

w = 1

w = 2

w = 3 w = 4

9

Page 19: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

• Dynamics:

• Goal position for each particle is average of goal positions relative to each region

• Flexibility:– Many rigid regions > few quadratic

LSM Dynamics

10

Page 20: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Shape matching comparison

11

Page 21: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Material modeling

• Control rigidity by tuning w

• Can also tune timesteps / frame

12

Page 22: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Optimization

• Cost scales with number of particles in each region

– O(w3)

• Define O(1) fast summation operator:

13

Page 23: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Optimization

• Cost scales with number of particles in each region

– O(w3)

• Define O(1) fast summation operator:

––– O(w3) Naïve----- O(w) Intermediate······ O(1) FastLSM

w 13

Page 24: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Fast summation

14

Page 25: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

5 3

2.6

1

7 4

8 2

9

6.1

Fast summation

14

Page 26: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

5 3

2.6

1

7 4

8 2

9

6.1

Fast summation

14

Page 27: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

5 3

2.6

1

7 4

8 2

9

6.1

5+3+7+2.6+… = 32.6

7+2.6+4+8+… = 39.7

Fast summation

14

Page 28: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

5 3

2.6

1

7 4

8 2

9

6.1

24.6 +5+3 = 32.6

24.6 +9+6.1 = 39.7

7+2.6+…= 24.6

Fast summation

14

Page 29: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Fast summation

14

Page 30: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Fast summation

14

Page 31: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Fast summation

15

Page 32: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Fast summation – 3D

Regions Plates Bars

16

Page 33: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Fast summation

• After collapsing:n regions, w plates each

~n unique plates,w bars each

~n unique bars, w particles each

• Total cost:– nw + nw + nw = 3nw = O(nw)– O(w) per region (instead of O(w3) )

• Related work: [Crow 1984; Weiss 2006]17

Page 34: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Constant-time fast summation

18

Page 35: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Constant-time fast summation

18

Page 36: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Constant-time fast summation

• With constant time:– Each bar, plate, region: add + subtract (2

flops)

• Total cost:

– 2n + 2n + 2n = 6n

– O(n), independent of w

19

Page 37: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Rigid shape matching using fast summations

• Definitions:– xi

0 Rest positions

– xi Deformed positions

– mi Particle masses

– mi mi / |Ri|

– Mr =

Translation:

Rotation:

Goals:

20

Page 38: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Extensions

• Fast polar decompositions– Track eigenvectors of Ar to warm start– Average cost decrease:

2.5 μs → 0.45 μs

• Fast damping– [Mueller et al. 2006]– Accelerated for LSM using fast

summation21

Page 39: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Timings breakdownFast summation

Polardecompositions

Shape matching

Damping

22

Page 40: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Extensions – cont.• Fracture

– High range of deformation allows fracture

– Sever links based on strain tolerances

• Hardware-accelerated rendering– Store mesh in GPU– Upload just particle positions

each frame– Deform geometry on GPU

;

23

Page 41: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Results: Complex objects

Solid Buddha:57,626 particlesw = 1168 ms / timestep1,680 ms / frame

Shell Buddha:19,957 particlesw = 148.4 ms / timestep484 ms / frame

24

Page 42: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Results: Complex objects

25

Page 43: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Results: Articulated characters

2,570 particlesw = 215 ms / timestep

26

Page 44: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Results: Articulated characters

27

Page 45: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Results: Speed

150 particlesw = 20.28 ms / timestep

28

Page 46: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Results: Speed

5 FPS; 0.28 ms/penguin (w=2)150 penguins w/ 150 particles/penguin (22,500 particles total)“Peng-chinko” 29

Page 47: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Conclusion

• Advantages:–Fast

–Large range of deformation

–Stable

–Easy to implement

30

Page 48: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Conclusion

• Disadvantages:–Not physically accurate

–Poor control over material properties

–Does not conserve volume

31

Page 49: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Future work

• Theoretical foundations–Material modeling

• Different particle frameworks–Irregular samplings

• Apply FastLSM smoothing to other geometric problems

32

Page 50: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Demos and source code available atwww.fastlsm.com

33

Page 51: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Acknowledgements

• Jernej Barbič, Chris Twigg, Chris Cameron, Giovanni Tummarello

• Anonymous reviewers• Funding and support:

– National Science Foundation (CAREER, EMT)– Alfred P. Sloan Foundation– NIH– Pixar– NVIDIA (hardware, graduate fellowship)– Intel– Autodesk – The Boeing Company– The Link Foundation

34

Page 52: FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation Alec RiversDoug James Cornell University.

Thanks!Demos and source code available at

www.fastlsm.com