Feedburner

Nalates Urriah

Resetting the Origin of an Armature in Blender

The default Second Life animations have odd pivot points in the animations. If you are using them for import to SL then that is a good thing. If you are trying to use the animations for other purposes, like I am to pose the avatar for weighting clothes, it is a problem.

If you import the default SL animation into Blender, the feet are at the Blender 0,0,0 position. If you change to EDIT mode the hip is at the 0,0,0 position. In POSE more, again the feet are at the 0,0,0 position. See the image.

The problem with Default SL Animations

That does not really matter for our use for making Second Life clothes. But the T-pose only being available in EDIT mode makes it hard to position the imported animation with our clothing avatar.

What we can do is process the animation through BVHacker to make it easier to use.

In BVHacker the default avatar_female_walk animation looks like the image below.

BVHacker with default walk animation – unchanged

If the animation is used as is, we run into problems using the animation in Blender with our clothing models. As we switch between EDIT, OBJECT, and POSE the imported armature keeps moving making it difficult to work with. I show it moving around in the opening image.

The 40.98-Y is meters and is the distance from the hip to the armature’s origin. The armature is huge, like 80 meters tall. If we want the armature to fit to the avatar we use and be similar to the scale we use in SL (like 2 meters) we need to scale the import down to 0.027 of the import size. That would leave the hip and armature 1.106 meters (or Blender units) apart.

If you start trying to fix the origin (often called the pivot point), things can get frustrating. Moving the origin for an armature is not like moving a pivot point for most things in Blender. If you try, it will seem that you can have the armature in the right place in either the Edit mode or the Object and Pose modes, but not both.

There is a way to fix it. There is a standard way to fix the problem for things built with Blender. You’ll find a few tutorials and forum posts about how to do that. Those are all based on the idea that you moved the ‘root’ bone in Pose mode, which is the hip in this armature. The fixes are based on the idea you can ‘unmove’ the bones… meaning undoing the move you made.

Standard Blender Process

To move the origin for an armature you made, use Edit mode to move all of the armature and its parts. Get it placed where you want it in relation to the origin.

If you are doing this with the SL Default Animations, this will now place the armature in the wrong place when in Object and Pose modes.

To fix that undesired positioning, go into Pose mode and be sure you are in the first frame of the animation. For working in Blender that should be the T-pose, but may not be depending on your animation. Now select all of the armature. Press A-key once or twice. The armature in Pose mode to the same location as you did in Edit mode.

It is hard to get the positioning done accurately. Zoom in and be careful to make positions as closely as possible. For use with clothing it wouldn’t matter if it is off a tiny bit. If you planned to export animations, even a tiny amount could be a problem or not… depending on what you are trying to achieve.

While still in Pose mode and after moving the armature, clear all transitions, Alt-G. Press ‘I’ and update the animation frame. You usually only need to save the Location information.

This will orient the Edit, Object, and Pose modes to the same position. It should not affect the animation in any other way. But, that depends entirely on how the animation was made. In the case of the SL Default Animations every key frame has to be adjusted. There are ways to handle that in the Dope Sheet. But, that is beyond what I want to get into now. So, while the standard process can be used with some other animations does not work so well with the Default SL Animations, there is a fix.

Non-Std SL Blender Process

Since the standard Blender process is still a problem for animations using lots of location information, we can use BVHacker to reset the animation to something easier to use in Blender. Because of BVHacker we do not need to delve into the Dope Sheet.

Get BVHacker and open the Default Animation with it. We can add a T-Pose in BVHacker, just click the button and done. The Y-value changes to 42.53. If you double click that value and set it to zero, the avatar model sinks into the ground as the hip is moved down to the 0,0,0 origin. See the image below. When we import the animation the hip is located at 0,0,0 in Blender.

BVHacker Adjustment to Animation

The Shortcuts section on the right side needs to be used in order, from top to bottom right reading, to work correctly, if I understand the manual correctly. For this ‘walk’ animation to work you only need to click “Set T” and set the Y-value to zero. Save the animation and import it into Blender.

When importing there are some things you can do that make life easier. For instance; to get the armature about the same size as the model we use in clothing files set the Blender import scale to 0.027. For these default animation set the Rotation to Euler (Native), Forward = -Z, and Up = Y Up. This will stand up and face the avatar forward in Blender front view. You can change any of these settings to what you need without affecting the animation.

If you rotate the imported armature after import, you will have to remember to press Alt-R, in Object mode, to apply the rotations, which depending on what you are doing with the animation and how it was made will or won’t matter. I recommend you do apply the changes.

Once you have the armature in Blender, you’ll notice the armature origin is at 0,0,0, which is now the hip bone and not the feet as previously. There are several ways to change the origin of the imported armature so that it works easily with the avatar that we use for clothes making, which has its feet at the Blender origin.

In Object mode you can move the armature up the Z-axis. How much depends on your scaling factors and when you apply them. I use 0.027 with the import so I multiply that times original Y-value 42.53 shown in BVHacker, which gives me 1.148. I select the armature in Object mode then type: G Z 1.148 Enter.

I use 3D Nav to make sure the 3D Cursor is at 0,0,0. In the Tool Bar there is a 3D Navigation section with a button to Center the cursor. You may have to enable 3D Nav in User Settings Addons. See the image for the tool’s appearance.

3D Nav Panel in Blender

Once you have the 3D Cursor in the right place in the 3D Window click Object-> Transform-> Origin to 3D Cursor. Now your imported animation matches the typical armature we use and is much easier to use.

Test the animation. It should be fine.

Usability

The animations are useful for guiding you in posing the clothing model. Don’t try to Retarget the animations using the Motion Capture Tools included with Blender. That is a whole other level of complication. I’m working on a tutorial for that. Just know that the MoCap Tools are still a work in progress.

If you REALLY want to retarget the animation to your armature, use Machinimatrix.org’s Avastar. They have a tool that works for retargeting for SL avatars… well most avatars/armatures.