Blender/Avastar Experiment: Bone Roll for Backwards Animations



Can you change a right-side limb to a left-side limb, having it use its in-world animations properly, by changing its bone roll by 180 degrees so animations on it are applied backwards?

For example:
Let’s say I have a Left Wing and a Right Wing. Let’s say I move the Right Wing bones to the left side of the rig, in front of the Left Wing, so now i have a Front Wing and a Rear Wing.

If I rotate the native Left Wing counter-clockwise from the front (raise the wing), and mirror-paste it to the Right Wing, it usually rotates clockwise, to mirror the Left Wing. However, rotating clockwise on the left side causes it to go DOWN, not UP.

If I edit the rig and change the Right Wing bone rolls to X + 180 (where X is whatever the bone roll is when I start), then mirror pasting works correctly — raising the Left Wing raises the Right Wing, and vice versa.


1: Load a regular Avastar.
1a: Unbind the LowerBody mesh.
2: Go into Pose Mode. Select the Right Thing (Hip).
3: Go into Edit Mode. In the Bone Roll entry, add 180 to the number there. (You can just tell Blender to do the math for you, if you set your cursor. For example “-3.75d+180”)

4: In the Posing Panel, press the “With Joints” button, to make sure the deform bones match this new orientation.
4a: Select the LowerBody mesh and Bind it with “Keep Weights.”
5: Export the LowerBody as an Avastar dae. IMPORTANT: Make sure the Advanced/Experimental option “Include Bone Roll” is turned on.

You will see if you pose the left thigh, and copy/mirror-paste it to the right thigh, the right thigh will be backwards from what you expect. This is what we meant to do.

Second Life:
1: Upload the mesh, use both Skin Weights and Joint Parameters.
2: Wear the mesh.
3: Rez a prim and sit on it.


The legs sit exactly as they always have, both thighs rotating forward. Walking, running, etc… all normal. Not backwards, like we wanted!

If we export an animation with this backwards setup… it plays normally on a normal avatar, not with the rolled right limb reversed.


Second Life ignores Bone Roll? Or else the exporter isn’t really exporting Bone Roll. (in the 2.79 exporter, it did say “experimental,” though on the 2.8 exporter it didn’t.)

Bloodsong’s Blender Addons List 2.82-2.83

Blender version 2.82 and 2.83

* indicates a (now) native Blender plu–er– addon.

Bevel Curve Tools
Curve Tools
* Simplify Curves
* Corrective Shape Keys
(this is used for some other plug-in/technique… that i can’t remember off the top of my head.)

* Copy Attributes Menu
* 3D-Print Toolbox
(this has a tool to find intersecting faces.)
* Loop Tools (omg, who doesn’t use loop tools?)

MACHIN3tools **

* Node Wrangler

* Bool Tool

* Magic UV

(i’m making notes here, so i don’t lose them when i want to find my precious plug-ins (sorry addons) when i switch versions.)

(**)  MACHIN3 settings:

Smart Vert, Smart Edge, Smart Face — on, but i haven’t learned to use them :X
Clean Up, Focus, Mirror, Align, Apply — uh… same :X
Mesh Cut
Filebrowser Tools — might decide i dont like these.  whatever they are…

Modes, Shading, Align, Cursor, Transform

Object Context Menu

Viewport Transitional Motion
Concave Crevice Whatever Cavity Thing

Remember to switch to the keymaps tab and set up the pies.

and while i’m here, i might as well keep a log of my customized (gasp!) shortcut keys:
* indicates it is now an official Blender shortcut. HAH!

Alt-U = Smooth  (Note: you can’t find smooth in the keymap search… not the RIGHT smooth.  It should be under Mesh: Smooth.  Go into the 3D viewport, edit something in vertex mode, get the context menu and find the smooth in there.  Right click to create a shortcut.)
* M = Weld (Merge)
O = Proportional Editing: Connected
Alt-O = Proportional Editing: Everything (default)
Alt-A = Start/Stop animation

also while i’m here, i had better store THIS: how to go back to single click in the file manager stuff:

