Tuesday, 17 November 2015

TUTORIAL: Principles of Blender Rigging and Weighting - Part VII

This is the seventh part of an extensive introduction to rigging and weighting in Blender for use specifically in SL/Opensim. You will find links to Parts I-VI on my main page of links. The subject I'll be addressing in today's installment is mesh avatars.

Sorry, today's is another of those "theory-heavy" ones rather than one with lots of pictures and how-to instructions. In large part this is because the actual skills required to do this are ones I've already covered in this series. Working with custom avatars simply requires applying that knowledge to a different circumstance and being aware of some associated issues and considerations.

A non-standard avatar is one that deviates in any way at all from the default "Ruth/Ron" avatar we're all familiar with and therefore needs to be uploaded in-world as a weighted mesh. This can include:
  • An identical mesh version of a SL avatar, using the same UV mapping, same geometry, and identical rigging and weighting to the in-world one. The "non-standard" deviation is only that it limits some of the items you can wear.
     
  • An identical SL Avatar mesh which can be re-weighted to provide a pretty significant improvement to the way it moves and, in particular, to reduce the major problem areas. The "Ruth topology" can make this a challenge but it's possible (and was my own first foray into the subject).
     
  • A very similar human avatar created by re-working the default avatar's mesh (often increasing the poly count somewhat and/or reworking the topology). If you're extremely careful you can also preserve the original UV layout. I've done this but it can be an exercise in frustration without a significant gain i quality.
     
  • A human figure model that you make from from scratch, or one exported from a software product like MakeHuman, or one that you've downloaded from places such as Blendswap or other open license sources.
     
  • You can also use commercial models, but be very caution about the licensing terms when you purchase it. Game models and most common 3D software models (like DAZ, Poser) have self-use clause which is violated when used in Opensim because the actual model and textures must be stored on an asset server and then also later transmitted to anyone else who sees your avatar, even if you aren't giving copies of it away.

    To stay strictly within the licensing terms you would need to be in a self-hosted standalone which nobody other than yourself is able to access (via login or HG) and which you can never leave while wearing the avatar.

    Many people -- myself included -- bend these rules a little by using commercial self-use-license models and textures in their sim builds but do not distribute those items. With no income being derived from them and with it requiring an illegal act for someone else to extract and use the model or texture, it's somewhat unlikely (but possible) that a commercial vendor would go to the trouble of issuing a DMCA take-down request or initiating legal action.
     
  • Non-human models you've made or obtained with suitable license. The sky is the limit, here. I've seen dogs, cats, dragons, horses, merefolk, cyborgs, and all manner of other things. These present additional challenges but are feasible -- at least to some degree.
All except the very first of the above possibilities results in an avatar that uses different weighting -- and in some cases a modified armature -- than the in-world one, and there area  few things that you need to be aware of before you start considering them because they'll likely determine whether it's even worth your time and effort to do it. First, though, let's quickly cover the basics of wearing a mesh avatar.

Wearing a Mesh Avatar

 To wear a mesh avatar you will need that new mesh and its textures. It will need to be in a SL-compatible .dae file format (not all .dae are suitable for upload) including the full armature details. If it's one you're exporting from Blender it will need to have "include armature" option as part of the export settings.

SL/Opensim requires that you always have a skin, eyes, and hair wearable worn. Those can be replaced but never taken off.

We don't want that base avatar poking through our mesh one so we almost always need to hide it by wearing a complete body alpha mask. Because the mask hides everything, I'll typically use the default Ruth skin, eyes and hair since those will never need to be transmitted by the region (other textures would still be transmitted to other viewers even though they're hidden and there's no point adding to the data transfer load).

You also must always be wearing a shape, and this is something that can cause confusion for beginners.

When a wearable mesh is imported, the importer treats it as a "Ruth shaped" object in T-pose. It doesn't matter if it's the size of a house or the size of a mouse, the in-world system thinks of it as "Ruth" standing in T-pose. This almost always means that for it to display properly you need to wear a Ruth shape. This is true even if you're using a male mesh avatar, or a dragon, or a blob of slime.

