This week I don’t have much time to write a post. That said, I would just like to introduce the topic that we will focus on in the future. This is the subject of XPBD.
XPBD is a response to a stiffness problem encountered with PBD. If we include a stiffness constant, , in the calculation of when satisfying constraints, like for example :
…it has been found that constraints become infinitely rigid.
More precisely, is dependent on the time step and the number of iterations of the simulation. The constraints become infinitely rigid as the number of iterations approaches infinity, or as the time step decreases.
Thus, our focus this week is to explore two papers that improve PBD. Here are two articles that can help provide context for today’s discussion:
XPBD
XPBD aims to eliminate the following dependencies that influence the effective stiffness of the system:
- The time step
- The number of iterations performed when satisfying the constraints.
This problem occurs during simulations where several types of materials are used (i.e. soft bodies interacting with rigid bodies.)
To solve this problem, the PBD algorithm is extended to have a direct correspondence with Newton’s second law.
Regardons l’algorithme proposé :
The XPBD simulation loop - Source
Recall the PBD simulation loop we talked about in my last article. The most important difference is this idea of iteratively calculating at line (9).
Specifically, the calculation of the change in the Lagrange multiplier, , during one iteration of the solver is defined as follows:
where is a block diagonal compliance matrix corresponding to the inverse of the stiffness constants, . In addition, the constraints are regularized with which results from the factorization of a quadratic energy potential.
In terms of the time step, we can say that:
When , we arrive at the PBD equation! This fact is not shocking if we consider that a compliance factor equal to 0 is similar to a stiffness equal to infinity, .
All that said, we can define as follows:
This is all a little hand-wavy, but rest assured that we will deal with the derivation of all of these new equations in a later article.
Small Steps
As it turns out, we can make this simulation even better. By taking smaller time steps to advance the simulation, rather than iteratively solving the system of constraints for each larger time step, we can increase stability of the system and reduce error for a wide range of stiffness parameters:
What’s interesting is that we have no reason to keep storing because we are solving the constrained functions only once for each small step. In other words, the modification of does not propagate to future constraint solving iterations, which is contrary to PBD.
Since we only perform one iteration per time substep and the initial value of the Lagrange multiplier is 0, we can rewrite the equation as follows:
This equation will be used during the cloth simulation!
As I already mentioned, this week our conversation would be short because I have a busy week ahead of me! In a later article, we will see the derivations of all the equations we have just seen.