-
Hi, I have been reading the code of the implementation of the XPBD FEM constraint, however, it seems to be a bit different from the formula from the XPBD paper.
//update mulitiplier,aka lamda?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hm, the names of the variables are not self-explaining due to copy & paste. I have to fix that. The explanation is that we use the potential energy: U = 0.5 C^T alpha^-1 C (Eq. 5 in XPBD paper) In our original paper we used C= U in the PBD framework. To adapt this to XPBD we now use: C = sqrt(2 U') with U = alpha^-1 U' and alpha = 1/youngsModulus. grad C = 1/C grad U' This is where the additional C's come from. In the code grad U' has the name "gradC" which is quite misleading which comes from lazy copy & pasting stuff. I hope that clarifies this a bit. |
Beta Was this translation helpful? Give feedback.
Hm, the names of the variables are not self-explaining due to copy & paste. I have to fix that. The explanation is that we use the potential energy:
U = 0.5 C^T alpha^-1 C (Eq. 5 in XPBD paper)
In our original paper we used C= U in the PBD framework. To adapt this to XPBD we now use:
C = sqrt(2 U')
with U = alpha^-1 U' and alpha = 1/youngsModulus.
This yields:
grad C = 1/C grad U'
This is where the additional C's come from. In the code grad U' has the name "gradC" which is quite misleading which comes from lazy copy & pasting stuff.
I hope that clarifies this a bit.