Towards Real-time Simulation of Deformable Objects From mass-spring system to general hyper-elastic materials GAMES Webinar Presentation Tiantian Liu Joint Work with: Adam Bargteil, Sofien Bouaziz, Ladislav Kavan, Sebastian Martin, James OโBrien, Mark Pauly
Towards Real-time Simulation of Deformable Objects From mass-spring system to general hyper-elastic materials
Towards Real-time Simulation of Deformable Objects 3
[Assassin's Creed II, Ubisoft, 2012] Real-time Physics Towards Real-time Simulation of Deformable Objects 4
Off-line Physics Towards Real-time Simulation of Deformable Objects 6
[VirtaMed] Applications with non-negotiable latency and accuracy E.g. Virtual Surgery Towards Real-time Simulation of Deformable Objects 8
Goal: Fast simulation of general hyperelastic materials Towards Real-time Simulation of Deformable Objects 9
Goal: Fast simulation of general hyperelastic materials Simple Towards Real-time Simulation of Deformable Objects 10
Related Work: Classic work [Goldenthal et al. 2007] [Tournier et al. 2015] [Baraff and Witkin 1998] Towards Real-time Simulation of Deformable Objects 11
Related Work: Position Based Dynamics [Mรผller et al. 2007] [Macklin et al. 2016] Quasi-Newton Methods for Real-time Simulation of Hyperelastic Materials 12
Related Work: Projective Dynamics [Liu et al. 2013] [Bouaziz et al. 2014] [Narain et al. 2016] Quasi-Newton Methods for Real-time Simulation of Hyperelastic Materials 13
Related Work: Chebyshev Methods [Wang 2015] [Wang and Yang 2016] Quasi-Newton Methods for Real-time Simulation of Hyperelastic Materials 14
Related Work: Quasi-Newton Methods in Geometry Processing [Kovalsky et al. 2016] [Rabinovich et al. 2017] Quasi-Newton Methods for Real-time Simulation of Hyperelastic Materials 15
Quasi-Newton Methods ๐ผ 2 ๐ ๐ โ1 โ๐ = โ ๐ผ๐ ๐ ๐ฉ ๐ ๐ ๐ Towards Real-time Simulation of Deformable Objects 16
Spatial Discretization Towards Real-time Simulation of Deformable Objects 17
Temporal Discretization Already known ๐ง ๐ฆ 0 ๐ฆ โ = 33๐๐ก Time Axis Towards Real-time Simulation of Deformable Objects 18
Implicit Euler Time Integration ๐ง ๐ฆ 0 ๐ฆ โ = 33๐๐ก Time Axis 1 2 ๐ฆ โ ๐ง ๐ ๐ต ๐ฆ โ ๐ง + โ 2 ๐น(๐ฆ) min ๐ฆ Towards Real-time Simulation of Deformable Objects 19
Variational Implicit Euler inertial potential Elastic potential ๐ง โฆpure inertial motion (Newtonโs 1 st Law) ๐ง = ๐ฆ ๐ + โ๐ค ๐ 1 2 ๐ฆ โ ๐ง ๐ ๐ต ๐ฆ โ ๐ง + โ 2 ๐น(๐ฆ) min ๐น โฆelastic potential (energy) ๐ฆ Towards Real-time Simulation of Deformable Objects 20
Variational Implicit Euler 1 2 ๐ฆ โ ๐ง ๐ ๐ต ๐ฆ โ ๐ง + โ 2 ๐น(๐ฆ) min ๐ฆ inertial potential Elastic potential Implicit Euler: Compromise between inertia and elasticity Towards Real-time Simulation of Deformable Objects 21
Mass-spring System: Basis Hookeโs Law: ๐น ๐ ๐ , ๐ ๐ = 1 ๐ ๐ โ ๐ ๐ โ ๐ 2 2 ๐ Non-quadratic Non-convex ๐ 2 ๐ ๐ 1 Towards Real-time Simulation of Deformable Objects 22
Non-convex Potential rest length ๐น( 1 โ ๐ข ๐ + ๐ข๐) ๐ ๐. ๐๐ + ๐. ๐๐ ๐ Towards Real-time Simulation of Deformable Objects 23
Standard Solution: Newtonโs Method 1 2 ๐ฆ โ ๐ง ๐ ๐ ๐ฆ โ ๐ง + โ 2 ๐น(๐ฆ) min ๐ฆ ๏ ๏ ๏ ๏ต Slow ๏ต ๐ผ 2 ๐น depends on ๐ฆ ๏ ๏ต Non-convex ๏ต The Hessian ๐ + โ 2 ๐ผ 2 ๐น can be indefinite Towards Real-time Simulation of Deformable Objects 24
Standard Solution: Newtonโs Method ๐น( 1 โ ๐ข ๐ + ๐ข๐) ๐ ๐. ๐๐ + ๐. ๐๐ ๐ Towards Real-time Simulation of Deformable Objects 25
Ideal Problem Reformulation Large Convex Quadratic Problem (Ideally with Constant System Matrix) Many Small Non-convex Problems (Ideally Independent) Towards Real-time Simulation of Deformable Objects 26
Hookeโs Law with auxiliary variables ๏ต For the i-th spring: 1 ๐ 2 ๏ต ๐น ๐ ๐ = 2 ๐ ๐ ๐ ๐1 โ ๐ ๐2 โ ๐ ๏ต Introduce auxiliary variable ๐ ๐ where ๐ ๐ = ๐ ๐ ๐ ๐ ๐ ๐2 ๐ ๐1 Towards Real-time Simulation of Deformable Objects 27
Hookeโs Law with auxiliary variables 1 1 2 ๐ 2 ๏ต min 2 ๐ ๐ ๐ ๐1 โ ๐ ๐2 โ ๐ ๐ = 2 ๐ ๐ ๐ ๐1 โ ๐ ๐2 โ ๐ ๐ ๐ =๐ ๐ ๐ ๐1 โ๐ ๐2 ๏ต When ๐ ๐ = ๐ ๐ ๐ ๐1 โ๐ ๐2 ๐ ๐ ๐ ๐2 ๐ ๐1 Towards Real-time Simulation of Deformable Objects 28
Hookeโs Law with auxiliary variables 1 2 ๐น ๐ = min 2 ๐ ๐ ๐ ๐1 โ ๐ ๐2 โ ๐ ๐ ๐ ๐ =๐ ๐ ๐ 1 2 ๐น ๐ = min 2 ๐ ๐ ๐ ๐1 โ ๐ ๐2 โ ๐ ๐ ๐โโณ ๐ ๐ ๐2 ๐ ๐1 Towards Real-time Simulation of Deformable Objects 29
Variational Time Integration with Auxiliary Variable 1 2 ๐ฆ โ ๐ง ๐ ๐ต ๐ฆ โ ๐ง + โ 2 ๐น(๐ฆ) min ๐ฆ 1 2 ๐ ๐ ๐ฉ๐ + ๐ ๐ ๐ช๐ + ๐ , ๐ก. ๐ข. ๐ โ ๐ min ๐ฆ,๐ ๐ โ ๐ ๐ ๐ = ๐ ๐ Towards Real-time Simulation of Deformable Objects 30
Optimization 1 2 ๐ ๐ ๐ฉ๐ + ๐ ๐ ๐ช๐ + ๐ , ๐ก. ๐ข. ๐ โ โณ min ๐ฆ,๐ ๏ต ๐ฉ, ๐ช, ๐ does not depend on ๐ or ๐ ๏ต If we fix ๐ -> easy to solve for ๐ ๏ต If we fix ๐ -> easy to solve for ๐ ๏ต Invites alternate solver (local/global) Towards Real-time Simulation of Deformable Objects 31
Local Step ๏ต For each spring, project to unit length using the current ๐ to find ๐ ๐ ๏ต Trivially Parallelizable ๐ ๐ ๐ ๐2 ๐ ๐1 Towards Real-time Simulation of Deformable Objects 32
Global Step 1 2 ๐ ๐ ๐ฉ๐ + ๐ ๐ ๐ช๐ + ๐ , ๐ก. ๐ข. ๐ โ โณ min ๐ฆ,๐ ๐บ๐๐ฆ ๐: ๐ โ = โ๐ฉ โ1 (๐ช๐ + ๐ ) ๏ต Matrix ๐ฉ is: ๏ต Independent of ๐ and ๐ (Constant) ๏ต Positive Definite ๏ต Thus can be pre-factorized (using e.g. Cholesky) Towards Real-time Simulation of Deformable Objects 33
Alternating Solver Large Convex Quadratic Problem (with Constant System Matrix) Many Small Non-convex Problems Towards Real-time Simulation of Deformable Objects 34
Performance Our Method Newtonโs Method Towards Real-time Simulation of Deformable Objects 35
Performance Newtonโs Method Our Method Towards Real-time Simulation of Deformable Objects 36
Remark: Fast Mass-spring Systems 1 2 ๐ฆ โ ๐ง ๐ ๐ต ๐ฆ โ ๐ง + โ 2 ๐น(๐ฆ) min ๐ฆ 1 = 1 2 ๐ 2 min 2 ๐ ๐ ๐ ๐1 โ ๐ ๐2 โ ๐ ๐ 2 ๐ ๐ ๐ ๐1 โ ๐ ๐2 โ ๐ ๐ ๐ =๐ ๐ 1 2 ๐ ๐ ๐ฉ๐ + ๐ ๐ ๐ช๐ + ๐ , ๐ก. ๐ข. ๐ โ ๐ min ๐ฆ,๐ Towards Real-time Simulation of Deformable Objects 37
Beyond Mass-spring Systems ๐ ๐๐ โ ๐ ๐๐ ๐ ๐ ๐ ๐2 ๐ ๐1 ๐ ๐ Towards Real-time Simulation of Deformable Objects 38
Distance from Constraint Manifold ๐ ๐๐ โ ๐ ๐๐ : naรฏve differential operator 0 0 โฎ 1 ๐๐ โฎ ๐ ๐๐ โ ๐ ๐๐ = ๐ฏ ๐ ๐ โ1 ๐๐ โฎ 0 0 ๐ฏ ๐ Towards Real-time Simulation of Deformable Objects 39
Distance from Constraint Manifold ๐ ๐๐ โ ๐ ๐๐ = ๐ฏ ๐ ๐ 1 2 ๐น ๐ = min 2 ๐ ๐ ๐ ๐1 โ ๐ ๐2 โ ๐ ๐ ๐โโณ ๐ 2 ๐น ๐ = min ๐ฅ ๐ ๐ฏ ๐ ๐ โ ๐ ๐ ๐โโณ ๐ Towards Real-time Simulation of Deformable Objects 40
Deformation Gradient ๐ฏ๐ Rest pose ๐ Current pose ๐ Towards Real-time Simulation of Deformable Objects 41
Distance from Constraint Manifold 2 ๐น ๐ = min ๐ฅ ๐ ๐ฏ ๐ ๐ โ ๐ ๐ ๐โโณ ๐ ๐ฏ ๐ ๐ ๐ฏ ๐ ๐ ๐ ๐ ๐ ๐ Towards Real-time Simulation of Deformable Objects 42
Intuitive Projection Manifold: SO(3) ๏ต SO(3) โฆ Best Fit Rotation Matrix ๏ต โAs Rigid As Possibleโ [Chao et al. 2010] Towards Real-time Simulation of Deformable Objects 43
Intuitive Projection Manifold: SL(3) ๏ต SL(3) โฆ Group of Matrices with det = 1 ๏ต Volume Preservation Towards Real-time Simulation of Deformable Objects 44
Other Constraint Manifolds (Example Based) Towards Real-time Simulation of Deformable Objects 45
Other Constraint Manifolds (Laplace-Beltrami operator) Towards Real-time Simulation of Deformable Objects 46
Remark: Projective Dynamics 2 ๐น ๐, ๐ = min ๐ฅ ๐ ๐ฏ ๐ ๐ โ ๐ ๐ ๐ก. ๐ข. ๐ โ โณ ๐,๐ ๐ 1 2 ๐ ๐ ๐ฉ๐ + ๐ ๐ (๐ช๐ + ๐ ) min ๐,๐ ๐ ๐, ๐ = min ๐ก. ๐ข. ๐ โ โณ ๐,๐ ๏ต Like before, ๐ฉ, ๐ช, ๐ does not depend on ๐ and ๐ ๏ต If we fix ๐ -> easy to solve for ๐ : Projection ๏ต If we fix ๐ -> easy to solve for ๐ : ๐ โ= โ๐ฉ โ1 (๐ช๐ + ๐ ) Towards Real-time Simulation of Deformable Objects 47
Recommend
More recommend