Pose Deformer Tutorial
Thought I'd post some screenshots as people without smartskin/psd experience don't seem to get how simple and elegant this plugin is. The model is from a zbrush forum post
by Zack Petroc, I hope its ok to use...
I'm in the process of moving the pictures from the old page to here, shouldn't take too long.
Ok, here's a shoulder in its bind pose, quickly soft skinned to a skeleton.
And here it is rotated up 40 degrees. Pretty bland. Lets fix the skin at this particular shoulder rotation.
Run 'poseDeformerUI', and you get this window.
Select the skin, and click the top-right button to create a poseDeformer node. Click 'prep for sculpting', and you get the 'before' image below. It makes a copy of your skin without history, and hides the original. Now that this is a regular shape, you can use whatever you want to fix it. Point pulling, clusters, lattices, average verticies... all good. I went fancy and exported the shape into zbrush, sculpted, re-imported, and pushed those changes onto the shape via a blendshape.
Open poseDeformerUI again. In the large middle menu, tell it what joints/influences you moved (the left shoulder) and in the textbox below that, tell it where to parent the poseReader (I'm sticking it on the left clavicle, more on that later.) Finally, tell it what to name this pose (I called it L_shoulderUp40), and hit 'create/edit pose'.
After a bit of calculation, you get this:
Here's a better angle:
poseReaders (those cone thingys) by default assume the joint orients have Y running down the bone. My joints have X down the bone, so we'll change that via the 'read axis' parameter in the channel box.
So what does that cone thingy mean then? Think of it as a spotlight shining at the elbow. When the elbow is outside the cone, it gets no 'light', and the pose isn't active. But when the elbow falls just within the cone, the elbow gets a tiny bit of 'light', and the pose starts to blend in. When the elbow is in the center of the 'light', ie, pointing down the center of the cone, it gets the maximum light possible, and hence the pose is at its strongest. I turned 'draw cone' and 'draw text' both on, so you can see the values as I rotate the shoulder.
The text tells you the name of the poseReader and its weighting (in a range of 0 to 1). Here's a few shots of the shoulder being rotated from 0 degrees to 40 degrees. Notice the text colour animates, being blue when the weight is 0, and yellow at 1.
Again similar to a spotlight with cone angle and penumbra angle, poseReaders have a max and min angle. Here I've increased the max angle, so this pose will start to kick in over a wider range of rotation. Try doing that with an expression driven blendshape. Its possible of course, but not as elegantly nor with as much instant visual feedback as this.
Here I've rotated the shoulder down 70 degrees, opened the poseDeformer window, clicked 'prep for sculpting', and sculpted some fixes. Some point pulling, some use of 'average verticies', good enough for now.
poseDeformer window again, shoulderJoint is the modified joint, clavicle is the parent, named the pose 'L_shoulderDn70', hit create.
And here's the result. I've fixed the read axis as before, and increased the max-angle to 65 degrees. To pull out the spotlight analogy one last time, poseDeformer helpfully rotates the 'light' when first created to shine strongest in the direction you expect, ie, towards this particular rotation of the shoulder. Therefore, the pose will shine strongest at this rotation. Ok, no more spotlight talk now.
And here's the arm going from 40 degrees up to 70 degrees down. The weights smoothly blend in and out as the shoulder joint passes through each cone of light. I mean pose. Damn.
Here's the shoulder with 5 poses defined, which are
* bind pose with no changes (comet reccommends you do this)
* shoulder up
* shoulder down
* shoulder forward
* roughly 45 degrees up and forward
That last one is the kicker. To do that using blendshapes would involve a complex expression to first somehow convert that 2 axis rotation into a single value to drive a blendshape, and secondly somehow avoid the 'shoulder up' and 'shoulder forward' blendshapes being active, which would create nasty additive effects.
With poseDeformer, you happily ignore all of that. Just rotate the shoulder to any angle that looks bad, fix it, and you're done.
And unlike blendshapes, poses are more likely to work across a wider range of motion, a handy thing!
Tips and tricks
Get your joint orients right.
Most people are using jason schliefer's joint orient technique nowadays, however I've seen a few rigging tools that miss an important step in schliefer's setup when mirroring joints. His policy is to mirror joints after
fixing orients, not before. PoseDeformer assumes you've done it the right way, and relies on this for its 'mirror poses' tool. If you haven't, the mirrored poses are all wrong, and there's no way to fix this at present. The source code for the mirror poses script is available though (yay open source and mel), but given the choice between fixing the script or getting the joints right, I'll get my joints right.
Incendentally, this is important for being able to mirror skeletal poses too, as these images show:
Slowdown after mirror poses.
Found in certain cases after you mirror poses it'll slow to a crawl. Bit of investigating, found it was a mirrorData node being left behind. Delete this node, and everything goes back to normal.
Creating poses takes a while.
Yes it does. From my limited understanding of how poseDeformer works, its a bit more complex than a blendshape. Don't worry, the actual playback once created is very quick, and if all else fails, you can disable the poseDeformer node until you need it for rendering.
Also, Michael just emailed to say if you know in advance that you're editing a small subset of points, eg around the elbow, you can save on calculation time by creating your new poseDeformer, select those points, and click the 'edit-mem' button. poseDeformer will then only look at those points when creating poses. When you've finshed all your poses, clicking 'auto-prune membership' will remove any unneeded points from the membership sets, getting you a further speed boost.
The poseReader direction isn't locked.
I mentioned before that when a poseReader is created, it rotates the cone to where you expect the pose to be strongest, ie, pointing parallel to the joint you rotated. But that direction isn't locked! In fact, if you play with the demo scenes, you probably found you can grab the poseReader cones and rotate them any way you want. In effect you're re-aiming at what rotation that pose will now be strongest, Here, I've grabbed the shoulder-up poseReader, rotated it so it points straight up, and widened its max and min angles. Now, the pose kicks in earlier, and stays at 1 across a much wider 'sweet spot' across its center.
As a consequence, its wise to name your poseReaders with some reference to where the joint was at on creation, hence my naming scheme of 'LshoulderUp40'. That way you can re-aim them back to their defaults quickly if things get out of hand, also handy if you decide to edit a pose further. You may also want to lock the poseReader rotate channels to avoid knocking it by accident (hide it for good measure).
'But why would you want to re-aim a pose anyway?' You might ask. Because it stores your sculpting changes as offsets rather than blendshapes, poses can sometimes be used across a much wider range of motion than you think. I'm still trying to grasp the difference myself, but basically a blendshape for joint correction is limited in both the range it can work across, and how well it blends with other shapes, whereas poses don't suffer this.
What that means is you can easily experiment with the best aim-direction for a pose, and how wide it can work for. Just grab its poseReader cone, rotate it around, play with the max/min angles, see the results immediately.
Create the poseReader on the parent of the joint you're working with.
There'll be exceptions to this, but as a rule, sculpt for a given joint rotation, then put the poseReader on its parent. Remember, the cone has to essentially remain static, while the bone animates through it.
poseDeformer assumes for y-axis down the bone.
Michael builds his joints this way, so thats what poseReader assumes. it's all of 2 seconds to change the axis from the channel box. Deal with it. Just remember to do it when each reader is created, otherwise you'll sit there for 5 minutes wondering 'why isn't this pose working??'.
Create seperate poseDeformer nodes for each joint you fix.
So again with the arm example, create a poseDeformer for the shoulder, and create as many poses as you need for that. Once you move to the elbow, create a new poseDeformer, create the poses for that. When you do the wrist twist, new poseDeformer again, etc. Otherwise it'll have a hard time trying to blend poses that aren't really related (shoulder rotation doesn't have much to do with the wrist for example), and you'll get poses cancelling each other out when you don't want it to.
Mirror poses is slightly fiddly.
Its fine once you get a handle on it, but this might save you a few hours fumbling around. So your left shoulder is all posed up with poseDeformer1, and you want to copy the poses to the right shoulder:
* Open the poseDeformer window, select your skin in the first field.
* In the second field, right click and choose 'create new poseDeformer', which will create poseDeformer2.
* Right click again and select poseDeformer1
* Click the 'mirror' button
* Right click in the 'deformer to' field, choose poseDeformer2
* Set the correct mirror axis
* Enter the correct search and replace fields, eg, replace L_ with R_, or Left with Right, or whatever left/right prefix/suffix you use.
* Hit mirror, wait while it does its thang
* When done, delete the mirrorData node if its been left behind
Get your smooth skin reasonable before using poseDeformer.
While poseDeformer is great, it can't be expected to fix everything. It works much more reliably if you have sane soft-skin weights to begin with. You don't want to be counter-animating your poses against crappy skinning, its a waste of time. I've found doing almost a rigid bind style skin, with big solid blocks of weight per joint, and minimal, if any softening between regions is a great base to start poseDeformer on. Again, probably my Animation Master roots showing through, which when I used it was all rigid-skinning.
poseDeformer for other things...
Its the non-additive behavior that gets me intruiged. The original paper mentions using psd for facial setups, as a way to avoid blendshape additive effects. Weta setup a rig for gollums face whereby the facial team would sculpt blendshapeA, blendshapeB, turn them both on to 100% and if the result wasn't right or intuitive, sculpt blendshapeAB. Behind the scenes was a complex combination of utility nodes to swap in blendshapeAB whenever blendshapeA and blendshapeB reached 100%, but I have a hunch you could acheive the same effect much more simply using psd.
Then there's maybe using poseReaders to drive displacement maps, like tarons recent zbrush/messiah demo
. And poseReaders can read translation too, which opens a whole other level of possibilities...
A few words from Michael Comet
No more spotlight analogies kids, this is the real thing
With the "RBF-LUFactorize" mode (the default on the deformer), you
CAN actually set all the pose Readers to 180 degrees. In fact this may
actually smooth out the blending. Then the actual RBF-Separation value
specifies how much the main deformation blends with the others. This is one
reason I first recommend making a "default" pose, with actually no sculpt
* prep model
* Make default target, no changes to target
* Name it default
* Set reader to 0-180 range
Make next pose, with real tgt changes, etc..., also set to 180 max angle etc....
Typically you will want the RBF-Sep value to be the smallest value possible.
If you drop it to 0 and raise it up slowly to just where things move a
little bit. The value represents the angle between the current "joint" and
all the other poses. In some sense it's a "cone for the joint". So
wherever the joint is, anything in that "range" or "separation" gets in
included. So if you set say 30 degrees, any pose within 30 degrees of the
current joint will get blended in...and it blends it smartly with the pose
mostly closely there weighted most of the way, and the others less. This
lets you set all the poses to 180.
On top of that...it DOES work with the pose Reader cones set to smaller
values as you have been doing as well. This will happen first then the
other, so if you do set it to 45 and it's outside the range of the joint
then it is clipped. This is useful for fine tuning poses where you need to
get more direct control over the interpolation. But usually setting them to
180 will work fine as well.
You can think of the RBF thing almost like a Gaussian blur in Photoshop.
The angle closest will make the deformer mostly get that pose, but then the
RBF-Separation is the blur amount or # of pixels or in this case degrees
around that other values will also get blended in. If it's too big it will
be like an average, too small you'll get harsh popping from pose to pose,
just right and everything will blend smooth without have to set max angle on
the readers less than 180.
Also speaking of tweaking the poseReader defaults to a "smooth"
interpolation...but note too if you REALLY wanted to get crazy...you can
switch to the anim curve mode, bring it up in the graph editor and tweak the
falloff curve as well.
- 30 Apr 2007