The only time where this isn't true is if the software you use to export the .dae is altering the file at the time of export and also supplying you with a XML shape file to import and wear as well; or if you use a product like Avastar where you've dialed in your own shape settings prior to working (and not made any custom adjustments to the armature where you've used its "snap to" function) since it readjusts the mesh to Ruth proportions on export which will then be counter-acted correctly by wearing your shape.

As we discussed earlier in this tutorial series, the imported mesh is deformed by any shape slider settings you're using that affect a bone group the mesh is weighted for. That's how fitted mesh is able to work at all but it's also true for mesh that uses the only the classic armature's mBones set. Any shape slider that changes a mBone length will deform your mesh.

If your mesh avi has weights for the pec bones, butt and belly, you'll also want to be wearing your physics wearable which governs how those react when you move based on their settings.

Because your new avatar is a rigged mesh uploaded with the weights, it will position itself correctly on you no matter what attachment point you put it on so I will usually use a point that is unlikely to ever be used something else you might wear: the left eyeball. Sure, you can wear it on your pelvis or skull or spine or even your left hand if you want, but then if you wear something else there you have to remember to add it rather than replace it on the attachment point -- something that's easy to forget when you're in a hurry.

Once uploaded, you'll also need to apply the matching skin textures to your mesh avatar (exactly the way you'd texture a prim or any other mesh object). None of your existing skin wearables will work unless you have their actual texture files and your new avi uses identical UV-mapping to the SL avatar's maps.

So your base worn avatar set-up will be:
  • skin wearable (usually Ruth skin)
  • eyes wearable (usually default Ruth)
  • hair wearable (usually default Ruth)
  • optionally a physics wearable if your mesh avi is weighted to have bouncy boobs/butt/belly
  • alpha mask wearable with all 5 zones check-marked to be masked which will make the skin, eyes and hair all invisible
  • your mesh avatar, textured with its own skin, usually worn on an attachment point that isn't likely to be used by something else you'll wear.
  • either a Ruth shape or a shape specifically made to be worn with your mesh avatar, depending on how the avatar was created
In theory, you'll now appear the same in-world as you did in your source software. You'll also likely be bald and naked. Your in-world avatar animation is controlled by whatever you're using (default SL animations or AO or other pre-made ones).

Considerations About Using Mesh Avatars


Skin

I've already pointed out one possible consideration that may impact your decision to wear a mesh avi: the skin. You can't use any of your wearable skins so you need to have your own full set of textures to apply to the mesh.

If you're using a mesh avatar that has UV maps that are identical to the default one, and you have the original textures that were used to make a SL-wearable skin, you can apply those textures to your mesh avi (you do this just like texturing a prim or any other mesh).

If you don't have the original skin textures, or you're using a mesh avatar that has a different mapping, you'll need to use the ones supplied to you already from the software used to create the mesh. Hopefully they're good. If not, you'll have to make your own (which can be pretty challenging to do if you aren't fairly expert at Photoshop/GIMP).

I won't go into this in any greater depth since it doesn't really have anything to do with this tutorial's subject.

Hair

For many years, the vast majority of users have been sporting "prim hair" that is usually a mixture of prims, sculpties, and often flexi-prims and is an attachment typically worn on the skull. These existing ones will all work perfectly with a mesh avatar although you'll likely need to size it to fit and/or adjust the position of it a little.

If you've been wearing the "clothing item" type of hair that Ruth does, it will now be hidden by your alpha mask and you'll need to go shopping for prim hair instead.

In the last couple of years, mesh hair has become increasingly popular and this can lead to issues. I'm referring to rigged mesh hair, since unrigged mesh is essentially the same as a prim and is fine. With rigged mesh hair, the hair must be matched to your avatar since you can't scale or position rigged mesh in-world.

If your avatar uses different rigging and weighting, the hair has to have been designed and weighted for that same rigging and weighting or very close to it. In most cases that means you'll need to make your own (or go shopping for prim hair to wear instead).

Clothing

All mesh avatars are attachments and therefore cannot use any of the standard SL/Opensim avatar or clothing items -- the "paint on" ones you wear like skin, tattoo layer, alpha mask layer, shirt, pants, etc. They're all being made invisible by the alpha mask and if you wear one it goes on a sort of phantom Ruth mesh that's under/independent of your worn avatar mesh and will poke through it, etc.

