My first Animation

My first Animation

This document is about how to create your first Animation using Avastar. For the begin we will create a three frame animation. This is just to get you started. As your experience grows you will learn much faster ways to pose and animate your character.

I assume you have already installed Avastar. And i assume you have some experience with Blender.

For the technician:Avastar supports .bvh and .anim format. Both formats are fully supported by Secondlife and compatible target worlds.

Preparations

How to add a new Avastar Character - Read more...

Adding a new Avastar

You can add a new Avastar Character only when Blender is in Object mode. You navigate to the Add -> Avastar menu and select from one of the rig types:

After a short time (typically 2-4 secs) a new Avastar character is created in the 3D View and at the center of the 3D View .

Now we switch to Blender’s default Animation screen. You do this from the Top menu Bar.Note:Of course you can switch to whichever screen you prefer instead. But note that you will want access to the Timeline, the 3D View, the Dope Sheet and the Properties Editor.

Details about the Animation environment

Here is an overview of Blender’s default animation screen:

In the Dope Sheet switch the Mode from Dope Sheet to Action Editor with the pop up menu in the header.

Hint: If the Mode Pop up menu does not display, then move the mouse over the menu bar of the Dope Sheetwindow, then press middle mouse button and while keeping the MMB pressed, drag to the left side.

In the Action Editor mode you can create new Actions. You find the corresponding pop-up menu in the Dope sheet menu bar:

Press the white plus sign to get a new action and name it “FirstAnimation”.

Remind:If you do not find the Actions menu on your screen, then MMB -> drag to the left (as described above)Hint: you can edit the action name right inside the pop-up menu.

Adjust the timeline

On the Timeline click on the first frame of your animation, for this animation set it to zero. You can do that either by dragging the green progress indicator until the position indicator displays “0”, or by immediately typing “0” into the position indicator as marked on the image below.

Hint:Use the scroll wheel on your mouse to zoom the timeline in and out and the middle mouse button (or hold down Alt) to pan.

Create the Start frame

I assume that you are still in Object mode now. In the 3D View make sure that you selected the armature by right-click on one of the rings surrounding the avatar. The rings should now appear in bright orange.

Then switch to Pose Mode. Now all Skeleton handles appear in a green color. You can select any of these handles and move them and rotate them as you like.

However while playing with the Pose you will note that we have placed a few constraints to the various parts of the skeleton. We did this mainly to keep you from ripping the character into pieces by dragging the bones to unrealistic positions.

Note on Rotation

The easiest way to rotate the bones is to use the rotation manipulator controls. For your first steps you may want to select the curve segment in the 3D Manipulator widget so Blender will show the rotation manipulators when you select a bone:

You may want to use the Rotation mode “Normal”. I found this the most convenient mode when working with the mouse.

As you get more experienced with Blender you will use keyboard shortcuts more and more. Maybe you will even skip the 3D Manipulator after a while when you realize how efficient the usage of shortcuts actually is.

More Animation details

More about Rig Display Properties

You have full control over which parts of the Rig get displayed at a given time. You find the Rig Display control panel in the Object Data section of the Properties panel. Below you find a comprehensive documentation.

More about the Rig Display

The Rig Display panel gives you full control over which parts of the Rig can be seen at a given time. By default only the Control bones are visible. But sometimes it is desirable to hide or unhide parts of the Rig.

Furthermore the control bones (green) use custom shapes by default. That is, they are formed as rings which are placed around the Avastar body. The benefit of the custom shapes is that they can be selected easier. But sometimes it is desired to switch from Custom shapes back to Blender’s default shapes (Sticks or Octahedrons).

Panel Overview

The Rig panel basically contains a collection of properties which also are available at other regions in Blender. But having them all in one place is a time saver. The panel is provided It has 4 major sections:

Bone Display style.

Bone Visibility.

Animation Bone Groups

Deform Bone Groups

Active Deform Bones

Special Bone Groups

Bone Display Style