First: DO NOT REMOVE any of these “select” items. These are the select and open and shift select and ctrl-select things.
If you don’t have a single-click entry, you can copy the double-click entry. Or just change the double-click entry to single, if you’re brave. Turn on Open, and turn on Deselect on Nothing (if you click in empty space, everything will be deselected).

Blender/Avastar Experiment: Universal Body Parts & EPH

Universal Body Parts & Enforce Parent Hierarchy (EPH)
Ripping Heads Off Models



How to create a Head/Tail/Wings/Hands model that will work with any avatar. (Yes, impossible, but how close can we get?) And why can’t I rip the head off my red panda and make it work on any avatar?


There is an export option called “Enforce Parent Hierarchy” which I call EPH for short.

What EPH does is… makes sure that your partial rig actually has entries for all the bones between the used bones and the COG (pelvis). So, if you have just a pair of wings, EPH will export the wing bones and wing root, as well as the chest, torso, and COG. This makes sure that your wings are located in absolute virtual space where you expect them to be.

But what if you don’t know where they are expected to be? You can build them for an average human, but what if a child avatar wears them? Or a Dinkie? Or a Giant? Or a completely non-human avatar? What if you want the skeleton that the person is already wearing to dictate where the hip/torso/chest are, and what size they are?

Okay, so you turn OFF EPH, and then Avastar will export only the bones you have weighted. Problem solved, right?


If you read the tooltip fine print, you have to note that turning off EPH will not export unweighted bones **Unless The Joints Have Been Edited!**

IF you have edited the joints, they WILL be exported, whether you want them to be or not. Gaia has tried to explain to me why this has to be, but… unless the answer is “because SL,” I don’t see why it should be.


To cut to the chase, the PROPER way to create universal body parts is to start with a fresh, untouched avastar rig, and DON’T EDIT IT!

Now, you CAN edit the bones you are working with — the face bones, or wing bones, or tail bones, etc. Bones you are weighting. Export with EPH turned off, and you should be gold.

Unless the rig you’re adding the part to has those same bones edited. Because that becomes another mess entirely, when two rigs fight for supremacy. (That will have to be another article.)


I had created a red panda mesh body, and a separate head. Of course, the body was edited, so plain ‘no EPH’ doesn’t work with it.

If DeviantArt is not being a butt, you can see some of my results and methods here:

Since I couldn’t get Avastar to export the head without the rest of the spine, I re-imported the dae file, and deleted the bones I didn’t want. Then re-exported as regular collada.

Result: FAIL.


All right, if a virgin bento rig was needed, I would use one. But (not willing to lose all my face bone editing and weight painting — I HATE redoing stuff!!), I want my rigged panda head!

1: Edit the Donor — Delete all unwanted Bones

Display all the bones, except the ones you want to keep. Make sure you turn on the ability to select all the remaining bones, in the Outliner. Select all and Delete.
Rename this Avatar-donor.

2: Add a new Bento Rig — Delete the bones the Donor is using.

Same method, hide the bones to keep and delete the bones not to; the opposite of the above.

You’ll end up with two partial rigs.

3: Place the Donor

In Object mode, place your head on the neck (wings on the back, tail on the butt, etc etc). REMEMBER! Do not move/edit the base rig! Only the donor rig.
Apply the Location to the donor rig and mesh(es).

4: Join Together

Select the base rig, Shift-select the Donor, and Ctrl-J to Join.

The mesh doesn’t move with the animation bones.

5: Set Donor Root Bone Parent

Show the Blue bones, and select the root of your Donor (head, face root, wing root, etc). In the Bone Properties panel, set its Parent to the appropriate mBone.

Do the same for the Green bones.

6: Check for double Armature modifiers.

In the Modifiers tab, check for more than one Armature modifier. Remove the one that is red. (Or remove the one that looks less ‘right’ than the other.)

RESULT: Export with no EPH, import with Skin Weights & Joint Parameters
FAILURE: Jaw deformed for unknown reason. Head on default body works. Head on Dinkie body FUBAR.