Any clothing you want to wear has to either be part of the mesh avatar's texture, or has to be an additional mesh clothing item (worn as an attachment) that has rigging and weighting made to match those of your mesh avatar.

If you want to use paint-on clothing, there is no "alpha mask" or "clothing item" for mesh avatars...you have to do it as part of the actual texture applied to it. If you've been making your own paint-on SL clothing you shouldn't find this too great of a challenge since you use more or less the same approach for a mesh avatar but any part of the body not covered by your paint-on clothing has to be your avatar's skin texture instead of being transparent.

If you go this route, you'll want to make a template (or set of templates) in Photoshop/GIMP that have your skin texture as their base layer. You'll create your clothing items on higher layers and, at time of export, include the skin as part of the overall clothing texture. Then, in-world, you'll apply that directly to your mesh avatar rather than having it as a separate wearable.

While this isn't hard, in practice it tends to be very inconvenient unless you commonly just make complete outfits. If you like to mix and match pieces of clothing you'll need to do so manually and remember always to unwear, then rewear prior to making any HG teleport (otherwise the changes aren't persisted and people will see whatever the mesh looked like prior to that).

Of course there's an added complication: if you ever later decide to change your skin you'll need to remake and upload all of those clothing items again with the new underlying skin texture.

I very rarely use paint-on clothing and would normally only do so for things like a few commonly worn underwear items or a tattoo.

By far the most flexible approach is to make your own matching mesh clothing. Rather than using Ruth as your mannequin during the modelling and subsequent rigging and weighting, you'll be using your file copy of your avatar model and be transferring its weights when you prepare it.

Of course this all depends on your skill level in Blender. If you have the ability to make your own avatar you'll easily have the required knowledge to make clothes for it. If you're using a model created by someone else, you'll either need to get matching clothing from that same source or be capable of making your own. On import in-world, properly made rigged mesh will fit and move with you like a glove and, with enough care, won't requite any alpha-masking of your underlying mesh avatar.

If it's necessary to alpha mask your mesh avatar you have a new challenge: you'll need to make a new skin texture for it with the appropriate areas masked out and fully transparent on the skin. That's easy enough to do, however you'll either need a bunch of different pre-masked bodies or have to continually replace parts of your body texture (which rather kills the quick mix & match wear convenience).

A further complication with masking parts of your mesh avatar is that anything mesh worn over that texture and using an alpha channel in its texture(s) will usually alpha-glitch with your masked skin and will do so very unpredictably, Sometimes your clothing will look right, sometimes it will become invisible and show the skin texture underneath it instead; and it won't do so in a predictable and repeatable way. You might look fine in your viewer but be a mess in someone else's. It's far better to spend the time doing your weighting properly and not requiring a mask.

Animations

You'll also need to pay very careful attention to any impact your work has on the way your avatar plays animations. If you alter the armature at all by scaling or re-positioning bones it will change the way any of the in-world animations appear when you play them. The changes to a joint's axis of rotation and pivot point can make a "stock" animation appear very, very odd in world.

There are two solutions:

  • ensure that any changes you make to the armature of your avatar are small enough that the difference between it and a normal avatar are small enough that it doesn't make in-world animations look too bad, or
  • make a complete set of your own animations and use those in-world instead
Even if you're an expert at Blender animation (which is a loooooooooooooooooong subject of its own) and don't consider the idea of making a completely new set of custom animations as being a challenge, it's worth remembering that for a lot of common activities you probably don't use your own animations. You might want to...
  • sit on something that has its own built-in animations that won't work correctly for you
  • go to a dance somewhere and of course their danceball probably isn't going to have your custom animations in it so you'll need to make and play your own
  • you'll need to use a built-in viewer AO for all of your animations since any script-based system will frequently (usually!) fail when you're HGed and there are many regions where scripts are disabled
  • anything that uses animations to have to interact with someone else (couples dances, cuddle/sex beds, etc) won't work for you -- you'd have to make and only use your own

General Bugginess

Above everything else is yet another consideration: various bugs/glitches/limitations of the viewer and simulator software.

There are still a surprising number of people who are married to viewers that don't support mesh. They simply won't see you at all or will see a simple sphere instead.

There was (is?) a bug with the ATI graphics card driver that causes it to fail to render rigged mesh, when worn, unless you disable hardware skinning in your viewer's graphics preferences. Doing so has a rather serious negative effect on graphics performance and a hit to CPU requirements so many people simply refuse to do so. Any rigged mesh you wear will be invisible to anyone with that issue. Neither nVidea nor Intel drivers have that issue (that I'm aware of) and I'm sure ATI will eventually fix theirs if they haven't already done so.

