Start with a new Blender file.
Add a new AvaStar character.
Go up in the top menu and select the Animation screen layout, which is Optional. You can use any layout you like. I think you will need to have the Action Editor open to see how things are or aren’t working.
Select the AvaStar animation handles. See image to right.
Enter Pose mode.
Open the 3D Properties panel (N-key in 3D window) and enable the IK Controls in Rig Properties (C – below).
Now we build the Keying Set or sets. This is not anything you would figure out or even know about without some help.
Open the Scene properties.
Look in Keying Sets. Click the plus to create a new set.
Double click the set created and name it something meaningful.
Originally I thought I would put all the bones in one keying set. After all there is a control for recording only needed changes. But, that has to do with putting information in the F-Curves panel. It seems this still records a key frame value for every item in the Key Set. So, putting all the bones and controls in one set is going to make for large files.
I decided to make four keying sets; Leg Left and Right, and Arm Left and Right.
Now we need to add bones and controls to the keying set. You couldn’t guess in a million years how to do that. Select the IK handle for the foot and then in the 3D Window’s Properties panel at the top in Transforms right-click any of the Location values and select Add All to Keying Set. See image captioned Adding Keying Sets. Repeat for Rotation.
This is like so unintuitive… It is no wonder only about 3 people on the planet know about Keying Sets.
Anyway, select the knee IK control and again right-click the Location and Rotation values and select Add All…
Now work your way up the leg selecting FK controls. I tried only adding Rotations to the keying set and omitting the Location values on FK controls. I did that because Location was grayed out. But, that was a bad idea. I got really strange results. So, ignore the graying. Add All will add the location and rotation value slots whether bright or gray.
Add the FK controls for AnkleRight, KneeRight, and HipRight for the leg. (Avastar names) Add the FK controls for WristRight, ElbowRight, and ShoulderRight for the arms.
Repeat this for each leg and each arm. I made four Keying Sets. So, far it seems to work well.
Exporting Keying Sets
That completes the construction of the keying sets. These can be exported, set by set, and used in other Blender files with the Avastar avatar. To import the exported data open the Python file with Blender’s text editor and select Text->Run Script from the menu or press Alt-P.
You must have the Avastar avatar (or the rig you made the keying sets from) in the file before you try to create the keying sets from the Python scripts. Otherwise you get empty keying sets.
Using the Keying Set
With the Keying Sets we can animate using FK and IK interchangeably. Using the IK controls with Automatic Keyframe insertion for Keying Sets on, the IK and FK control keyframes are automatically created. This is the time saving step I was looking for.
In the image of the Timeline panel you probably know about the red button (A). It turns on/off Automatic Keyframe Insertion. The double keys icon (B) turns on/off Automatic Keyfemae Insertion in the selected Keying Set. The next control is a drop down (C) used to select built-in or your custom keying sets. The single key icon (D) is used to manually insert keyframes. The crossed out key (E) deletes a keyframe. The frame cursor selects which frame is deleted or where a frame is inserted.
ONLY the selected Keying Set gets keyframe values. Any other posed bone is skipped. This can cause errors like no suitable set to insert to.
At any time we can now turn off the IK controls and use the FK controls for animating without losing out pose. When we do switch we need to remember to snap the IK controls (Align IK to Pose) to our current pose for the frame and add them to the keyframe (press ‘I’ or click the single key icon). Doing so allows us to switch back to IK animating at the next frame or later. I still have to manually keep everything in sync, but it is easier than without keying sets.
There is a bit of glitch from time to time. The avatar will often appear in the wrong position after enabling or disabling IK. This is a display error only, it fails to automatically update the display. Advance or regress the animation one frame. This will cause the Blender display to update and show the correct avatar position.
When the animation is ready to export it should make no difference whether IK controls are enabled or disabled. I disabled them in my testing and then exported. If the animation plays correctly in Blender from beginning to end with IK on or off, depending on what you prefer, you have it right and can export it.
Keying Set Error
To animate parts of the avatar not in the keying sets select one of the built in sets. If you press ‘I’ and an incorrect keying set (one that cannot accept the info you are trying to frame) is selected, you may get an error about not being able to insert keyframes. This means you need to select a different keying set. I usually use the LocRot set. You’ll notice the ‘I’ key now works differently.
AvaStar IK Controls
The help page explaining AvaStar’s IK controls is here.
It takes some setup and learning, but I think being able to switch between FK and IK animating methods is worth it.
I am not at all sure I have it right or have found the best way, but I am ahead of where I was.
Keying sets have always been a part of Blender since version 2.4. It wasn’t until the end of 2010 that Keying sets were redone and appeared in Blender 2.5 in a usable form. The story is told in a blog post on Aligorith’s Lair in: [Animating in 2.5] Getting to grips with Keying Sets.
The article explains in some detail each of the controls in the keying sets feature. I’ve pointed out one way to add items to a keying set. But, there are other ways (none of which are intuitive) which can make things way easier when working with complex models.
Blender provides ‘onion skinning’ but, they call it ghosting. This is a rather lengthy tutorial. But, it covers the details of using ghosting.
The video below uses Blender 2.71. I find it a handy thing when I run into problems.[youtube 2t1jzdoYV5A]