More on IK & States
*** Here's a little more info on working with states, hierarchies, and inverse
kinematics that I pulled together from some of my HUMANOID notes. Sorry its not
better organized. ***
MAKING A NEW STATE
To add a new pose to your list of states for the figure select the
MANSTRONG object in PICK GROUP mode, in the STATES menu select CREATE, and
enter a new name, and check GROUPING, and if you've also set a new shape for
the HEAD or HANDS, check also SHAPE. You must apply the new shapes for the head
and hands to a new state for the MANSTRONG object, because states for child
objects can not be accessed in the Action editor, only the states for the main
parent can be used for keyframing.
ALWAYS ROTATE LIMBS IN LOCAL MODE
ALWAYS ROTATE LIMBS IN PICK GROUP MODE, except when using Inverse Kinematics.
GET USED TO THE FIND REQUESTOR, MEMORIZE THE KEYBOARD COMMANDS (Right-Alt f) OR
MAKE A GADGET FOR IT.
RECAPPING THE STEPS IN DESIGNING MOTION WITH STATES
The basic steps in designing motion with a states object are as
follows. Load the figure into the Detail editor, in Pick Group mode use Local
Rotation (and/or the IK instructions) to pose the limbs the way you want.
Create a new state for each key pose, using GROUPING for simply hierarchical
poses, and SHAPE when combining a new HEAD or HAND morph state with a pose.
SAVE the Figure (with a new name). Then set the keyframes for the figure in the
Action editor, by ADDING new bars to an ACTOR channel, and calling up the
various poses with the STATES BROWSE menu in the ACTOR requestor.
INTRO TO INVERSE KINEMATICS
By now you should be familiar with the concept of hierarchical
animation. The basic idea is that when you move a parent object, the child
objects linked to it also move with it. Simple enough. This method of animating
a figure also goes by another name: FORWARD KINEMATICS. In Forward Kinematics,
as already stated, motion or transformations are carried DOWN a hierarchy from
the Parent to the Child objects.
With INVERSE KINEMATICS, the effect of moving an object is carried back
UP the hierarchy, from the child to the parents. With inverse kinematics you
can select extremities like a hand or foot, and pose the entire arm or leg, in
one step. INVERSE KINEMATICS requires more preparation though because in order
for it to work right, Constraints have to be applied so they mimic the behavior
of a real body. For example you can only bend your knee in one direction
relative to the thigh, around its local X-axis. Now before you go
thinking that IK is the answer to all your prayers, be warned. Although posing
limbs with IK is a bit more intuitive, it will not instantly make you into a
Disney animator. It simply gives you one more nice new tool for manipulating
and posing a figure.
USING INVERSE KINEMATICS
Setting up the CONSTRAINTS for Humanoid is easy to do with the FIND
REQUESTOR. Notice that many of the objects in the hierarchy have axes listed in
parentheses after their name. These are the axes that should remain "free" for
rotation when using IK (or regular hierarchical movement, for that matter).
Pick each object by name, and check each of the JOINT LOCKS, except the one
shown next to the object's name.
The JOINT LOCKS constrain the movement of each object in relation to
its parent in the hierarchy so it mimics the biomechanics of the human body.
IOW, this sets up the relative motion constraints.
In the case of the FOOT, the greatest mobility should be in the X
direction. It can also move slightly in Y, but when setting up JOINT LOCKS you
might want to leave only X free, to keep the ankle from twisting dramatically.
You will also need to LOCK a few of the objects with ABSOLUTE
constraints. IOW, so they are immobile in relation to the WORLD, rather than
parent objects. For example if you if you want to move the right leg but want
the left foot to stay planted then you would LOCK TRANSLATION on the TOE-L
(only) for X, Y, Z, either in WORLD or LOCAL mode to keep that foot stationary.
If you did not want the upper body tip over while moving the leg, then you
might also want to LOCK the ROTATION of the BODYPARENT in Y and Z. This will
allow the upper body to move freely, while preventing it from tipping over.
Then you would select the TOE-R and in PICK OBJECT mode, with
CONSTRAINTS checked, pull it to a new position using the MOVE command. You can
use ROTATE also, but the principal object you have chosen will simply twist in
place. This is good when you want to make a figure look left, right up, down
etc., or twist the upper body like doing an exercise, or crunches.
BEWARE
When you use IK, remember that movement of the object's main parent
axis does not get saved with the state. If you want the overall movement of the
body to become part of the state, reset the main parent to 0,0,0 after posing
the figure with IK.
When you're done manipulating objects with IK, don't forget to turn
CONSTRAINTS off, otherwise you will not be able to MOVE objects around as usual
in PICK OBJECT mode. It's probably a good idea to make a GADGET for CONSTRAINTS
with the PREFERENCES so you can see whether its on or off all the time. This is
a good example of a modal command. In general I recommend making gadgets for
all modal commands (especially the PICK modes).
ADVANTAGES TO THE NEW STATES SYSTEM
You do not have to go into the Cycle editor at all anymore. All of your
animation can be created in just the Detail and Action editors. And Animation
previews can be quickly generated in the Stage editor to test the results.
The objects that make up the figure can now be pivoted around the
origin of their own axis (instead of around the end of their z-axis, as the
Cycle format required.)
The HEAD HANDS, TORSOS, (and all other parts of the figure) can now
utilize BRUSH TACKING, because they are now animated using States.
The figures automatically take full advantage of the new splined
movement interpolation in Imagine 3.0, making all the movements of the figure
smoother and much more realistic. In 2.0, the Cycle editor used a simple linear
interpolation method of keyframing which made motion look much more stiff and
contrived.
NON_LINEAR KEYFRAMING
One of the complaints that I used to get with earlier version of
HUMANOID is that you could not easily change a figure from standing into
walking or other poses. Well a big part of this problem is solved by STATES,
because you can call up any pose at any point in an animation. Now you can
start a figure standing and key frame that into walking poses.
WHY STATES?
I have long been dissatisfied with the CYCLE EDITOR for doing
hierarchical animation. I found it very cumbersome because you have to go back
an forth between three different editors, again and again to design even the
most rudimentary motion. The feedback I've gotten from users is also that it's
much too difficult to use. And it required you to do things in 3 or 4 different
editors before you could see the final results. I was in fact one of the
principal advocates for getting rid of the Cycle editor altogether.
Despite it's flaws the Cycle editor was the only effective way to do
hierarchical motion until VERSION 3 was released. I had hoped that Impulse
would find and easier more unified way of animating hierarchies where you could
access the child objects in the Stage. But this did not happen in either 3.0 or
3.2.
Imagine is one of the most confusing programs to use for hierarchical
animation. There are now 3 different approaches, CYCLES, STATES and ASSOCIATION
in the Stage. Since they are all designed to work separately from one another,
I vasilated for months trying to decide which would be most easy to use.
I knew that I did not want to use CYCLES anymore because it was so
cumbersome. Initially I was drawn to the idea of using ASSOCIATION, because it
would allow you to access all the individual parts of the figure directly in
the Stage Editor, and allow you to morph the hands and head independently of
the body movement. However, I found that keyframing ASSOCIATED movement of the
figure in the Stage is very complicated. To simply pose an arm or a leg
requires too many convoluted steps. The other problem with this method is that
I would have to provide STAGING files with the body parts so users could easily
load them up with all the hierarchical links set up. Since there is currently
no way in Imagine to MERGE one STAGING file into another, I could see no easy
way of loading the Humanoid figures into other scenes (without ISL). Whenever
you wanted to load a figure into another scene you'd have to load all the
individual parts into the Stage, and link them back together yourself, using
ASSOCIATION.
So I opted for the STATES method, because for now it seems to be the
lesser of three evils, and it is the only method that supports INVERSE
KINEMATICS, what Impulse calls CONSTRAINTS. However, it is a simple matter to
convert the new States version of Humanoid for use with ASSOCIATION as well.
you may find this alternate approach useful if you are doing animation that
involves complex sequences of morphs for the HEAD and HANDS.
-Tim