Custom Joint Orientation Solver
This is a custom joint orientation solver I wrote as part of the rigging pipeline for Blackrock Studio.
The solver is used as part of the auto rigging tools but I also expose it through a general rigging tools utilities interface so it can be used for non-automated rigging tasks.
It accepts 2 objects to compute an orientation matrix for a given joint. The first object is typically the child joint of the joint being orientated and is used to determine the forward vector. The second object is used to determine an up vector.
In this video, the object used to determine the up vector is the yellow locator.
I compute the cross product of the forward and up vectors to get my right vector, and then cross the right with the existing forward vector to get my *actual* up vector.
I then build a 4×4 matrix from the resulting 3 vectors (with the 4th row empty) and feed this into Maya’s xform function to set the absolute orientation of the joint and then set zeroScaleOrient on the joint itself.
Leave a Reply