Questions.
  1. Why use compliance \(\alpha\) instead of stiffness? What is the practical difference between using compliance vs stiffness?

    \[\boldsymbol{\lambda}_{elastic} = -\tilde{\boldsymbol{\alpha}}^{-1}\mathbf{C}(\mathbf{x}).\]
  2. And why multiply by \(\Delta t^2\)? (\(-\tilde{\alpha}^{-1} = -\alpha^{-1} \Delta t^2\), and \(\tilde{\beta} = \beta \Delta t^2\) in damping too)

Motivation

  • The blind spot of the PBD approach: the stiffness of constraints is dependent on time step size and iteration count.

    Figure

    • Why?? The problem is that stiffness is 1. That is, it is in an uncontrollable state, and stiffness only increases gradually as the iteration count increases.

      \[\Delta\mathbf{x} = k_j s_j \mathbf{M}^{-1} \nabla C_j(\mathbf{x}_i).\]
      • The position update method of the conventional PBD: fixed as \(k \in [0, 1]\)

      ⇒ A stiffness that is consistent and controllable regardless of time step and iteration is needed.

      Figure

      • PBD: stiffness is dependent on iteration count, so it grows larger over time (but in a non-linear way)
      • XPBD: stiffness is maintained consistently
  • There is no well-defined concept of constraint force.

    • It could only be used in a limited way in situations where speed is more important than accuracy, or where the simulation does not carry great importance.

Contribution

  • Extends the PBD constraint function → it corresponds intuitively well to well-defined elastic & dissipation energy potentials.
    • Directly defines and uses force based on the constraint.
    • Constructs a compliance matrix as the inverse of stiffness, and updates lambda together based on it at each step.
      • Poisson’s effect can be modeled in the construction of the compliance matrix ⇒ realistic material properties can be implemented.
  • Applies the concept of the total Lagrange multiplier to PBD ⇒ enables solving constraints in a manner independent of time step and iteration.

Method

Figure

  • The key is the method of updating the Lagrange multiplier together within the solver iteration.

It starts with the basic Newton’s equation of motion. Here, U is the Energy Potential.

\[\mathbf{M}\ddot{\mathbf{x}} = -\nabla U^{T}(\mathbf{x}).\]

To expand \(\ddot{\mathbf{x}}\) and eliminate \(\mathbf{v}\), and express it in terms of \(\mathbf{x}\), the implicit Euler formulation is transformed:

\[\begin{aligned} \mathbf{x}^{n+1} &= \mathbf{x}^n + \Delta t\, \mathbf{v}^{n+1} \\ \mathbf{v}^{n+1} &= \mathbf{v}^n + \Delta t\, \mathbf{M}^{-1} \left( \mathbf{F}_{ext} + k\nabla \mathbf{C}^{n+1} \right) \end{aligned}\]

A Survey on PBD, 2017

\[\mathbf{M}\left(\frac{\mathbf{x}^{n+1} - 2\mathbf{x}^n + \mathbf{x}^{n-1}}{\Delta t^2}\right) = -\nabla U^T(\mathbf{x}^{n+1}).\]

Energy and Force

Energy and force are expressed using the constraint.

\[U(\mathbf{x}) = \frac{1}{2}\mathbf{C}(\mathbf{x})^T \alpha^{-1} \mathbf{C}(\mathbf{x})\]

Force = magnitude * direction

  • Elastic Force:

    \[\mathbf{f}_{elastic} = -\nabla_{\mathbf{x}} U^T = -\nabla \mathbf{C}^T \boldsymbol{\alpha}^{-1} \mathbf{C}.\]
    • Here, \(\tilde{\alpha}^{-1} = \alpha^{-1} \Delta t^2\)
    \[\boldsymbol{\lambda}_{elastic} = -\tilde{\boldsymbol{\alpha}}^{-1}\mathbf{C}(\mathbf{x}).\]
  • Damping Force:

    \[\begin{aligned} D(\mathbf{x},\mathbf{v}) &= \frac{1}{2}\dot{\mathbf{C}}(\mathbf{x})^T \beta \dot{\mathbf{C}}(\mathbf{x}) \\ &= \frac{1}{2}\mathbf{v}^T \nabla \mathbf{C}^T \beta \nabla \mathbf{C} \mathbf{v}, \end{aligned}\]

    D here is an expression of how quickly energy is lost. A large \(\nabla{\mathbf{Cv}}\) = the two points are separating quickly = strong damping is needed.

    \[\mathbf{f}_{damp} = -\nabla_{\mathbf{v}} D^T = -\nabla \mathbf{C}^T \beta \nabla \mathbf{C} \mathbf{v}.\]

    Energy loss is proportional to velocity.

    • Here, \(\tilde{\beta} = \beta \Delta t^2\)
    \[\boldsymbol{\lambda}_{damp} = -\tilde{\boldsymbol{\beta}}\dot{\mathbf{C}}(\mathbf{x}) = -\tilde{\boldsymbol{\beta}}\nabla\mathbf{C}\mathbf{v},\]

