Papers
Topics
Authors
Recent
2000 character limit reached

Extended Position Based Dynamics (XPBD)

Updated 8 December 2025
  • XPBD is a constraint-based simulation framework that generalizes Position Based Dynamics by introducing compliance parameters for controlled constraint softness.
  • It supports diverse constraint types—including stretch, bending, and collisions—enabling stable real-time simulations for materials from cloth to elastoplastic media.
  • Recent advances in XPBD feature multigrid acceleration and full differentiability, facilitating efficient parameter estimation and advanced robotics applications.

Extended Position Based Dynamics (XPBD) is a constraint-based simulation framework for elastodynamics, soft-body and cloth physics, and continuum mechanics. XPBD generalizes classical Position Based Dynamics (PBD) by introducing compliance parameters for each constraint, enabling a principled and stable way to interpolate between hard (infinite-stiffness) and soft (finite-stiffness) constraint enforcement. By evolving Lagrange multipliers as state variables and decoupling effective stiffness from solver iteration count, XPBD enables real-time, robust simulations of highly stiff and complex systems—including applications ranging from cloth to highly inelastic, plastic, or granular materials. Recent research has improved XPBD's scalability, differentiability, and robustness, extending its reach across simulation, parameter estimation, robotics, and real-time graphics (Li et al., 19 May 2025, Larionov et al., 2022, Yu et al., 19 May 2024, Stuyck et al., 2023, Zhang et al., 2023, Liu et al., 2022).

1. Mathematical Formulation and Evolution Beyond PBD

XPBD originates from a variational formulation: given positions xR3Nx \in \mathbb{R}^{3N} and constraints C(x)RmC(x) \in \mathbb{R}^m collected with compliance matrix α\alpha, the energy is

U(x)=12C(x)α1C(x)U(x) = \frac{1}{2} C(x)^\top \alpha^{-1} C(x)

Time integration is typically implicit-Euler-like. Per time step, XPBD seeks xt+1x^{t+1} as:

xt+1=argminxU(x)+12Δt2xx~M2x^{t+1} = \arg\min_x U(x) + \frac{1}{2\Delta t^2} \| x - \tilde{x} \|_M^2

where x~=xt+Δtvt\tilde{x} = x^t + \Delta t v^t is the inertial prediction, MM is the mass matrix. Introducing Lagrange multipliers λ\lambda and linearizing, the saddle-point system is

[MC Cα~][Δx Δλ]=[0 C(x)α~λ],α~=α/Δt2\begin{bmatrix} M & -\nabla C^\top \ \nabla C & \widetilde{\alpha} \end{bmatrix} \begin{bmatrix} \Delta x \ \Delta \lambda \end{bmatrix} = \begin{bmatrix} 0 \ -C(x) - \widetilde{\alpha} \lambda \end{bmatrix}, \quad \widetilde{\alpha} = \alpha/\Delta t^2

Elimination yields the Schur complement system for multipliers:

AΔλ=b,A=CM1C+α~,b=C(x)α~λA \Delta\lambda = b, \quad A = \nabla C M^{-1} \nabla C^\top + \widetilde{\alpha},\quad b = -C(x) - \widetilde{\alpha}\lambda

Classical PBD arises in the limit α0\alpha \to 0. XPBD’s compliance formulation allows stable, controlled constraint softness and eliminates the coupling between sub-iteration count and physical stiffness, a limitation of standard PBD (Larionov et al., 2022, Liu et al., 2022).

2. Constraint Types, Compliance, and Solver Structure

XPBD supports multiple concurrent constraint types (e.g., stretch/shear, bending, volumes, collisions), each specified by a function Ci(x)=0C_i(x) = 0 or vector-valued Ci:R3NRkC_i:\mathbb{R}^{3N}\rightarrow\mathbb{R}^k with local compliance block αi\alpha_i.

