I was asked to write a simple getting started guide for using Michael Comet's poseDeformer, so here it is.
The poseDeformer is an open source plugin for Maya, that was written by Michael Comet. It works a bit like blendshapes where the amount of deforming depends on the pose. It is commonly used to correct for the limitations of weight painting on a smooth bind. It has two significant advantages over blendshapes
1. poseDeformer target shapes can be sculpted in world space with the skin already bound and the joints in the problem pose.
2. the poseReader does not rely on joint x,y,z rotation values so it works no matter how the pose is achieved.
The poseDeformer is reasonably complex and very powerful so it takes some time to learn how to use it. I'm going to limit this walkthough to a very simple example where I will use defaults and change only a couple of the many possible attributes. I just want to show the basic workflow.
I'll start with a cylinder and some bones.
It is important, when rigging, to orient your joint rotation axes correctly, which almost always means one axis points down the bone to the next joint. This is very important when using the poseDeformer and by default it expects that the x-axis will be down the bone. There are several ways you can do this, but I like to use Comets Joint Orient script.
And here is the result
In my demonstration I will rotate joint4 90 degrees in the z-axis like this
Then I will add some poseDeformers to stop the cylinder collapsing in on its self at the bend.
Step 1 "Choose Skin Geo"
Start with the joints in their bind pose. It is a good idea to create a poseDeformer target in the neutral pose. I will explain why later. So I set joint4 rotateZ back to zero and load the UI by entering "poseDeformerUI".
I selected the cylinder and clicked the <<< button to the right of "Choose Skin Geo" and the influence joints were loaded, and although nothing obvious happened, a poseDeformer node was created, called poseDeformer1
The UI contains descriptive prompts designed to guide you through the rest of the process and these are maked with numbers 1 through 7 to indicate the usual order they should be used. We will be following that order now.
Step 2 "Pose geo into problem pose..."
Well since I'm creating a neutral pose, I just skip this and leave my skeleton in the bind pose.
Step 3 "Prep for sculpting"
When I click this button, the smooth skin geometry is duplicated, the original is hidden and maya switches to component selection mode so you can sculpt the model. A shader with the color from the "Color" swatch (which you can change) is assigned to this duplicate to make it easier to recognise.
Step 4 "Sculpt your corrected shape"
Since I'm creating a neutral pose, I don't need to sculpt anything. I do need to take step3, but I can jump to step 5.
Step 5 "Choose ONLY the influences that have been moved to create this pose"
Did I mention this is a neutral pose, and we have not moved anything yet? Ok. Bear with me, it will become clear soon. I need to select joint4 as the influence object in step 5.
Step 6 "Set creation options"
There are two parts to this. We need to specify the joint that the poseReader will be parented to. The poseReader is the node that tells the poseDeformer how close the bone is to a particular pose. 99% of the time you will parent the poseReader to the influence joints parent, which in this case is joint3. And then we must enter a name for the pose, which I will call "neutral". So now the UI looks like this
Step 7 "Create/Edit Pose and Reader"
Click this to finish of and create the poseDeformer target and the poseReader node, which looked like this
and here's the heirarchy in the outliner
The green cone that looks like a spotlight is actually the icon for the poseReader. It points down the joints x-axis and represents the cone of influence that the pose will have. The annotation shows the name of the poseReader and its current weight. If you rotate joint4 you will see the weight value change, along with the color of the annotation.
We have reached the halfway point, and I'm sure that if you have never seen this before, then it must look pretty confusing, but its worth the effort and you get used to it after a few goes.
Next I rotated joint4 90 degrees in the z-axis, and repeated the same process as for the neutral pose, except this time I did some sculpting.
So, rotate the joint, and click the button in step 3 "Prep for sculpting". The mesh is duplicated and ready for component level manipulation.
You can model it using almost any of the tools available, even other deformers. Here I just pulled a few vertices out to stop the collapse at the bend.
I then check that the info in step 5 and 6 is still correct, and I enter a meaningful name for the new pose. I've called it "rotate_z90_" to indicate the way the pose was achieved. (It's beyond the scope of this example, but this information - axis and rotation - can be useful if you need to edit the pose later).
Then I clicked the button in step 7 to finish off and create the pose and reader.
The next three pictures show how this looks with joint4 rotated 0, 45 (approx) and 90 degrees.
Notice the annotation colors and the weight values: neutral=1, z90=0, which correspond to how much the joint is within the cone of influence of each poseReader
At the midway point, approx 45 degrees, the weights of both poseReaders are close to zero because the joint is on the edge of the cone of influence for both of them.
At z90 rotation, the annotation color and weights are reversed when compared to the neutral picture.
I kept saying I would explain why I bothered to create the neutral pose deformer target. Well now I'll try. If you have followed along and tried this yourself, then you will have noticed that as you rotate the joint between z=0 and z=90 the shape of the mesh seems to pulse in and out instead of smoothly changing from one pose to the next. The effect of the corrective shape at z90 only kicks in when the joint enters the cone of influence at approximately 45 degrees. The problem is that at 45 degrees the cylinder has already started to collapse in on its self, so as we rotate it collapses a bit and then bulges out again as the corrective shape takes effect.
To smooth things out we can change the angle of this cone of influence. Each poseReader can have the angle set from 0 to 180. At 180 degrees the cone is fully open and the icon looks like a line pointing in the opposite direction to the bone. Here's a snapshot of the channel box showing the default value - highlighted in red.
The poseDeformer attribute called "Avg Pose Sep RBF" - highlighted in blue - works in conjunction with the poseReader Max Angle and these two values feed into the math that drives the effect of the poseDeformer. We do not need to even understand the math to use it. What I usually do is set the Max Angle to 180 on all poseReaders and then rotate the joint back and forth while I adjust the "Avg Pose Sep RBF". Usually I find a value between 50 and 75 gives the smoothest transition from pose to pose. Even though the "Max Angle" is wide open for all readers, the math favours which ever poseReader the joint is closest to the center of. By having a neutral pose as part of the equation we ensure that when we get back to the bind pose the deformer is back to a neutral state also.
Well thats all I've got for this post. I've really only scratched the surface. Typically you would have many poseDeformers on a complex rig. If you want to see an example of this and a more in-depth discussion have a look at Matt Estela's excellent wiki.
You can download the poseDeformer (including source code) from my downloads page.