The total Lagrange multiplier is:

\[\boldsymbol{\lambda} = \boldsymbol{\lambda}_{elastic} + \boldsymbol{\lambda}_{damp} = -\tilde{\boldsymbol{\alpha}}^{-1}\mathbf{C}(\mathbf{x}) - \tilde{\boldsymbol{\beta}}\nabla\mathbf{C}\mathbf{v}.\]

Solve for \(\Delta \lambda\)

Now, to solve the optimization problem with the method of Lagrange multipliers, g and f are defined.

\[\mathbf{M}\left(\frac{\mathbf{x}^{n+1} - 2\mathbf{x}^n + \mathbf{x}^{n-1}}{\Delta t^2}\right) = -\nabla U^T(\mathbf{x}^{n+1}).\]

In this equation, letting \(\tilde{\mathbf{x}} = 2\mathbf{x}^n - \mathbf{x}^{n+1}\),

\[\mathbf{M}(\mathbf{x}^{n+1} - \tilde{\mathbf{x}}) - \nabla \mathbf{C}(\mathbf{x}^{n+1})^T \boldsymbol{\lambda}^{n+1} = \mathbf{0}\]

However, \(\mathbf{\lambda}\) here is the elastic multiplier.

Also, arranging the combined multiplier in terms of C and transposing it to make a homogeneous equation,

\[\mathbf{C}(\mathbf{x}) + \tilde{\alpha}\boldsymbol{\lambda} + \tilde{\alpha}\tilde{\beta}\nabla\mathbf{C}\mathbf{v} = \mathbf{0}.\]

Denoting these two equations as \(\mathbf{g(x, \lambda), h(x, \lambda)}\) respectively, and linearizing:

\[\mathbf{g(x + \Delta x, \lambda + \Delta \lambda)} = \mathbf{g(x, \lambda)} + \frac{\partial \mathbf{g}}{\partial \mathbf{x}}\Delta \mathbf{x} + \frac{\partial \mathbf{g}}{\partial \mathbf{\lambda}}\Delta \lambda \\\\\] \[\mathbf{h(x + \Delta x, \lambda + \Delta \lambda)} = \mathbf{h(x, \lambda)} + \frac{\partial \mathbf{h}}{\partial \mathbf{x}}\Delta \mathbf{x} + \frac{\partial \mathbf{h}}{\partial \mathbf{\lambda}}\Delta \lambda\]

💡

Here, \(\mathbf{g(x, \lambda)}\) is effectively \(\mathbf{x}_0 = \tilde{\mathbf{x}}, \mathbf{\lambda}_0 = 0\) in the first Newton iteration, and afterwards, if the constraint gradient does not change much during the iterations, it effectively only retains a small residual and does not grow large, so it can be approximated as 0.

Arranging in terms of \(\Delta \lambda\):

\[\left[\left(\mathbf{I} + \frac{\tilde{\boldsymbol{\alpha}}\tilde{\boldsymbol{\beta}}}{\Delta t}\right)\nabla\mathbf{C}(\mathbf{x}_i)\mathbf{M}^{-1}\nabla\mathbf{C}(\mathbf{x}_i)^T + \tilde{\boldsymbol{\alpha}}\right]\Delta\boldsymbol{\lambda} = -\mathbf{h}(\mathbf{x}_i, \boldsymbol{\lambda}_i).\]

This is now solved with Gauss-Seidel or Jacobi!

When updating with the Gauss-Seidel method, for the j-th constraint, \(\Delta \lambda_j\) is ultimately defined as follows:

\[\Delta\lambda_j = \frac{-C_j(\mathbf{x}_i) - \tilde{\alpha}_j\lambda_{ij} - \gamma_j\nabla C_j(\mathbf{x}_i - \mathbf{x}^n)}{(1+\gamma_j)\nabla C_j\mathbf{M}^{-1}\nabla C_j^T + \tilde{\alpha}_j}.\]

💡

How to update with Jacobi Iteration?

Difference: applying this equation in Gauss-Seidel vs. Jacobi

  • This equation is a local update rule for a single constraint j.
  • That is, since it computes \(\Delta \lambda_j\) by looking only at the current state of constraint j, it can be used as-is even in the Jacobi method, which updates all constraints simultaneously and independently.

Conditions required in the Jacobi method

  1. For all constraints j:
    • \(\mathbf{x}_i, \lambda_{ij}\) and \(\mathbf{x}^n\) must use the values from the previous iteration
    • That is, reads use the previous values, and writes (updates) must go to a separate buffer
  2. Within a single iteration, other constraints do not reference the updated value
    • For parallel computation, they must necessarily be decoupled

Results

Figure

Figure

Figure

Figure