InteractiveComputerGraphics / PositionBasedDynamics

PositionBasedDynamics is a library for the physically-based simulation of rigid bodies, deformable solids and fluids.
MIT License
1.9k stars 359 forks source link

XPBD Formulation for orthotropic cloth materials #192

Open OhLeMatt opened 1 month ago

OhLeMatt commented 1 month ago

Dear PBD community,

I have been using this software for a little time now and start having a base understanding of both the paradigm and this implementation. In particular, I mainly experiment with cloth simulation (for semi-interactive time budget) with the intention of using real material parameters and realistic cloth model deformation (first (1) linear isotropic, then (2) linear orthotropic, then (3) non-linear orthotropic).

The first step (1) linear isotropic can be achieved via DistanceConstraint_XPBD and IsometricBendingConstraint_XPBD.

My goal is to progress on the second step (2) linear orthotropic: since real cloth defomation exhibit different stretching and bending stiffness depending on the direction (warp, weft, bias parameters usually), an orthotropic model seem to be a realistic approach (also seem convincing in different papers during the past decade). The interface of the orthotropic stretching model that seem the most satisfying for me is FEMTriangleConstraint, however it doesn't have an XPBD formulation counterpart. For orthotropic bending, there is no implementation (unless I missed it).

For now, I am trying to formulate FEMTriangleConstraint_XPBD, by introducing the compliance factor (alpha) as well as the Lagrange multiplier (lambda) starting from the code of FEMTriangleConstraint. I started by comparing all PBD vs XPBD constraints, to witness the usual changes and inspire myself from it and explored most of PBD/XPBD papers related to my problem.

If I understand correctly, each constraint can influence N particles and is associated to a single scalar value for the lagrange multiplier (lambda) and a single scalar value for the compliance factor (alpha). The lagrangian multiplier sort of relates to the magnitude of the constraint force, and the gradient of the constraint for a certain particule relates to the direction of the force. Since the update of the lagrangian multiplier depends on the compliance factor (alpha), the main goal to convert a constraint from PBD to XPBD seems to find out how to compute it. From these observations, I realized most of XPBD implementaiton had a unique isotropic stiffness parameter and in those cases it is straightforward to compute the compliance factor (as the inverse of the stiffness parameter). Although I am stuck and I don't understand how to formulate the compliance value when there is a compliance matrix (such as orthotropic model), in other words more than one parameter.

Necessarily, I missed something and don't fully comprehend this paradigm, If anyone can hint me the right way and correct my false assumption, it would help me a lot. Any link to a paper I could have missed would also be welcomed. Otherwise, I might end up finding out by myself or from someone else's work (hopefully :D).

Thanks in advance. Regards.