Author: nickyliu

Pose library

Having a break in the job on hands, I find I need a few more others tools beyond my autorig script to ease my work. Years ago I modified the poseMan script and used it for a while. Actually there are some popular free alternatives with fancy GUI but I like how straight forward it look and use. With time I may rewrite it before messing up the original codes too much.

poseManPlus


Work in Progress

Couple of busy weeks again continuing the rigging of a few characters for a TV commercial. It could be a long page of ideas to share but I’m in a hurry to finish the tasks on hand. Here captured my most recent autorig tool, if someone is interested to see.

chi_autoRigTool_20151018


Wrap and more …

It was a long week.

I watched Digital Tutor – Blend Shape-Based Facial Rigging in Maya by Delano Athias. I would say it’s one of the best of DT Series I would recommend. The result rig included is still buggy but the processes are well explained. I learn a simpler way for follow-align setup, using blendParent by keying constrained channels.

In my autorig tool, I wrote some functions to connect control joints to wrapping surface. This allows the parts wrapped to be keyable too. But maya’s wrap needs extra steps to get the scaling right. These are kindly shared by Mathieson Facer in https://vimeo.com/54270889.

More tasks to be solved and fixed in my list . . .


Weight Painting Tool

I’m trying to do weight painting suggested in the tutorial : Expressive Facial Rigging by Josh Sobel. His workflow involves selection of target vertices, adding weight of 1 to target joint, and applying proper smoothing with unneeded joints locked. Maya’s paint skin weights tool is barely enough so I want more.

  1. Better view of weight assignment.
  2. Quick switching between paint mode and selection mode.
  3. Sliders for quick test on translation / rotation.
  4. Working mirroring even with joints translated / rotated.
  5. Working mirroring even with RHS vertices assigned to LHS joints.
  6. Nice weight relaxation on selected vertices.

The last two weeks I’ve been creating and testing one, with the above (1) to (4) working. The initial idea was from the script sdd_weightTools ( by leifeng ). Feature (5) and (6) are actually nicely done in the script ngSkinTools ( by Viktoras Makauskas ). These two are harder to implement since they may involve python API. Hoping to learn it one day and have these integrated. I already have tons of tools messing around !

weightTool_WIP


Tutorials

Have to catch up after an entire week of sickness on bed . . . Here are some tutorials I studied some time ago which I would recommend.

His joint based method is quite straight forward actually. The result is great if you are both a great modeler and rigger. You need to have beautiful topology and accurate joint placements. You can have some nice sliding effect by rotating the joints. But I’m afraid I will need much more time back and forth painting weight and hitting desired facial shapes.

I bought a copy of Kayla for study without much hesitation. The price is reasonable and she has nice appeal. The setup is quite different from AM Stewart but I haven’t got time to break it yet. His tutorials of facial setup is easy to follow too. It is enjoying to watch and the steps are very precise. Facial rigging seems to be easier than imagine.

I can’t stress more how every principal in traditional animation is exciting to me. It’s always admiring to see great animators like Aaron work.


Picker

picker

This week I come across several popular pickers. I first started with AnimSchool picker and thought that it would work perfectly and save me extra time of searching and testing. Unluckily it is not. I screwed it up twice and had to rework totally before I knew that the namespace shouldn’t be deleted. Similar issue was mentioned in the official forum so I hope there’ll be a update soon.

Hoping for a better one I found and tried some other alternatives: abxPicker, anim picker, and MG picker studio. But after all I stick to AnimSchool one, because

  • the marquee selection, which is not possible with picker written by MEL, is lovely to use
  • color feedback avoids accidental selection of unwanted controls
  • button creation process is much more intuitive among the others
  • well, it’s free

Problem of followAlign

I’m animating my character doing a somewhat like somersault action, with cog control rotating over 360º forward. Also I’m having followAlign ON so that I can adjust the upper body without affecting the arms orientation. Unluckily my character’s arms flip when the body is about to turn over 180º. Stewart of AM has the same problem, though.

Having a look, I see one of the rotation values of the orient-constrained joint jump suddenly, either from 180º to -179º or -180º to 179º. Interestingly it doesn’t jump visually. But sure it will if you are using the value directly in your setup. So my solution is to use the rotation channels of the actual control ( the upper arm FK controls in my case ), not the orient-constrained joint.

My case is not very common actually. It’s great that the fix is simple. Having too many compromises while animating a character could be frustrated and not fun at all. Moreover, this is not something crazy to do to a rig yet.


Soft IK

If you haven’t heard of soft IK before, please read http://www.softimageblog.com/archives/108. Andy Nicholas explains the problem very clearly. Essentially it adds a “soft” distance and slow down the movement causing the pop with a formula. Andy showed this in Softimage but the idea works anywhere.

Below are some lines of expression showing the ideas in maya. They are running node-based in my final rig but making the setup works in expression first is faster for me.

// -----------------------------------------------------------
//     $d : current distance betw ends
//     $D : initial distance betw ends
//     $S : IK softness
//
//     softJ_start & softJ_end
//         a 2-joint chain with it's IK parented under e.g. foot ctrl
//         the main IK is point constrainted to softJ_end
// -----------------------------------------------------------

float $S = ctrl.soft;
float $D_soft = $D - $S;
float $new_d = $d;

if ( $d > $D_soft ) {
    float $x = $d - $D_soft;
    $new_d = $D_soft + $S *( 1-exp(-$x) );
}

softJ_end.ty = $new_d;

Pole vector maths

In my old rig, the lower limbs rotate in single plane only. That simplifies the story. Just put a locator under the FK lower limb, having the same world position as the pvCtrl at initial pose. Snapping to FK means snapping the pvCtrl to this locator because the rotate plane is always correct.

But I want rig like Stewart, where the lower limbs can rotate sideway. This involves simple vector maths.

global proc vector calcPvWPos( string $P1, string $P2, string $P3 ) {
 
     vector $a = `xform -q -ws -t $P1`;
     vector $b = `xform -q -ws -t $P2`;
     vector $c = `xform -q -ws -t $P3`;
 
     vector $AC = $c - $a;
     vector $AB = $b - $a;
 
     // projV = (|b|cos@) ^AC = (a.b/|a|) ^AC
     vector $projV = ( dotProduct($AC,$AB,0) / mag($AC) ) * `unit $AC`;
 
     vector $pvDirV = unit($AB - $projV);
 
     // move it out a bit
     return ( $b + mag($AB) * $pvDirV );
}

Pose mirror/flipping

I have seen a few “intelligent” scripts which are able to mirror/flip controls of arbitrary setup. They are great if you have to use other people’s rig. I’m now making my own rig so I prefer a simpler way.

I add a string attribute named “mirrorCode” to every control to be mirrored/flipped. e.g. “100011”. The order is for tx ty tz rx ry rz and a “1” means negation. My scripts can scan through this attribute and know which axis to negate. Nothing to detect and easy to debug !

global proc float[] getMirrorXform ( string $ctrl, string $code ) {
 
    vector $t = `getAttr ($ctrl + ".t")`;
    vector $r = `getAttr ($ctrl + ".r")`;
    float $tr[] = { $t.x, $t.y, $t.z, $r.x, $r.y, $r.z };
 
    for ($i=1; $i<=6; $i++) {
       if (`substring $code $i $i` == 1) {
          $tr[$i-1] *= -1;
       }
    }
    return $tr;
}