View
3
Download
0
Category
Preview:
Citation preview
Differentiable Cloth Simulation for Inverse Problems
Junbang Liang
1
Content● Motivation
● Related Work
● Our Method○ Simulation pipeline
○ Gradient Computation
● Results
2
Motivation● Differentiable Physics Simulation as a Network Layer
○ Physical property estimation
○ Control of physical systems
3
Motivation● Differentiable Physics Simulation as a Network Layer
○ Physical property estimation○ Control of physical systems
Yang et al. (2017) Demo of our differentiable simulation 4
Content● Motivation
● Related Work
● Our Method○ Simulation pipeline
○ Gradient Computation
● Results
5
Related Work● Differentiable rigid body simulation
○ Formulation not scalable to high dimensionality
Degrave et al. 2019
Belbute-Peres et al. 2019
6
Related Work● Learning-based physics [Li et al. 2018]
○ Unable to guarantee physical correctness
7
Our Contributions● Dynamic collision handling to reduce dimensionality
● Gradient computation of collision response using implicit differentiation
● Optimized backpropagation using QR decomposition
8
Content● Motivation
● Related Work
● Our Method○ Simulation pipeline
○ Gradient Computation
● Results
9
Introduction to Simulation● Partial differential equation (PDE) of Newton’s law:
● Solve satisfying , where
● Discretization to ordinary differential equations (ODE):
● Solve satisfying , where
10
Introduction to Simulation● Partial differential equation (PDE) of Newton’s law:
● Solve satisfying , where
● Discretization to ordinary differential equations (ODE):
● Solve satisfying , where
11
Point Cloud Simulation Flow1.
2.○ S
○ Newton’s method
3.
4.
12
Cloth Simulation Flow1.
2.○ S
○ Newton’s method
3.
4.
5.
13
Collision Response●
14
Collision Response●
15
Mesh Simulation Flow: Backpropagation
1.
2.○ S
○ Newton’s method
3.
4.
5.
Gradient computation available?
Handled by auto-differentiation
Handled by auto-differentiation
Handled by auto-differentiation
16
Mesh Simulation Flow: Backpropagation
1.
2.○ S
○ Newton’s method
3.
4.
5.
Using implicit differentiation!
Gradient computation available?
17
Implicit Differentiation: Linear Solve● Formulation:
● Input: and . Output:
● Back propagation: use to compute and ○ : the loss function.
18
Implicit Differentiation: Linear Solve● Back propagation: use to compute and , where is the loss
function.
● Implicit differentiation form:
● Solution:
where is computed from , and is the solution of .
19
Mesh Simulation Flow: Backpropagation
1.
2.○ S
○ Newton’s method
3.
4.
5. Using implicit differentiation!
Gradient computation available?
20
Gradients of Collision?
21
Collision Handling
● Objective formulation: Quadratic Programming
22
Gradients of Collision Response● Karush-Kuhn-Tucker (KKT) condition:
● Implicit differentiation:
23
Gradients of Collision Response● Solution:
● where dz and dλ is provided by the linear equation:
24
Acceleration of Gradient Computation●
● Linear system of n+m○ n: DOFs in the impacts○ m: number of constraints/impacts
● Insight: Optimized point moves along the tangential direction w.r.t. constraint gradient
25
Acceleration of Gradient Computation●
● Linear system of n+m○ n: DOFs in the impacts○ m: number of constraints/impacts
● Insight: Optimized point moves along the tangential direction w.r.t. constraint gradient
26
Acceleration of Gradient Computation● Explicit solution of the linear equation:
where Q and R is obtained from:
● Theoretical speedup: O((n+m)³) → O(nm²)○ n: number of vertices○ m: number of constraints
27
Content● Motivation
● Related Work
● Our Method○ Simulation pipeline
○ Gradient Computation
● Results
28
Experimental Results● Ablation study
○ Backpropagation speedup
● Applications○ Material estimation
○ Motion control
29
Ablation Study● Speed improvement in backpropagation● Scene setting: a large piece of cloth crumpled inside a pyramid
30
Results● Speed improvement in backpropagation● Scene setting: a large piece of cloth crumpled inside a pyramid
The runtime performance of gradient computation is significantly improved by up to two orders of magnitude.
31
Material Estimation● Scene setting: A piece of cloth hanging under gravity and a constant wind
force.
32
Results● Application: Material estimation● Scene setting: A piece of cloth hanging under gravity and a constant wind
force.
Our method achieves the fastest speed and the smallest overall error.
33
Motion Control● Scene setting: A piece of cloth being lifted and dropped to a basket.
35
Results● Application: Motion control● Scene setting: A piece of cloth being lifted and dropped to a basket.
Our method achieves the best performance with a much smaller number of simulations.
36
Conclusion● Differentiable simulation
○ Applicable to optimization tasks
○ Embedded in neural networks for learning and control
● Fast backpropagation for collision response
38
Future Work● Optimization of the computation graph
○ Vectorization
○ PyTorch3D/DiffTaichi
● Integrate with other materials○ Rigid body, deformable body, articulated body, etc
39
Q&A
40
Recommended