EXPERIMENT 3: New Rig Entirely

After being away from the Red Panda so long, I just decided… eh, let me throw the head mesh onto a new Bento rig, use automatic weights, and see if that even DOES work, or if it’s still screwy.


See the “Ultimate Solution” above. If you want to make universal body parts, or even a set of modular avatars, make SURE you do the extra body parts on virgin rigs, NOT on an edited rig. (Well, you can use the modified rig for body parts on your modular avatar, if you only want to use that particular avatar. But why limit yourself? Make heads for teddy bears that ALSO can work with furries!)


There is still more to explore on this topic. Such as…

A: Why can’t we NOT export unweighted bones, even if they are edited?

B: How CAN we edit the dae to remove the bones we don’t want? Or how can we manage to graft our head onto a virgin rig and fool the exporter into only exporting weighted bones?

Blender/Avastar Experiment: Animesh vs Physics

Now With More Info!


When you rez a mesh, its centerpoint is at its center (or the center of the root mesh, if you have a linkset of them). But when you set it to animesh, the center reverts back to the Origin (between the feet). This makes the animesh ‘jump up’ and forward.

The image below demonstrates. Lower Left: the mesh horse and its manes as mesh. The centerpoint is where the cube is (it’s the center of the mane that ended up as the root ‘prim’.) Upper Right: where the horse appears after you set it to animesh.

Well, fine, just move it down again. BUT! The animesh leaves its physics hull behind when it ‘jumps up’! See the image below. The non-animesh horse has been removed for clarity. The animesh horse’s hull (yellow) is down and back where the mesh horse used to be!


If you play an animation on your animesh, the center changes AGAIN, this time to the root bone of the rig, namely the hip/pelvis/COG (center of gravity).


Easy enough, if you don’t need the hull, or want to build one from prims. Link the animesh to the root prim. Set the object physics shape to Prim, then edit linked and de-select the root prim, to set the rest of the linkset physics to None.


If you have painstakingly created a physics shape for your animesh, you can upload it as a mesh object, using itself (highest lod) as its own physics shape.

You can then link it to your animesh-with-prim root, and thus control the size, shape, and position of the hull.

Below: my custom physics shape fitted to the horse, and the resultant hull it creates. (Yeah, not super accurate. I scaled it to fit better, and so that i could stand on the horse’s back, instead of above it.)

This gives you much better control over the physics, but it does add a prim to the LI.

Speaking of which….


No Linkset over Resource Cost 32 Shall be Made Physical.

This used to mean 32 prims ( counting any drivers/passengers on your physical vehicle), but no longer. I was completely fooled by my ability to turn 37 and ever 44 prim linksets physical. Until I tried to turn this 32 LI horse physical. SL was like, “hahaha NO.”

If there is a way to find the physics cost of something in SL… I don’t know what it is. Oops. Thank you, Pen and whoever else told me this:

The original horse had a PHI (physics) of 33.8! When I uploaded it with the custom physics, its PHI was 2.76. When I switched to uploading the horse with just triangles as the physics… It was around 1.5. And the physics shape uploaded as a mesh? 1.08.

So, theorizing that my horse+prim+physics had a total of about 3 PHI, I decided to see if i could hit the limit….

Well, I wasn’t able to link more than 24 without hitting the linkset number limit. But these turned physical without even blinking, and the LI is 584. Wait. 24 x 3 is… 72. So that can’t be the resource cost of all those physics things. But it is WAY less than 33 PHI each, since at the start, I couldn’t even turn ONE physical!


Physics for animesh is pretty useless. If it’s going to have to be physical, best to use a single triangle as its physics file.

For the physics, you can use one of the solutions above, as suits your project (and has the least cost).

Blender/Avastar Experiment: 5 Joint Hinds



Suppose you used the HIP joint (Hind1, but for the purposes of clarity, we will refer to the standard leg bone naming) for the KNEE, the Knee for the Ankle, the Ankle for the Foot, and the Foot for the Toe. (see the crude diagram below.)