Typical physically-motivated compliance specification examples include:

  • Membrane (per triangle): α=A[C]1\alpha_\triangle = A[C]^{-1}, with [C][C] the membrane constitutive block assembled from Young’s moduli, Poisson ratios, and shear modulus.
  • Scalar bending: αbend=1/b\alpha_{\text{bend}} = 1/b, bb as bending compliance.

Constraint solve proceeds through iterative Gauss–Seidel style projections. For each constraint, at iteration kk:

  1. Evaluate violation: C(xk)C(x^k).
  2. Compute Jacobian: J=C(xk)J = \nabla C(x^k).
  3. Form and solve:

(JM1J+α~)Δλ=(C(xk)+α~λk)(J\,M^{-1}J^\top + \tilde{\alpha})\,\Delta\lambda = -\left(C(x^k)+\tilde{\alpha}\lambda^k\right)

Update state:

xk+1=xk+M1JΔλ λk+1=λk+Δλx^{k+1} = x^k + M^{-1}J^\top\Delta\lambda \ \lambda^{k+1} = \lambda^k + \Delta\lambda

All constraints are handled uniformly; the solver can interleave various constraints, supporting parallelization for non-adjacent groups (Larionov et al., 2022, Li et al., 19 May 2025).

3. Differentiability and Gradient-Based Estimation

XPBD admits a fully differentiable implementation, as all constraint projections, linear solves, and state updates are analytic functions of both positions and compliance/material parameters:

  • The closed-form per-constraint update for scalar constraints facilitates analytic gradients.
  • Full-differentiable XPBD (DiffXPBD) carries forward the entire operation trace for backward/adjoint passes:
    • The backward sweep solves a global adjoint system, propagating gradients to any control variable (e.g., compliance, body shape, material, external forces, or control inputs).
    • Collisions enter as standard compliant constraints, so their gradients are also propagated with no special-case logic.
  • This enables high-resolution inverse estimation: matching simulated trajectories to observed data by optimizing over material parameters (Stuyck et al., 2023, Larionov et al., 2022, Zhang et al., 2023, Liu et al., 2022).

4. Multigrid Acceleration and Scalability for High-Resolution and Stiffness

While the nonlinear Gauss-Seidel solver in XPBD rapidly damps high-frequency error, it exhibits poor convergence for low-frequency (global) constraint violation—especially problematic for high-resolution or highly stiff systems.

The MGPBD solver addresses this by replacing the local update loop with a global Preconditioned Conjugate Gradient (PCG) solve, using Unsmoothed Aggregation Algebraic Multigrid (UA-AMG) as the preconditioner:

  • The global dual system for multipliers AΔλ=bA\Delta\lambda = b is solved via PCG; a V-cycle of UA-AMG provides a scalable preconditioner.
  • UA-AMG achieves nearly mesh-independent convergence rates, accelerates global error dissipation, and, with a lazy hierarchy setup, amortizes the computational setup overhead.
  • Smoothers such as weighted Jacobi (with optimal ω\omega) are used.
  • The method features a simplified, low-cost near-kernel extraction by a small number of GS sweeps on Ax=0Ax=0 instead of costly adaptive smoothed aggregation.

Performance benchmarks demonstrate stable and efficient high-resolution, high-stiffness simulations that outperform XPBD (Jacobi/GS) and are competitive or superior to existing sparse linear algebra libraries (e.g., NVIDIA AMGX, AMGCL, PARDISO) (Li et al., 19 May 2025).

Simulation Task XPBD MGPBD
Bunny-Squash (850K tets) Stalls/crashes 10610^{-6} residual in 20 its
Cloth Hanging (524K edges) Stalls at >104>10^{-4} 10410^{-4} in 200 its
Muscle-Human (1.67M tets) Fails/drifts Visually stable, 40.6 s/frame

Setup reuse reduces hierarchy construction from ~66% to ~2% of runtime.

5. Extensions to Inelastic and Plastoplastic Materials

