Thursday, 11 March 2010

Post Ten

The Spine

For the legs I used shapes with custom attributes and reactions, this was appropriate as I wanted them to move through specific poses as they roll up for the walk, the spine however is less predictable, I need to be able to rotate the spine in any direction, and move the hands around as needed. It just wouldn’t make any sense to set up reactions for every possible arm or spine motion Instead I plan to use a control object and wire one value to another so the two parameters influence each other through the transform animation.

I’m going to use a gyro handle made from three circle splines and a line spline. You could use any object but this control object looks like it should be rotated. First thing to do is align the control object (gyro) to the lowest spine bone.
Now I need to link the bone spine to the control object. Now if I was to move the control object the spine should move or rotate too.
When I rotate my own spine I notice that the top sections of my spine move faster then the bottom sections of my spine. I would like to capture this same ‘double rotation’ for my rig, to set this up I will wire the rotation of the second lowest spine section to the control shape, so then when I rotate the control object the bone will receive the rotation twice, once from the wiring and once as the child of the bottom spine.

I select my control object, Right click the control object to get the quad menu and select wire parameters. This opens a popup menu and I can continue to select Transform > rotation > x rotation. Now I click on the second from bottom spine section and select Transform> rotation > x rotation from the pop up menu that appears.
Now a new parameter dialogue box appears and I select the rotation listing on each side and click the right arrow and the connect button to activate.
Everything should have worked but when I test the spine bone turns in the wrong direction taking the whole spine with it, and if I was to rotate the control object the spine rotates in all kinds of wrong directions something is definitely wrong here.

What is the Cause? Maybe the control object and or the spine have already been rotated? The wiring is adding up all the shapes rotations on whatever axis. This affects the bones local axis with the rotation. The problem did not occur with linking because I tested the link and that worked. The problem lies with the wiring.

To solve this problem of mismatched wiring I need the control objects local axis to match the bones and then any rotation will work. Although aligning pivot points will help it does not solve the problem. I need the spine bone to be affected in relation to its current orientation not its original orientation, same goes for the control object.

I need to freeze the rotation in its current state, and start animation from there. Alt + Right click to display the animation quad menu then choose freeze rotation. This splits the rotation track into two separate tracks named ‘initial pose’ and ‘keyframe XYZ’. The initial pose track holds any rotations I have performed up to now to pose the objects, and the keyframe XYZ will hold any transforms I do from now on.

If I align the pivot points, freeze the rotations then wire together the keyframe tracks the double rotation will work. Before I show how I did this I would like to talk about controllers, A controller is a method for specifying an objects transforms. (position, rotation and scale) The default controllers allow me to move, rotate and scale objects with the buttons on the main toolbar. Other controllers might control an objects position by putting it on a path and some controllers control an objects rotation by making it look at another object. To change controllers you must go to the motion panel and expand the ‘assign contoller’ panel then you can highlight a controller and select the ‘?’ button to choose another controller. The freeze rotation option splits the original rotation controller into two controllers. To save time in changing the default rotation controller to a list controller I will use the freeze rotation option to set up the double rotation through wiring.

So:

Select the control object, go to the hierarchy panel and click affect pivot only, click the align tool and then click on the spine bone. In the align dialoge box, turn off any positional align options and turn on the XYZ Align orientation options also make sure that pivot point is selected for both the current object and the target object and click ok then turn off Affect pivot only.
The next step is to make sure the control object is still selected Alt + Rightclick to get the animation quad menu and select ‘freeze rotation’ Then select the bone spines and freeze rotations on them too. Now right click the control object and choose wire parameters, the carry on selecting transform > rotation > keyframe XYZ > x rotation. Now click the spine bone and select transform > rotation > keyframe XYZ > x rotation. Now the dialogue box will appear and we select both the keyframe XYZ on either sides, click the right arrow and then ok.
Now we test and check that the spine works all ok. Now to repeat the process for the othe control objects that will control the other parts of the spine neck etc.
This conclude the rather confusing spine section, now on to the fun section the arms, wrist and fingers.

No comments:

Post a Comment