You cannot rotate the thighs, as there is no joint defined for them, but you could attempt to move them by translating the Knee joint.


PROBLEM: This will probably look sucky. The ‘thigh’ polygons won’t actually rotate with this movement, just be dragged around linearly. Can ‘artistic’ movement (and weighting) compensate for this? Can it work well enough for creatures that don’t rotate their thighs a lot?


According to my notes, there is one attachment point on the Hind4 bones. In Avastar’s Collada export options (Advanced), there is “Allow Weighted Attachments.”


Does this mean that the attachment point bone can be weighted? And function successfully in Second Life? If so, the Hind4 attachment points could be used as the fifth “Toe” bone of the Hind limbs.

Blender/Avastar Experiment: 2.5.1 BVH Hip Height at Origin Test



Use the test animations from the Avastar 2.5.1 BVH export on avatars of various skeletal sizes, to make sure the animation always starts at the actual hip height of the current avatar.

1: Play on normal-sized avatar — Success.
2: Play on Dinkie avatar — Success.
3: Play on giant Kaiju avatar — Success.

YES! It works! I’m shocked! :)


1: Turn normal sized avatar into animesh and play the animation.
2: Turn Curious Critters small avatar into anmiesh, etc.
3: Turn giant Kaiju into animesh, etc.

Animesh behaves differently, and DOES NOT REQUIRE this trick to work.

In order to control the animation starting height on an animesh, use a root prim. The animesh’s hip will be placed at the origin of the root prim. You can then simply adjust the location (height) of the root prim.


Someone had a similar problem, where an animation exported as anim from (the one with the missing BVH export option bug) sank avatars (of various heights) into the ground, and a BVH exported from 2.79.6 did not. Origin keyframes were not used.

This means that you might not need to use Avastar 2.5.1 as stated below, to get this effect.

BVH files exported from Avastar 2.5.1 can be used on differently-sized avatars. The hip (COG) should start at the hip zero point for best accuracy.

Note that the animation distances themselves are not scaled.

Suppose you have 3 avatars of 2m tall, 1m tall, .5m tall. An animation built on the 1m avatar moves the hip up .5m, which is 1/2 of its height.

The 2m avatar will move up .5m, which is 1/4 of its height.
The .5m avatar will move up .5m, which is 100% of its height.


Blender/Avastar Experiment: Single Channel Animations



Can you keyframe only a single location or rotation channel and leave the rest undefined, to be filled in by another animation?

For example, can you keyframe a side-to-side swaying of the COG’s X location and let the avatar’s natural Y and Z location remain the same? Or can you keyframe the Z euler rotation of the hips to impart a spinning motion to otherwise straightforward animations? (IE: turning a dolphin swim into a spinner dolphin swim.)


You CAN keyframe ONLY the location (all 3 axes) of a bone or ONLY the rotation, and then mix them.

…unless someone knows a trick to go into a bvh file with a text editor and try to remove channels you wanted to be blank. and that didn’t blow up the importer. just sayin’. :X

Blender/Avastar Experiment: Mouselook Camera Positioning



The mouselook camera is positioned at the X and Y coordinates of the Head bone (mHead), and the Z (height) coordinates of the Eye bones.

ALSO: inside mouselook, on the user’s screen, the avatar is rendered from the neck/chest down, as if it were at the height of the eye bones. Please see the video for what craziness that means.
(turn on captions for narration.)

Note: I have also noticed that sometimes the mouselook camera is inside the mesh avatar’s mouth (for example, the 3D Menagerie Dolphin). For optimal user experience, you may wish to consider using the AltEye bones for the eyes of the mesh, and position the Eye bones in such a manner as to avoid being too low or embedded in something. (This is especially problematic when using the Head bone as the second neck joint.)

Blender/Avastar Experiment: Origin Keyframing to Control Animation Height



When Elysium Stables uploaded an animation file with the origin accidentally keyframed (but unmoved), with Avastar 2.5.1, the animation sank into the ground. Could keyframing the origin height allow an animator to convert an animation with one specific height into another specific height (ie: from riding a tall horse to riding a short pony).