XPBD has been extended to handle continuum inelasticity, finite-strain elastoplasticity, and viscoplastic granular flows within the XPBI framework:

  • In XPBI, constraints Cp(Fp)C_p(F_p) are defined per-particle in terms of their updated deformation gradient FpF_p, using hyperelastic energy densities (e.g. St. Venant–Kirchhoff) within the XPBD constraint projection.
  • Plasticity is handled via “return-mapping” directly on FpF_p, ensuring yield surfaces such as von Mises or Drucker–Prager are respected.
  • Implicit plasticity in-the-loop—plastic corrector applied each iteration—avoids tension instability typical of semi-implicit projection.
  • Smoothing kernels (e.g. Wendland C2) are used for robust estimation of velocity gradients and deformation.
  • XPBI supports high-resolution real-time simulation of snow, sand, plasticine, and simultaneous coupling with standard XPBD water and cloth, requiring no special mesh/particle infrastructure.
Material XPBI Behavior Vanilla XPBD MPM
Sand collapse Correct repose angle, correct pile No correct pile Gaps/clumping
Snow/granular Stable, avoids tensile artifacts Not handled MPM artifacts

This generalizes XPBD to a broader class of continuum materials, preserving the GPU efficiency and simple data structure of the original method (Yu et al., 19 May 2024).

6. Applications in Estimation, Control, and Robotics

XPBD’s differentiable, constraint-based architecture underpins emerging applications in simulation-based inference, optimal control, and robot manipulation:

  • Estimation pipelines use differentiable XPBD (or XPBI) to recover cloth/rope/soft body parameters (bending rigidity, anisotropy, etc.) from captured deformation data, solving inverse problems efficiently without the iterative penalty stiffness tuning typical in classical methods (Larionov et al., 2022, Stuyck et al., 2023, Liu et al., 2022).
  • Robotics research leverages XPBD’s analytic gradients for trajectory optimization and differentiable safety constraints (e.g., signed distance fields for obstacle avoidance). Control objectives are composed with physics-based regularization and solved with mature gradient-based optimizers for autonomous cloth or rope manipulation (Zhang et al., 2023, Liu et al., 2022).
  • XPBD accommodates hybrid algorithmic loops (e.g., Thomas algorithm for inextensible ropes), exact enforcement of global constraints, and support for automatic differentiation frameworks (e.g., PyTorch, C++).
  • Practical implementations demonstrate successful estimation and control in robotic real-to-sim loops and large-scale geometric optimization across millions of degrees of freedom.

7. Strengths, Limitations, and Ongoing Developments

Strengths:

  • Stable handling of large time steps and extreme stiffness due to explicit compliance.
  • Support for arbitrary constraint topologies, multi-physics, and plastic effects.
  • Natural and efficient differentiability for simulation-based optimization, material inference, and control.
  • GPU-amenable, with multigrid-accelerated solvers providing mesh-independent convergence at scale (Li et al., 19 May 2025).

Limitations:

  • Nonlinear GS/Jacobi sub-iteration count still affects convergence rate for global errors; multigrid/PCG solvers are required at high stiffness/resolution.
  • Some specialized solvers (e.g., tridiagonal Thomas) are topology-specific.
  • Differentiability with many unrolled iterations can increase memory demands; trade-offs exist between accuracy (unroll length) and efficiency.
  • Quaternion-based twist/bend constraints add algebraic overhead in coupled rigid-inelastic systems (Liu et al., 2022).

Recent advances such as MGPBD’s aggregated multigrid solve, efficient nullspace extraction, and lazy prolongator setup address critical scalability and stability bottlenecks, pushing XPBD toward reliable, high-speed, and high-fidelity simulation pipelines for complex deformable and inelastic systems (Li et al., 19 May 2025). Further research continues to integrate XPBD into real-time, multi-material simulations and learning-augmented physical modeling frameworks.

Whiteboard

Follow Topic

Get notified by email when new papers are published related to Extended Position Based Dynamics (XPBD).