Avastar Export Modes
Knowing the details of how the animations are exported from Blender to SL and OpenSim will help you produce better animations and debug problems.
Avastar has two export modes: BVH which will export the traditional bvh files suitable for SL, and the “anim” format which is SL’s internal animation format. To use the latter format you will need a viewer that supports that upload. This is typically done through the ‘bulk’ uploads command.
Animations in SL
Since a viewer can run on quite different harware and over laggy network connections the viewers don’t use a fixed frame rate for animations. Rather, each bone in the animation is tagged to have particular rotations at certain times. The viewer then looks to see where it should be and either drops frames or interpolates between them. This way two animations on two different viewers will be in sync if they are started at the same time.
The exported animation will be as a BVH file that is compatible with SL. The key values to set in this mode are the Start Frame and End Frame of the animation and the fps. These values are taken from the scene that is currently selected but can be modified in the panel also. The other parameters shown are mostly for reference as you will need to enter those parameters into the viewers upload screen when you import the animation to SL
The hands posture will affect the mesh so you can see the effect in the animation, but you will need to remember to set a matching hand posture when you import the animation in the viewer. Similarly, although the loop parameters are just for show, the percentages from the begining of the animation will be shown for convenience as these are the values you need to enter when you import the animation.
You should have “Prepend reference” checked unless you want to set the initial frame yourself. When you import an animation to SL the first and secnd frames will be compared and any bones with no change in rotation will be removed. If you have “Prepend reference” selected this will be configured automatically for you – any all bones mentioned in the current action that are not muted will be exported so that they are not removed by the viewers import filter. If the bones are muted or not listed (i.e. no keyframes) then they will be exported so that the viewers import filter removes them, making it easy to create animations that only affect a few bones.
Unlike BVH, all the parameters will be written into the exported file and there is nothing to fill out when you import the amimation in-world. The Start Frame, End Frame and fps are taken from the current scene, and the Hands posture will affect the current avatar but the rest are just parameters that will affect the animation in-world only.
In this mode you can keyframe just the minimum bones to achieve the motion you want, or use the NLA editor the compose an animation from several actions. The final bone rotations are calculated from the visual rotations that appear in the 3D view so they automaticaly take into account IK contraints and anything else affecting the motion.
As for the BVH mode, only bones that have been keyframed and not muted will be exported in the animation. If you want to create a single bone animation simply keyframe that one bone. If you want to export the lot, then keyframe the lot. Generally what you see in the preview in Blender should correspond to the animation in-world.
Note that to move (as opposed to rotate) the avatar you have to create a location keyframe on either the PelvisInv or the COG bones.
When you hit export a visual keyframe is calculated for every bone involved for every frame in the animation. This motion curve is then simplified, discarding around 60% of the keys and result is written to the anim format. The simplification retains the extremes of the motion so it will not kill the fine detail. It will also retain the boundary frames in a loop so its possible to have seamless loops. If for some reason you want to force Avastar to retain the keys on a particular frame then add a mark to that frame and name it “fix”. Avastar will then omit that frame from the simplification process.