Another common bug, currently, is an issue I experience most often in Opensim although I'm told that it can happen in SL as well: when you TP into a busy region (one with many avatars in it already) the subsequent sending of your mesh data to all of those viewers can somehow become glitched. The data is sent, but some of the people's viewers won't be aware that the data has arrived and will fail to display some of your worn items.

This means if you wear a mesh body and mesh clothing and tp into a party you should expect that:
  • some people will see you perfectly
  • some people won't see you at all
  • some people will see your body but not one or more of your clothing items  so be prepared to be told you're naked even if you aren't
  • some people will see your clothing item but not your body -- so you'll be a corpseless dancing dress and hair
Currently there is no "fix" for this but the bug is one that has been reported to both the Opensim and the viewer developers. Maybe one day they'll consider it worth their time to look at it (probably when it directly affects one of them personally or when enough users start to complain about it often enough that they finally get around to it).

When this bug happens, a rebake will NOT fix it. Nor will it be fixed if you relog. Nor will it be fixed if you tp out of the region and back. Nor will it be fixed by the region operator executing any console commands. Nor will it be fixed if they toggle into wireframe view and back.

If you're extremely lucky, you can change your group tag and this might be sufficient to trigger a resend of all data and the other people's viewers will suddenly see you correctly but this doesn't appear to be a reliable, repeatable solution. Occasionally it will work. More often it won't.

The only way that someone will reliably see the missing piece(s) is if they relog, and unfortunately that's not often going to be something they're all that eager to do.

We can hope that as the software matures they will put some time and effort into resolving bugs of this nature (and while we're at it, let's hope for world peace too). In the meantime, be aware of the issue and dress accordingly if you're worried about it (a body that uses paint-on underwear textures is a good back-up plan for attending parties).

Summary

All these caveats might seem a little daunting (and they can be!) but my intention isn't to discourage people from using mesh avatars. It's simply to forewarn you that there's more involved than a quick body upload.

Working With Avatar Models

Assuming the above section hasn't scared you away, let's look at how you approach working with an avatar model to prepare it for use in-world.

Basic - T-Pose Models

If you're lucky, your avatar model will closely resemble the SL avatar in overall, shape and proportion. If you're even luckier it will fall into the "Basic" class of model where it's already in a SL-like T-pose shape. These are by far the easiest to work with and existing in-world animations will often look pretty good with them.

The actual process of rigging and weighting a custom avatar mesh like this are identical to the methods I've already covered in previous parts of this tutorial series. The greatest challenge will be doing the weighting since you may not have a source object you can use to give you a decent starting point for your weights.

If that's the case you can try the method we used for our mesh cylinder and transfer weights from the bones themselves, or on rare (!) occasions you might find the bone envelope gives you a better starting point. If all else fails, you'll have to manually add them from scratch as we did in our very first experiment with the cylinder. This is a lengthy process but the mechanics and techniques are all the same as the ones we've already discussed.

It may be necessary for some models to make some small adjustments to the armature by actually editing the lengths and positions of bones. You are allowed to do this provided you don't alter the structure of the SL armature. You cannot change the hierarchy of bones in the armature but you can move around the joint locations.

It will take some trial and error and experience to get a feel for just how far you can deviate from the built-in armature in your edits before it forces you to make custom animations and what's "acceptable" in terms of how an avatar looks when an animation is being played will differ from person to person. Something I consider "okay" might not be to someone else -- and visa versa.

Humanoid Models That Aren't Already in a SL T-Pose

If your source model is a human figure, must as above, except that it isn't already in a SL-type T-pose -- and many aren't -- you can still potentially use it. The basic approach is to first adapt this model into a new one that is posed in the SL T-Pose (doing that deserves its own section, below) and then you can proceed with rigging and weighting it just as you would with a basic model.

Non-Humanoid Models