I installed Avastar 2.5.1 and experimented with keyframing the location of the origin, very high and very low, and exporting as anim and bvh. I used my English riding animations for the Teeglepet.

With anim export, the position and/or keyframing of the origin had NO EFFECT.

With bvh export, the position of the COG was considered to be at zero height at the start of the animation — resulting in the animation being low. That is, it wasn’t at the height of the horse’s back, it was at the height of the avatar’s hip.

Subsequent COG movement was calculated relative to there. That is, when trotting, the hip bobbed up and down in proper increments from its starting position.

However, further experiments showed that it was not the keyframing of the origin that caused this effect. When the origin keyframe was removed, the COG STILL exhibited this ‘starting at zero height’ effect.


The sinking of the animation was caused by an Avastar 2.5.1 bvh export error. It has since been corrected, and Avastar 2.79.4 does not exhibit this behavior.

However, it may be desirable to someday create an animation that uses relative hip height of the avatar as a starting point, rather than absolute world-space height. If so, Avastar 2.5.1 may do the trick!


Blender Eye Rig Tutorial

Blender Eye Rig Tutorial


I’m using Avastar with Blender to make avatars for Second Life. But this should work with any workflow and bones in Blender. Oh, and this is for a spherical eye. (Or a segment of a sphere.)

Build your rig, put in the eyes, add the Avastar rig or build your own rig, blah blah blah… This tutorial ONLY deals with the eye and eyelid bones.

Click the images to view the full size.

IMPORTANT: You will most likely optimize your model’s polygon count by removing the back of the eye. Do not do this until after you rig it. We’ll be using the sphere’s center, so we need the whole thing.

Avastar Prep:

1: Turn on visibility for the Face bones (Green eye for the Pose bones), AND remember the “Extra” which contains the Eye bones.

For a non-human rig you’ll want to UNCHECK the Eye Focus and Alt Eye Focus.

Hide all the other bones except the GREEN Eye (and/or AltEye if you’re using those) and Eyelid bones.

2: AND, with each Eye bone selected in turn, find the Damping Track that makes it point at the eye target. If you do NOT have a humanoid rig, and your eyes do NOT face forward, and you will NEVER use an eye target to position your eyes, set the influence to zero and DELETE THIS MODIFIER, for the sake of your sanity.

I swear, Avastar keeps turning these things back on at unexpected times, and you have no idea how many times I come back to my avatar, after editing the hands or something, to work on the eyes and find, OMG MY EYES ARE TWISTED WTF!?!??! ::cough:: (*Gaia fixed this! If it’s still going wonky, let her know.)

Especially if you find you are ever going to change the base pose of your avatar, and use the Restpose button with “Apply to Meshes” turned on. Eye Targets Must Die!


Eye Rig:

Step 1: Grab your eye(s) and go into Edit Mode.
Use L to select all the vertices/edges/faces (it doesn’t matter) of one eye. Make sure your Action Center is set to Median Point (or Bounding Box center). You should see the axes in the center of your eye.

Press SHIFT-S: Send Cursor to Selected. This is where the center point for the eye rotation should be — and the eyelids too, if you want them to slide along the surface of the eyeball.




Step2: Switch to the Rig, Edit Mode.

Grab the head of each Eye/Lid bone and press SHIFT-S: Send Selected to Cursor.

Note: zoom out your view and make sure Blender did the same to the other side. (Also make sure you have X Mirror turned on, in however many places it needs to be turned on! Options for one. Not sure if there’s more.) If not, press G and wiggle the bone head around until the other side matches up with it. I swear, sometimes Blender is a moron and won’t keep the bones symmetrical if I type in a number, or use the Transform dials, or use these snap to commands. Today, while doing screenshots for the tutorial, it behaved properly. I still don’t trust it :X

Yes, we’ll be sticking the Eye and Eyelid bones all on top of each other to start.




Step 3: Back to the Eye mesh, Edit Mode.

