Tag: maya

Soft IK and more

Packing up some maya stuff I done in the past few months and learning 3dsMax for the coming new job.

The soft IK feature is one of many rig features I wanna to implement many years ago. It’s like all other features, not super hard and you could get it once you’re willing to dedicate to figure out what the hell the logic is. I wonder that my method may not be the best and there must be some simpler one . . . https://vimeo.com/168185968

Recently I would recommend the 8 classes of Cartoony Facial Setup by Puppeteer Lounge. They show the use of wire deformer effectively which works well for general cartoony face. For very stylized or detailed cartoony face I might stick with the general joint based method.

And I found an informative post about some recent rigging techniques !
http://www.olivier-ladeuix.com/blog/2016/01/03/so-you-want-to-be-a-rigger-huh-version02/


Maya camera shake

Recently i discover the shake attribute under the camera shape node https://www.youtube.com/watch?v=6AS1PJlcHAE.

In the old days cheating in AE was enough. But it comes up right in time since my aerial shots on hands need plenty of shaking. An easy shaking control in 3d might be better. I use them with expression and custom attributes for keyable magnitude and frequency. To send the shake to 3ds Max my first idea was to bring the shake back to 3d. The shakeHorizontal and shakeVertical values are transferred to tx, ty of an extra locator on top the camera.

The result look fine in general, but not when object goes very far or close. The shake is constant in 2d but not with perspective. Thus I’m thinking about the other method, putting the shake into AE.

I did a quick test and it seems to work. Copy the baked shakeHorizontal and shakeVertical keys of original camera to tx ty of a dummy camera. It should be a locator actually but AE recognizes keys on camera only. Export the dummy camera as .ma and import into AE. Create a null object / solid layer, use expression to get the keys and scale it up about 100 times. Parent any comp to this layer to get the shake.

Not 100% sure but i will tell if it really works.


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


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


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;

Space switching + fk/ik snapping

Finally, space switching and fk/ik snapping work using scriptJob. Mel procedures are stored in scriptNode and called by scriptJob once the file is loaded. This is the method I learned by breaking Stewart of Animation Mentor.

The trickest part is “keyable” space switching. Since I’m using scriptJob’s “attributeChange” event, if the “space” attribute is directly keyed, scrubbing the timeline will change the value and unexpectedly invoke the proc.

My solution is to move the keys to another attribute.

  1. Create the space switching attribute, “space”, as non-keyable and hidden.
  2. Create another attribute, “spaceNow”, which is keyable, driving original “space” ( as a space indicator and not to be changed directly by user ).
  3. Create one more attribute, “spaceSwitch”, which is non-keyable, used to change space non-pop, and used by attributeChange event.

Having attributes in single control I could key the transform and space at once. This avoids missing selection or keys if I want to adjust timing later.

By the way, you still need to use the copy and paste worldspace fix if the position of control changes before or after the switching frame.


Rotate Order

Arrrr . . . it’s been a while doing bunch of various stuff. Finally I got sth to share while scripting my autorig system.

Usually I don’t care about gimbal lock since I discovered the “euler filter” button in graph editor. And I always thought that better rotate order means cleaner animation curves only. Recently I found another case showing the importance of proper rotate order.

Imagine a standard 3-joint IK arm (say, left arm) with simple pole vector setup. When the character moves his arm ( ikHandle ) forward and about to the right, the upper arm joint’s rotation would pop from (0, -89.x, 0) to crazy values like (180, -89.x, -180). It took me a while to think about it . . .

A better rotate order seems to help.

Here is the best gimbal lock explanation I’ve seen https://www.youtube.com/watch?v=zc8b2Jo7mno.



Fatal error: Out of memory (allocated 127926272) (tried to allocate 36 bytes) in /home/nickyliu/www/www/wp-content/plugins/wp-statistics/vendor/browscap/browscap-php/src/phpbrowscap/Browscap.php on line 876