Tuesday, April 24, 2007

AutoRig Step 2 - Placing the Joint Guides

The placement of joint guides is as equally important as creating actual joints itself. This is because the autorig system will depend heavily on the positions of these joint guides to create the actual joints, so any inaccuracy in this step will probably mean a rig that does not work that well, resulting in having to come back again and revisit this step. You might even need to go all the way to the skinning stage before you realise that "Hey, this joint is not that accurately placed".

So here's a look at some of the joint guides placement, and why they are placed in such a way.

Root/Leg Joint:
I usually switch to the Front View first for these joints to determine the frontal position. In this case, it was obvious where the joints should be placed due to the great model. In other cases, I will have to use my own discretion to determine where the root and leg joint pivot lines are. From the side view, they should be centralised in the body.

Ball Joint:

Knee Joint:
In hinge-joint areas, for e.g. knee, elbow, fingers, where joints have only 1 degree of freedom, I usually place the joint just slightly above the exact hinge position. In this case, the knee joint, from the diagram we can see that the joint is placed slightly above the hinge (dotted line). And also, offset them slightly from the mid point of the geometry towards the surface which stretches when the joints are rotated. I find that this gives me better deformations later on.

Spine Joint:
Nothing much. Just to show where the spine joints actually start and end.

Head/Neck Joint:
The head joint is placed at the bottom of the ear, and then moved slightly backwards. The jaw joint is placed at the position where the jaw is deemed to be pivoting at.

Clavicle/Shoulder Joint:
In the front view, the clavicle joint is placed at where the actual clavicle joint pivots.

An extra "shoulder" joint is used here in addition to the usual arm joint. This actually allows you to achieve relatively good default skinning at the deltoid area. When the arm is rotated downwards, the deltoid volume is more or less preserved. More on this during the skinning stage.

The arm joint is placed at where the arm actually pivots at, somewhere between the intersection of the chest and deltoid muscle.

From the side view, they are placed in the mid point of the geometry as well.
One more important note: I usually take great care in NOT directly translating any joints of parts where IK handles will be applied, for e.g. the arm-elbow-wrist area, and the leg-knee-ankle area. As can be seen from the guide, they are first created as a straight line. Subsequently during the joint guide placement stage, only the arm/leg joints are translated. The positions of the elbow, knee, wrist and ankle are all achieved by rotating the joints, and then
translating the joints ONLY in its local forward axis. For e.g. if the joint orientation was xyz (by default), translate it only in the x direction.
This is all to ensure that the 3 joints exist on the same plane, so that IK handles will not give you unnecessary slight rotation offsets when created. More on this during the rigging stage.

Autorig Step 1 - Loading the Joints Guide

Here's a look at the Joints Guide I'm using, and the Autorig tool interface:
I will always create a template for the joints that I need to place in the character, and save it off as a .ma file. So the tool will import in that scene file when I load in the Autorig guide. In this way, if I need any additional joints for placement, I can just go to that source file, add it in, and any subsequent loading of guides will have that in as well.

The names of the joints/clusters in the Guide are named as such:
SIDE_PART_GUIDE. For eg L_arm_GUIDE, L_leg_GUIDE, etc.
So that when I create the joints in the next step, I just need to script them to inherit the namings of the Guide so everything will be systematic and standardized right from the Guide stage.

The neck and spine are created as curves instead of joints so that I pull around the vertices to shape the curves to fit the body, and later on, create the chain of joints along the curves. More on that in the Joints Creation stage.

If anyone's interested, here's a link to the Guide I'm using:
http://www.4shared.com/file/14623944/bbe383f9/bipGuide.html

Next up, Joint Placement.

HyperReal Creature Rigging/Revamp of AutoRig system

Finally started to work on revamping the Autorig system I built about 2 yrs ago...

Planning to walk through the whole process of an autorig system, from creating the joint guides, placing the joints, creating the actual joints, and then automatically creating the rig for it.

Taking the opportunity too to work on the HyperReal beast rig, which I intend to put in my demo reel... Here's THE beast:

Even though it's a biped, the muscular structure are so well-defined, and the edge loops are modelled very well as well. By the way, this was from the HyperReal Creature book from Alias.

This will be good practice in terms of getting realistic deformations, as well as getting enough controls for realistic animation. Planning to research into achieving good deformations with joints alone, and building a muscle rig on top of it to enhance it further.

Friday, April 06, 2007

Mirroring Translation controls by Behaviour

I have been scripting lots of animation tools in my work so far, and one thing never fails to bug me. In my old rigs, I did not consider this right from the beginning, and even in the rigs the rigging department build in my company now, this thing still exist.

That is...

IK controllers, or rather, translational controllers that exist on 2 sides(left and right) of a rig, do not have mirrored behaviours when the same translation values is plugged into both. For e.g. a 5.0 translateX value in the left controller will move it in the positive X direction. The same value in the right controller will also move it in the positive X direction.

This problem is not that critical, but when scripting tools to mirror animation, mirror pose, etc, you always have to consider inverting the value when putting into the opposite controller.

I have always preferred having mirrored behaviour in the rigs, and it is more intuitive to the animators as well to see that the same animation curve is driving the opposite controller in the same way, that is, mirrored behaviour.

So...

To get mirrored behaviours in the translational controllers, I would
- create the left controller as per normal. Having a compensation group node above the translational controller.
- in creating the right controller, I would first create it in the same way as the left controller, apply -1 value in the scaleX attribute of the compensation node, then move the node to position it at where the right controller should be.

And now, the same translate values will create a mirrored behaviour on the opposite side of the rig.

This is definitely what I would want to see in my rigs from now on, but I'm not sure if I'm thinking along the right path to create rigs in such a way, so would be seeking more opinions on this...