You can use a model that has a very non-human shape like a cat, dog, horse, bear, or other such animal. Or any other shape, for that matter. This will involve making direct edits to the SL armature and you will subsequently have to make all of your own custom animations for it.

I am not an expert in non-human model rigging although I have a theoretical understanding of it. My testing and experience is with "animals" that conform to the same approximate anatomical structure of a human model, where there is a central torso/spine, attached neck and head, and then four limbs where two "attach" at the pelvis and two "attach" at the shoulder/collar.

Models that deviate significantly from that by being more simplistic are "easy" in that you simply omit weights for the bones that need to be ignored. A mermaid, for instance, would have its tail weighted only to the left (or right) leg bones and have no weights at all for the other. With a matching set of custom animations this is handled just like a regular avatar.

It is not possible to add new bones to the SL armature or to alter the hierarchy. This means you can't create a new chain of bones to handle animation of a tail -- which is a tragedy since dogs and cats in particular really need properly animated tails. You will either need to put up with static tails, or prim attachment ones moved via script, or texture/alpha swapping scripts to selectively hide variations of it, or use a flexi-prim attachment.

I have been told of centaur avatars in SL (but haven't seen one in action) where all four horse legs and two arms are independently animated, and where each of the horse legs is two bones. This leads me to think that it's possible to detach the foot bone from the ankle bone in the armature and relink it somehow to the pelvis but I have not attempted surgery of that nature on an SL armature so I can't give any instruction on how to do it.

Unused Bones

In the tutorial installment where we looked at the SL armature, we learned that there are five unused bones in the standard armature: the left and right feet and toe bones, and the skull. Although they aren't used in any animations, you can include weight for them in your mesh and then make custom animations to move them -- including ones are are keyframed only to them.

One application for this -- which I now use personally -- is to partially weight the eyelids and upper eyelashes to the mSkull bone, then rotate the skull using an animation (I trigger that using a HUD). Since no other part of the avatar is weighted to it, the rotation will let the avatar blink without affecting any other part of the mesh.

The same can be done by weighting the lower jaw to the skull instead, allowing you to open and close a mesh avatar's mouth. You can't independently do both, though.

For the feet and toes there are fewer applications, although it is possible to use them to alter your feet into a natural "high heel" pose this way instead of making a separate model that is pre-posed that way.

Be aware that any script that stop currently playing animations -- as many do -- will also stop those custom ones so you will need to be able to trigger playing them again.

Attachment Armature Weighting

I have recently been doing some experimentation with weighting portions of an avatar to the attachment armature's bones but my results have been highly unpredictable and this is not something that is either encouraged or supported by the environment.

The attachment armature is another one that is part of the "hidden" structure of the SL rig -- much as collision bones used to be -- and its purpose is to control the location on the body used when you attach something. Many of that armature's bone names violate the .dae naming requirement (of no spaces in bone names) and thus those weights cannot be imported at all. (A year or two ago a TPV added unofficial support for handling this by allowing you to replace the spaces in the names with underscores in the .dae and then having the viewer convert them back to the correct bone name at import...this was later removed).

For the handful of attachment bones with valid names, I've had exceedingly unpredictable results that, most frustratingly, are not consistent and repeatable. If I'm ever able to reliably figure out what does and doesn't work I'll write a separate tutorial for it.

Adapting Non-T-Pose Models


If your source model is humanoid but isn't already in a SL-type T-pose you will need to convert it into one that is before you can begin to work with it.

Remember that this is only necessary if your goal is to allow the avatar to look reasonably good when playing in-world animations that were originally designed for the SL avatar. If you're making all of your own animations you can simply edit the armature to fit the model (as long as the structure/hierarchy remains unchanged).

There are several strategies you can use, and you may sometimes need to use a combination of them.

The first two I list here involve changing the SL armature and are not what I'd recommend unless the alterations are very small. The preferred approach is to alter the original mesh to get it to conform very closely to SL T-Pose shape and there are a few methods for achieving that.

Repose and Apply to Armature


You can leave your model in its original pose and alter your armature to fit it by posing the armature and then making this the new T-pose for it. While probably the easiest approach, and one that preserves the original model's geometry, it's also the one that's least likely to give you satisfactory results with existing animations. I would only do this if the pose of your model is very close to being a T-pose.

Make sure you're adjusting your armature's pose rather than editing it, then while still in pose mode you can use the menu option Pose > Apply >  Apply Pose As Rest Pose which will now make the armature consider this to be the T-Pose for upload. All animations rotate the joints based on the T-pose orientation of the bones so if this new pose is a significant departure from the standard one your in-world results are going to be pretty scary. :p

 Edit The Armature to Fit

You can exert a little more control over rotation orientations by editing the armature instead of reposing it. This will result in the same general net effect as the above method except that you can alter bone lengths, joint positions and rotations; but comes with the same caveat about how it's likely to look in-world. For how to do this see the "Armature Edits" section below but I'd try to avoid doing this unless they're minor edits.

Pre-Pose And Apply Using Alternate Armature

If your original source model has an armature of its own (even if very different from the SL one) it's worth starting with its native armature and spending time posing that to make it resemble a SL T-pose. Then you'll lock it into this new pose as its native shape and proceed with regular rigging and weighting. Depending on the source, you can do this in that model's native software environment or you can import it into Blender with its armature and do it there.


The advantage of using a preexisting armature to pose a model is that it will probably be weighted to its native rig to give the best possible geometry under the pose's transformations. Any other method we try is also going to involve changing the mesh's geometry and won't be doing so using something that's optimized for that purpose and can therefore cause undesirable changes to the mesh.

If you use the source software for posing, you'll need to consult its instructions on how to export the model frozen in pose (typically exporting it as .obj will do that, but it depends on the software). When you then import the file into Blender it should be in T-pose and ready to be rigged and weighted.

Your other approach is to export the model complete with armature in a format that Blender can read and then pose your model using its own armature in Blender. Once you have it in T-pose, go to the Properties Pane's Modifiers tab and click the "Apply" button for the armature modifier. This locks the mesh in this new pose and you can then delete its old armature and begin work with the SL one.

Reverse-Posing

If your source model doesn't have the ability to be posed your next most productive approach will be to try the reverse: pose (not edit!) the SL armature to get it to be the best approximation of a pose that would mimic your source mesh's pose. You can then do a series of steps to use the SL armature to reshape it back to a T-pose.


If you have Avastar, this is extremely easy because it's a built-in feature. You simply pose the Avastar model to closely match your desired model, then use Avatar's one-click parenting utility to do the rest. This will use Avastar's build-in weight transfer to give you reasonable starting weights and it will alter your new avatar's mesh to be in T-pose. Then tweak the weights further as required.


If you don't have Avastar you'll need to do it the hard way and it has been a long time since I last did this so I hope I am remembering the correct order of steps.

  • open the SL armature (I strongly recommend using the standard one we looked at in Part IV of this series but it you want to you could also use the fitted one we used in Part V as long as it will require no edits)
  • import your desired avatar model (usually onto a different layer) which I'll call the "target" model
  • pose Ruth to closely match your target model's pose keeping a careful record of the exact bone translations you used for each and every bone
  • while still in pose mode, apply this pose as the rest pose to the armature (Pose > Apply > Apply Pose as Rest Pose)
  • add the armature modifier to your target model
  • do a weight transfer from Ruth to your target and then delete Ruth
  • optimize these weights (ie do all of your main weighting work using this modified T-pose) to have the target respond to the armature with the best overall movement and cleanest mesh transformations possible
  • refer back to your list of the bone transformations you made to go from the original SL T-pose to this adjusted one, and pose the model by reversing them...this will bring the model back into a Ruth T-pose shape
  • select your target model, go to the Modifiers tab, and click the "Apply" button to apply this reversed pose to your model
  • select the armature and apply the pose as the new rest pose (or delete this one and reload another copy of the original armature instead)
  • select the target model and add a new armature modifier to it for this armature
  • since your target already has weights for the bones it should now respond correctly to the armature although it might need some additional tweaking
Whether you have Avastar or do it the "hard" way, you should expect this to require a certain amount of fixing of your mesh since it will be deformed and stretched and probably won't have optimum topology once in its new pose.

The Even More Painful Way

If worst comes to worst, you'll have to use other mesh editing and sculpting methods to edit your original model into a SL T-pose shape but this can be an extremely frustrating and time-consuming process. I'd consider it a last resort, at best, and more likely a clear indication that you might want to remake the model from scratch or find an alternate one to work with.

If you're good at working with lattices, curves and other deformation modifiers you can give it a try, or potentially just make a custom armature for it, then use that armature to repose it as per the Pre-Pose method above. Don't expect it to be an easy or quick exercise, though.

Armature Edits

Many models will not match the SL avatar in terms of proportions, even after global scaling of them (remember to apply that scaling). This shouldn't be too surprising since the SL avatar has a rather glaring number of non-human proportions that makes one wonder if the original designer was in any way familiar with human anatomy. You can improve the physical appearance by using a more human model, but this will often require adjustments to the armature by editing it.

If you make edits to the traditional SL armature, the collision volumes and attachment points will self-adjust in response to this once in-world and with avatar weights assigned only to the standard bones this won't cause any problems at all. As long as the edits are fairly minor, most animations will continue to look reasonably good in world.

While I haven't done extensive testing of it, my initial attempts to edit the fitted mesh armature bones produced highly unsatisfactory results, making me suspect that the import mechanism doesn't faithfully respect edits to any bone other than the traditional set. This isn't really all that big an issue, though, since fitted mesh armature edits would give you no advantage at all (since you'll have to make custom clothing anyway). For a custom avatar I would stick with the standard armature unless you absolutely have to have bouncing body parts that you can't accurately preview while working in Blender.