The first row of buttons changes the bone shape. You can select between the Octahedron Style and the Stick Style.

Note: In the Armature Data Panel (Properties Window) you have 3 more options for setting the Rig display style

In the Second Row of the section we find 4 properties:

X-ray: To display bones even when they are occluded (hidden) by the mesh.

Shapes: To enable the usage of Custom shapes.

Limits: To display the bone movement ranges.

Edges: Show edges in object mode (only if active Object is a Mesh)

Bone Visibility

In the Bone Visibility panel you can hide/unhide various bone sets. The panel is subdivided into 4 major groups as follows…

Animation Bone Groups

Torso, Arms, Legs, Origin: These buttons control which of the Control Bones (green) are visible

IK Arms, IK Legs, IK Limbs: These buttons control which of the IK Bones (yellow) are visible

Eye Focus, Alt Eye Focus: A special bone used as Focus point for the eyes. The Alt Eye Focus is for the Bento Face (Alt Eye Bones)

More about the Spine

The Spine is made of 4 Bones which are by default folded in such a way that they do not disturb the behavior of the System Character

In the image aside the upper and the lower Spine bones (marked in Orange) have been unfolded. You see how they are embedded between the Pelvis, Torso and Chest.

Note: You can fold/unfold the spine from within the Riog Control panel

Deform Bone Groups

Display all bones which have the Deform Option enabled. The content of this set can change dynamically (see fitted Mesh)

SL Base: to display the SL Bones (Blue)

Volume: to display the Volume Bones

The others: Bento Bone Groups

Active Deform Bones

The Active Deform Bones are Bones which have the “Deform Flag” set. Only Active deform Bones can modify the mesh (via skeletal animation) when they have an associated Weightmap.

The Active Deform Bones can be filtered by 5 categories:

SL: The 26 Animation Bones for SL

Ext:Bento Bones

Vol: The Collision Volume Bones

Map: All deform bones which also have Weightmaps (only shown when a mesh is selected)

Joint:Bones that have modified Joints (Joint Edits)

Special Bone Groups

Extra: There are a few Extra bones which usually are not used for Animation in SL. These bones are either not weighted to the default Avatar (Skull, Foot Bones and Toe Bones) or are automatically animated (Eye Bones). However you can use these Bones in your animations for custom meshes.

Attachment: to display the Attachment Bones (red)

Structure: to display the Structure bones

More about the Skeleton

As explained above we can now move and rotate the skeleton as we like. We see that the mesh moves along with the bone movements and we will finally end with our start pose for frame zero of the animation (where you want the bones for the start pose) Remind that we are only moving and rotating the green skeleton handles for now.

SL Control Bones

All the green skeleton handles are the SL Control Bones and act as FK (forward-kinematic) controls. They have just been given funny shapes so they lie outside the avatar and are less visually distracting. When an element displays in light green then it is selected and will react on your move, scale and rotate commands. You can select single bones by right-click, or add bones to the selection by SHIFT right-click.

The Control Bones (and the IK Bones) are used for Animation.

The Avastar Skeleton has 2 more Control Bones with very special properties:

The COG

Center of Gravity bone. Use this bone to set the location and rotation of the character. Avastar adds the COG bone movements to your animation. the COG movements are later mapped to the mPelvis bone of the target skeleton.

The Origin

All movements are relative to the Origin bone. Moving this bone around will not affect the animation in any way. If you are doing multiple character animations set their origins slightly apart to where pose balls would start. Once you are happy with the location hide the bone.

SL Base Bones & Collision Volumes

Besides the (green) SL Control Bones we find many other bones in the Avastar Rig. We especially have two subsets of bones named the (blue) SL Base Bones. and the (orange) Collision Volume Bones. These 2 subsets of Bones are only used for weighting (skinning) your character or attachment. But they are never(!) used for animating your character.

Never directly use the SL Base Bones and the Collision Volumes for animating! You create Animations only with the green Control Bones and the IK Bones.

Mandatory rules

Weight only the blue SL Bones (and the orange Volume Bones).

