I’m going to talk a little bit about Rigging the mesh for use in Second Life, which utilizes Weight Painting. So what is Rigging about and why would you want to do it?
Rigging basically tells the viewer to let the avatar skeleton control how the mesh moves, rather than have it just hang off an attachment point, as normal attachments do. The avatar has a skeleton? Indeed it does, even though it’s not usually visible. Moving these ‘bones’ is how animations for walking, dancing, etc. do what they do.
Weight painting lets you define *how much* these bones influence the mesh when they move. So where do we begin with the harness?
The avatar shape I used as a mannequin was brought in from Second Life, thus it comes with a set of bones and has the appropriate weighting for the avatar itself included. This can be leveraged when weighting the clothing Item.
The first step is to select both our item and the SL body mesh, and copy over the weighting information. Next we parent the clothing item to the skeleton (bones) so it will use that as a reference when moving. From there, modifying this approximate base is more or less the procedure.
The weight information you get from this copy can be thought of as a rough stencil. It’s neither complete nor correct. But it can give you some clues and a starting point.
The above picture shows the weighting for the Right Hip. As you can see, only part of the strap is colored, as the strap crosses over the border between where the leg on the avatar moves and doesn’t move. How do you interpret these colors? Good question:
The colors range from Blue (0.0) to Red (1.0), where 0.0 means the mesh doesn’t move with that bone at all, and 1.0 means the mesh follows that bone as if it was directly attached. Anything in between means a varying degree of movement.
So the above weighting on the strap would be bad. The redder parts of the strap would move, The bluer parts wouldn’t move, and it would look very bizarre indeed. For the straps, We will most often want them to move as a whole. If only part of the strap moves, it will stretch and appear like rubber, which isn’t very realistic. There are instances where that may be desired, but this isn’t one of them.
For now, I use the little paintbrush you have in weight paint mode, to make all of that strap blue. I don’t want it moving with the leg, until I am sure it needs to, if at all.
Above we see the weighting for the Right Collarbone. I think I do want the over-shoulder strap to move with this, but certainly not the back plate, and certainly not half of it! 🙂 When doing the weight painting, you have to take into account how the clothing would behave just as much as how the avatar would move, to get a realistic behaviour. So for now I’ll tidy this up to what should be a more reasonable amount of movement.
One of the more painful things about weight painting is that there can be hidden vertices painted that you can’t see. But they will still move if painted and it can cause big problems. The best way I have found to locate and eradicate these is to move a joint way out of its position, and see if any stray vertices follow. If so, they can then be painted blue and taken care of.
(No avatars were harmed in the making of this photo! 😀 )
Probably the most important areas for this item will be the Chest and Pelvis, as 90% of the harness covers these areas. Lets check out the chest:
The Chest is actually in pretty good shape. The upper half is fully red, as we want it to move exactly with the chest itself. The lower straps are half-influenced (may need some touch up) since the midriff is a point where a lot of potential flexing will occur. The shoulder straps probably need some work, I’ll have to try some different weights and see. Since they move with the Chest *and* the pelvis, this is where the real magic must be worked.
Thankfully, SL allows parts of the mesh to be influenced by up to 4 different bones, so there can be some overlap. It does get a little complex working out all the interactions between different bones, though. One good thing is that Blender allows you to load animations from BHV, so you can check out your design in a myriad of poses, and tweak your weights as you go. That’s really all there is to it, getting everything to move just right.
I’ll post again when I have some weighting I’m happy with, and explain a little about how I got there. Until then…