Remember that any time you edit the armature you will need to test the range of movement response of your mesh for any parts of it that are already weighted to the affected bones. Their deforms will change if the center of bone mass or joint position changes and will need to be adjusted to reflect the new shape and behaviour of the bone.

Scaling: Giants and Tinies

You can make enormous or tiny avatars simply by scaling both the mesh and armature in Blender and applying the transformations prior to export. When you import these in-world you'll need to use a z-offset in your upload settings to get your feet back on the ground again. It's possible that someone has figured out a formula to calculate the exact necessary offset value but I haven't done enough work of this type to go looking for it so I used the good old "trial and error" method.

AO animations, dances, and other animations based on your standing position should continue to work properly in terms of bone rotations; but any that require a specific non-root avatar location (sit target) should be expected to produce highly undesirable results that find you high above (or deep below) where you're expecting to be.

As I say, this isn't an area that I work with, personally, so you might want to consult another source for more specific (and helpful and accurately tested) information if this is something that interests you.

Avatar Weighting Methodology

The standard SL avatar is a somewhat unusual one -- in industry terms -- because almost no vertices have more than two bone weights (I was tempted to write "none do" but I haven't checked each and every single one to confirm that). I refer to this as a "dual-weighted" mesh.

The fitted mesh avatar gives the illusion of having multiple bone weights -- and technically it does since you're assigning fitted mesh bone groups -- but from a practical viewpoint that still remains a simple dual-weighted mesh since the response to the bones that actually affect movement through animation continues to be almost entirely dual. The extra weights are only affected independently by shape sliders, not by animation.

Dual-weighting is extremely easy and very fast to work with. Unfortunately it doesn't result in body movement that is very natural. The real human body responds (stretches and bends) automatically to a whole series of interconnected tissue and muscle motion where no single bone or pair of bones is responded to in isolation.

It is possible to re-weight an avatar mesh to far more closely mimic real human motion by using what I call "tri-weighting" and "quad-weighting" methodologies. In this usage, "tri" and "quad" don't refer to the number of sides of a poly; instead, they refer to how many bones affect most vertices' movement.

A "tri-weighted" mesh will have a large number of vertices that react to three different bones, and only a small number at the extremities that only pay attention to a single bone or two. This can give far more realistic motion for the shoulders, neck, and torso but is a more difficult weighting method to work with since it requires balancing three weights on those vertices instead of two.

A "quad-weighted" mesh is much the same idea except some regions will be weighted to react to four bones. The areas that benefit most from this are the shoulders and hip area but it is considerably harder to balance four overlapping sets of weights than it is to manage three (and dual-weighted is infinitely easier).

In my next -- and final -- installment of this series I will give some practical guidelines for tri-weighting and quad-weighting. While those are of primary interest to people using custom avatars, the technique involved can also apply to mesh clothing for both the traditional and fitted mesh armatures.