Driving Cluster With Matrices Instead of Handles
Whenever I have to set up a cluster deformer using matrices I have to try and remember how all the different matrix attributes contribute to the overall deformation. I've never bothered to write it down but after discovering a bug in one of my rigs was being caused by an incorrectly set up cluster I decided I need to write it down. So I'm putting the info here in case someone else finds it useful in the future.
So when deforming a shape that has all 1's as it's weight map:
vtx_pos * geomMatrix * bindPreMatrix * matrix
And when deforming a shape that has painted weights:
vtx_pos * geomMatrix* bindPreMatrix * postMatrix* weightedMatrix* preMatrix
So because both modes use the bindPreMatrix as the first step I just ignore the postMatrix and put the inverse or the neutral matrix as the bindPreMatrix.
Then I connect the neutral matrix as the preMatrix, and the offset (delta) matrix as the weghtedMatrix.
For the matrix attribute that gets used by the rigid deformation mode, I just mulitply the weightedMatrix and the preMatrix.together and plug the result in.
Hopefully other people will find this post useful, if nothing else it will be something I can refer people to in the future.
Comments