Layering Deformers

In most rigs, the geometry is deformed by a skinCluster driven by joints. An easy way to add additional deformations to a model is to add blendshape targets to a blendShape node that is before the skinCluster in the deformation stack. Unfortunately, any changes made by the blendshape node are then deformed by the skinCluster. This is the desired effect when doing a corrective blendshape workflow using tools such as Chad Vernon’s shape inverter pluigin, or BraveRabbit’s Shapes plugin.

However, sometimes, you want to add additional deformations after the skinCluster (or other primary deformer, like a lattice).

First, let’s look at how deformers work. When the node evaluates, it calculates new point positions for the components of the geometry it is deforming. The algorithm for calculating the new positions varies based on node, but all deformers have a neutral state wherein the geometry is unchanged. For deformers that are driven by transforms, like the cluster, skinCluster, and softMod, this is due to the bindPreMatrix attribute.

When a deformer is created, its bindPreMatrix attribute(s) are set to the inverse world matrix of its influences. The bindPreMatrix attribute can be set, allowing you to update the bind position of a skinned joint without having to re-create the skinCluster. If you do this, remember that the index to which the joint is connected in the skinCluster’s matrix attribute corresponds to the index in the skinClusters bindPreMatrix attribute. The bindPreMatrix attribute can also be connected, usually by the parentInverseMatrix attribute of the influence. By doing so, you guarantee that only the local transformation of that influence will deform the geometry.

Imagine your character has arms that are semi-realistic; modeled as a tube, but needing to deform with an anatomical elbow, and the animators want to control the silhouette along the entire length of the arm. The skinning necessary to produce a good, anatomical elbow is incompatible with the skinning to give you a control at each edge loop along the arm. But, if you rivet joints to the arm, you can make a second layer of skinning that uses those joints, without creating a double transform. A couple caveats:

  • Whatever method you use to rivet the joints to the mesh (follicle, polyEdgeToCurve and pointOnCurve node, etc), make sure it reads the outputGeometry of the main deformer (eg, the skinCluster), not the outMesh (mesh) or worldSpace (nurbs) of the geometry. Otherwise, you will get a cycle.
  • Maya cannot handle two skinClusters on the same geometry . You will need to create a second geometry and skin that, with a blendshape node at the front of the stack driven by the first geometry . As an optimization when you are finished, you can remove the blendshape node and directly connect the outputGeometry of the first skinCluster to the inputGeometry of the second skinCluster through it’s groupParts node, but that’s a a discussion for another time.

I hope this post helps you effectively add layers to your onions rigs. The ability to sculpt the silhouette of a character is a must-have for animators, especially if the show has a stylized design aesthetic. And your animators will be grateful to have controls stay with the mesh as it deforms.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s