Page 1
GPU Rigid Body Dynamics
Page 3
Demo credits
Matthias Müller-Fischer
Nuttapong Chentanez
Tae-Yong Kim
Aron Zoellner
Kevin Newkirk
Page 4
Value of GPU physics
Immersion
Parallel: right tool for the job
Increased consumer choice
Page 5
SIGGRAPH paper
Mass Splitting for Jitter-Free Parallel
Rigid Body Simulation
Richard Tonge, Feodor Benevolenski,
Andrey Voroshilov
Page 6
Contents
Past
— The challenges of rigid body simulation
—Model
— Existing solvers
— Value of fixing jitter
Present
— Jitter-free solver
— Video
Future
Page 7
NVIDIA PhysX
Turbulence
Clothing
Particles and fluids
Destruction
Page 8
Past: The challenges of rigid body
simulation
Page 9
Why is rigid body simulation on GPU hard?
Generating enough parallel work
Irregular
Real-time
Jitter
Page 12
Stable piles = balanced forces
Page 13
Past: Model & Discretization
Page 14
Model
Non-penetration condition: Φ 𝐱 ≥ 0
Page 15
Jacobian Φ 𝐱 ≥ 0
𝐉 = 𝜕Φ
𝜕𝐱, maps body velocity to contact velocity
Example:
Page 16
When should contacts break?
Page 17
The Signorini Conditions:
All relative velocities must
be zero or separating
All contact forces must
be non attractive
No force at separating contacts
0 ≤ 𝐯rel
0 ≤ 𝜆
𝐯rel i = 0 or 𝜆i = 0 Antonio Signorini
Page 18
Model
𝐌𝐱 &= 𝐉𝐓𝛌 + 𝐟𝑒𝐱 &= 𝐯
𝛌 ≥ 𝟎&⊥ 𝐉𝐯 ≥ 𝟎
Non-penetration condition: Φ 𝐱 ≥ 0
𝐉 = 𝜕Φ𝜕𝐱
Page 19
Notation
h time step size
x positions and orientations
v linear and angular velocities
fe external forces
M mass matrix
Φ(x) contact separation
J 𝜕Φ
𝜕𝐱&, the Jacobian of Φ
z contact impulses
Page 20
Discretization
𝐌 𝐯new − 𝐯old &= 𝐉𝐓𝐳 + ℎ𝐟𝑒𝐱new − 𝐱old &= ℎ𝐯new
𝐳 ≥ 𝟎&⊥ 𝐉𝐯new ≥ 𝟎
Page 21
Solution
𝐪&≔ 𝐉(𝐯old + ℎ𝐌−1𝐟𝑒)
𝐍&≔ 𝐉𝐌−𝟏𝐉𝑻
𝐳&≔ LCP 𝐍, 𝐪
𝐯new &≔ 𝐯old + h𝐌−𝟏𝐉𝑻𝐳𝐱new &≔ 𝐱old + h𝐯new
Page 23
Past: Existing methods
Page 24
Apply gravity Solve
Rendered
Frame
Rendered
Frame
Penetrating
Configuration
Page 25
Existing solver method 1:
Penetrating
configuration
Rendered
Frame
Page 26
Parallel PGS - coloring
Page 27
Existing solver method 2:
Page 28
Method 1 (Parallel Projected Gauss Seidel, PGS)
— Provably convergent ✔
— Limited parallelism ✘
— Jitters ✘
— Widely used
Method 2 (Parallel Projected Jacobi)
— Maximally parallel ✔
— Jitter free ✔
— Non convergent in many cases✘
— Converges slowly✘
— Unusable in games
Page 29
Past: Value of fixing jitter
Page 31
Present: Jitter-free GPU solver
Page 33
First idea: Spatial splitting
Page 35
New idea: Mass splitting
Page 36
New idea: Mass splitting
Page 37
PGS with exact joints
Page 39
Results
1E-08
1E-06
1E-04
1E-02
1E+00
1E+02
0 500 1000
Frame
PGS
Mass splitting
k.e.
Page 42
Rigidity
Real-time
(15 iterations)
Not real-time
(500 iterations)
Page 44
Summary
What a solver does
Model
Previous standard: PGS
Jitter free => solver can move to GPU
Idea: Split bodies non-spatially
Provably convergent – necessary for games
Future
𝛌 ≥ 𝟎 ⊥ 𝐉𝐯 ≥ 𝟎
Page 45
Acknowledgments
GPU rigid body technology
Richard Tonge
Feodor Benevolenski
Andrey Voroshilov
Fracture technology and demo
Matthias Müller-Fischer
Nuttapong Chentanez
Tae-Yong Kim
Aron Zoellner
Thanks also to the PhysX SDK team