Hi all,

I'm currently trying to work through a Position Based approach to a soft body. The basic idea is to take

Position Based Fluids (PBF) and use a constitutive model instead of the density constraint. Since it's a meshless model I'm using the idea of an incremental deformation gradient from

here and trying to use a fixed corotated constitutive model from

here.

The constraint would be to minimize the energy density for each particle. Calculating the energy is relatively easy but I'm having a hard time deriving the gradient of the energy with respect to the new particle position.

The snow paper gives an equation for the derivative of the energy with respect to the deformation gradient:

Attachment:

energy.png [ 3.76 KiB | Viewed 1963 times ]
I believe I could just multiply that by the derivative of the deformation gradient with respect to the new positions(X is a matrix of current positions, Y is a matrix of predicted positions):

Attachment:

deformation.png [ 3.54 KiB | Viewed 1963 times ]
But... that's just the incremental update so it needs to be multiplied by the cumulative deformation (which for differentiation is just a constant). Since I want the gradient of the energy constraint my understanding is that I would multiply the above two derivatives (which are both 3x3 matrices) by the gradient of the shape function to end up with a 3 element vector. That is the part of PBF that I don't completely understand.

Attachment:

pbf_constraint_gradient.png [ 4.85 KiB | Viewed 1963 times ]
Shows the gradient of the density constraint. The gradient for each particle is summed up and used in the lambda calculation but based on the above formulation don't they end up canceling out? Since the calculation for the ith particle is actually the sum of all other particles.

I'd love some help understanding the lambda calculation in PBF or the derivative of the deformation gradient with respect to new positions.

Thanks