Differentiable Cloth Simulation for Inverse Problems Junbang Liang - - PowerPoint PPT Presentation

differentiable cloth simulation for inverse problems
SMART_READER_LITE
LIVE PREVIEW

Differentiable Cloth Simulation for Inverse Problems Junbang Liang - - PowerPoint PPT Presentation

Differentiable Cloth Simulation for Inverse Problems Junbang Liang 1 Content Motivation Related Work Our Method Simulation pipeline Gradient Computation Results 2 Motivation Differentiable Physics


slide-1
SLIDE 1

Differentiable Cloth Simulation for Inverse Problems

Junbang Liang

1

slide-2
SLIDE 2

Content

  • Motivation
  • Related Work
  • Our Method

○ Simulation pipeline ○ Gradient Computation

  • Results

2

slide-3
SLIDE 3

Motivation

  • Differentiable Physics Simulation as a Network Layer

○ Physical property estimation ○ Control of physical systems

3

slide-4
SLIDE 4

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

slide-5
SLIDE 5

Content

  • Motivation
  • Related Work
  • Our Method

○ Simulation pipeline ○ Gradient Computation

  • Results

5

slide-6
SLIDE 6

Related Work

  • Differentiable rigid body simulation

○ Formulation not scalable to high dimensionality Degrave et al. 2019 Belbute-Peres et al. 2019

6

slide-7
SLIDE 7

Related Work

  • Learning-based physics [Li et al. 2018]

○ Unable to guarantee physical correctness

7

slide-8
SLIDE 8

Our Contributions

  • Dynamic collision handling to reduce dimensionality
  • Gradient computation of collision response using implicit differentiation
  • Optimized backpropagation using QR decomposition

8

slide-9
SLIDE 9

Content

  • Motivation
  • Related Work
  • Our Method

○ Simulation pipeline ○ Gradient Computation

  • Results

9

slide-10
SLIDE 10

Introduction to Simulation

  • Partial differential equation (PDE) of Newton’s law:
  • Solve satisfying , where
  • Discretization to ordinary differential equations (ODE):
  • Solve satisfying , where

10

slide-11
SLIDE 11

Introduction to Simulation

  • Partial differential equation (PDE) of Newton’s law:
  • Solve satisfying , where
  • Discretization to ordinary differential equations (ODE):
  • Solve satisfying , where

11

slide-12
SLIDE 12

Point Cloud Simulation Flow

1. 2.

○ S ○ Newton’s method

3. 4.

12

slide-13
SLIDE 13

Cloth Simulation Flow

1. 2.

○ S ○ Newton’s method

3. 4. 5.

13

slide-14
SLIDE 14

Collision Response

  • 14
slide-15
SLIDE 15

Collision Response

  • 15
slide-16
SLIDE 16

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

slide-17
SLIDE 17

Mesh Simulation Flow: Backpropagation

1. 2.

○ S ○ Newton’s method

3. 4. 5.

Using implicit differentiation! Gradient computation available?

17

slide-18
SLIDE 18

Implicit Differentiation: Linear Solve

  • Formulation:
  • Input: and . Output:
  • Back propagation: use to compute and

○ : the loss function.

18

slide-19
SLIDE 19

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

slide-20
SLIDE 20

Mesh Simulation Flow: Backpropagation

1. 2.

○ S ○ Newton’s method

3. 4. 5.

Using implicit differentiation! Gradient computation available?

20

slide-21
SLIDE 21

Gradients of Collision?

21

slide-22
SLIDE 22

Collision Handling

  • Objective formulation: Quadratic Programming

22

slide-23
SLIDE 23

Gradients of Collision Response

  • Karush-Kuhn-Tucker (KKT) condition:
  • Implicit differentiation:

23

slide-24
SLIDE 24

Gradients of Collision Response

  • Solution:
  • where dz and dλ is provided by the linear equation:

24

slide-25
SLIDE 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

25

slide-26
SLIDE 26

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

slide-27
SLIDE 27

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

slide-28
SLIDE 28

Content

  • Motivation
  • Related Work
  • Our Method

○ Simulation pipeline ○ Gradient Computation

  • Results

28

slide-29
SLIDE 29

Experimental Results

  • Ablation study

○ Backpropagation speedup

  • Applications

○ Material estimation ○ Motion control

29

slide-30
SLIDE 30

Ablation Study

  • Speed improvement in backpropagation
  • Scene setting: a large piece of cloth crumpled inside a pyramid

30

slide-31
SLIDE 31

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

slide-32
SLIDE 32

Material Estimation

  • Scene setting: A piece of cloth hanging under gravity and a constant wind

force.

32

slide-33
SLIDE 33

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

slide-34
SLIDE 34

Application: Material Estimation

34

slide-35
SLIDE 35

Motion Control

  • Scene setting: A piece of cloth being lifted and dropped to a basket.

35

slide-36
SLIDE 36

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

slide-37
SLIDE 37

Application: Motion Control

37

slide-38
SLIDE 38

Conclusion

  • Differentiable simulation

○ Applicable to optimization tasks ○ Embedded in neural networks for learning and control

  • Fast backpropagation for collision response

38

slide-39
SLIDE 39

Future Work

  • Optimization of the computation graph

○ Vectorization ○ PyTorch3D/DiffTaichi

  • Integrate with other materials

○ Rigid body, deformable body, articulated body, etc

39

slide-40
SLIDE 40

Q&A

40