Animate only the green bones (and possibly the IK Bones).

Never add weight to the green SL Control bones.

Never use the blue SL Base bones for animating.

Store the Intro Pose

Once you are happy with your first frame posture press the a key twice in the 3D View to select all bones (it toggles the selection so the first time it will deselect everything if you had a bone selected). The Rig should now look like what you see on the image to the right.

Now press i to insert a new key frame. From the appearing pop-up menu select Rotation (see image below).

Almost always you will set just rotation key frames. The exception is if you are moving the COG or IK control bones, in which case you should set the location too with Location or LocRot for both.

Note: You do not need to create a starting T-pose. The .anim format doesn’t need it and Avastar automatically inserts the required reference frame for the BVH format.

Important:Never use the Keyframe option Whole Character! This option would insert keyframes for all 139 bones (visible and invisible). The Avastar Animation exporter will complain about too many bones in Animation.

The Action Editor

You should see the Action Editor gets populated with the bone names and a yellow diamond at frame 0.

Note: We have simply selected all bones for our pose. This poses a potential problem:

Assume that you wanted the current animation to play “on top of” your default stand pose. In the Stand pose the avatar head moves freely. But after you add this animation, the head no longer moves freely as before. It now moves according to this animation and so the animation “overrides” the default head movements. If you do not want to override the head animations, then you have to remove the head data.

The easiest way to do that is to left click on the corresponding Bone name in the Action Editor (“Head” in our example) and then drop the entire bone from the animation (press “x” on the keyboard).

Note: You can also “mute” the bone by clicking on the little speaker icon next to the bone name. If a bone is not listed in the action or when it is marked as muted it is not controlled by the animation.

Note: In more advanced work you can play with creating sets of animations which control only a few bones each, and which you can mix and match with the Gesture editor in Second Life.

Add the Ending Pose

Lets imagine the animation will run at 25 fps. Click on the timeline on frame 25 which is one sec later (see image below)

Repose the avatar how you want it to appear one sec later and again select all the bones and insert a rotation key frame (‘a’ to select all and ‘i’ to insert key frame). Do something simple like a bow or a hand wave for your first animation.

Click on the timeline at 50 (two secs into your animation), then pose and key frame the bone rotations for the last frame.

Hint: In the Timeline use the play buttons to preview your animation:

Hint: You also can scroll through your animation by grabbing the green time locator and drag it from left to right and back.When you want to set intermediate key frames, then just move the time locator to where you want to add a key frame, then adjust your pose and finally press a twice ( to select all bones) and then i (and select rotation)

Hint: You can drop a keyframe with ALT+i but take care here: This will only work when you have selected the bones which you want to remove from the time line. You can always first select all bones, then ALT+i to make sure you remove the entire key frame.

Prepare the Export for BVH

You find the “Animation Export” panel in the Render Properties section of the Properties window.

Make sure the mode is BVH

set the FPS to 25

Set the Start frame to 1

Set the End frame to 50.

Make sure to check the Prepend reference.

Prepare the Export for Anim

You find the “Animation Export” panel in the Render Properties section of the Properties window.

Make sure the mode is Anim

set the FPS to 25

Set the Start frame to 1

Set the End frame to 50.

Enable Loop animation

Set In and Out for the loop both to the last frame.

Export the Animation

Finally, export the animation by clicking on the Export Animation button. Avastar asks you for a filename and location which by default will take on the name of the action you set before.

Once saved, fire up your Viewer, and from the file menu select Upload then Animation. Find and upload your animation, it will appear in your Animations folder. During upload you will have to choose the priority.

Run it and show off your creation.

Note: If you don’t see the animation play out, you may need to switch off your AO. This happens if the animations in your AO have been badly designed and are running at the highest priority).

This tutorial has only scratched the surface of what is possible. Things you will want to explore next are using the IK controls, looping part of the animation, animating only certain bones, using the Graph Editor… Feel free to download my own firstAnimation with Avastar.