Select that one vertex that is in the center of the eye. (Yes, I have the wrong seam marked for a nice UV map; ignore that :X)

SHIFT-S: Send Cursor to Selected.

Now go back to the Tails of the Eye/Lid bones and SHIFT-S: Send Selected to Cursor. How easy is that!?




Step 4: Bone Roll.

This is for compliance with the Second Life avatar rig. It is optional.

To view the bone axes, go to the Far Right panel area, under the Little White Man icon. Display section: Axes checkbox. You could also set the working axis to “Normal” instead of “Global” (I don’t know why, but “Local” doesn’t work on bones), but those axes will disappear while you rotate the bone.

The eye bone should point from the center of the eye straight out the pupil, with the Y axis as the long axis, the Z axis straight up in relation to the eye, and the X axis horizontal. Or, basically, X rotation will look up and down, Z rotation will look side to side, and the Y axis will make your eyeballs spin in their sockets. (What? Cartoons and dragons of Pern could use this!)

In this example, my eyes are on a 45 degree slant. (Not to mention they’re facing outwards, not forwards, but we took care of that with the bone head and tail.)

First, select the Eye bone and set the Roll to 0. (Right (N) Panel, Transform Section at the top. Roll dial.)
Then, drag on the dial to roll the bone until you see the X axis horizontal to your eyeball, and the Z axis vertical. You will probably see the wireframe lines to guide you.


Make SURE that Blender is rolling both the left and right bones simultaneously. If it doesn’t, you may have to copy and paste your Roll value from one dial to the other. Remember to change polarity when you do this. (ie: 65 will become -65; -4.28 will become 4.28.)

You should also copy the Roll to your Eyelid bones. Yes, numerically, because you want precision here. (Don’t you? No? Carry on, then.) The pose copy thing won’t help either :X

MAKE DOUBLY SURE that once you’re done, the BLUE bones have the same roll as the GREEN bones you just edited. (This is for Avastar, specifically. I’ve had trouble changing bone roll in the middle of working on the model weight paints, but not when setting up the skeleton for binding.)




Step 5: Open the Eyelids.

How far depends on whether you model your eyelids open or closed, but do open them at least a little, to save yourself the headache of trying to grab the suckers when you want to pose and/or weight paint your model. You could also make the eye bone stick out further, to make that easier to grab.

But to do this… Go into Pose Mode.

Select an Eyelid bone (not the eye; it will take a few clicks probably). Press R X X to activate rotation on the local X axis. Which we set up with our bone roll to be up/down or open/close. Rotate the bone until the tail touches the edge of your eyelid. (Or where one would be, if you had one — since my demo model… well, don’t ask!)

Do the same for the other Eyelid bone (Upper/Lower). Select both eyelids and the eye, Copy Pose, then select the same bones on the other side and Paste Mirrored.




Step 6: Restpose.

Now is the time to zoom out and make TRIPLY SURE that your bones are all mirrored properly, all the rolled axes are rolled properly, etc etc etc.

In Avastar, go to the Rigging section and find the “Apply as Restpose” button. MAKE SURE that if you have anything already bound to your rig, that you turn OFF the option to apply the pose to the meshes, or that nothing ELSE has moved on the mesh that you weren’t expecting. (Maybe you extended a pinky bone to weight paint it and forgot to put it back or something. That will get baked to the mesh shape!)

Then press the button.




Step 7: Binding.

Now is the time to hit Save before everything goes to heck. Um, or before you hit the Restpose button :X

Go into Object Mode, select your rig, select your mesh, and bind them together! (You should know how to do this from Avastar and other tutorials.) You can go into weight paint mode, grab all the vertices of each eye, and set them to a level of 1.0 for their respective eye bones. (Not shown in this tutorial.) But that should be it. Your eye should then rotate perfectly on its center, never pop out, and… I dunno, just be totally awesome. And eye-like.

Remember! You can cut the back off of it now. :)

(As for weight painting your eyelids, good luck! Eyelids are the bane of my existence…!)