Copy Bone Weights
The Weight copy tool is used to copy the mesh weights from sibling meshes and from other bones within the mesh skeleton (rig). Actually we support Weight copy at 3 different places:
1.) While attaching a Mesh
During parenting a mesh to an Avastar rig you can enable an initial Weight copy from all visible siblings to all bones of the parented mesh. In the image on the right you see the armature (yellow) and the shirt(semi transparent) selected. Initial weight copy will project the weights of the upper body into the weights of the shirt. For more detailed information see the Reference guide
2.) While skinning a Mesh
Avastar supports various weight transfer methods in the Weight map control section in the Skinning Tools panel:
- Face Map Generator: Generate weights for face bones
- Swap Weight Groups: Exchange mBone weights with Volume bone weights (fitted Mesh)
- Copy from Extended: Copy from Bento weight maps instead of SL Weight maps
- Copy from Avastar: Copy from SL Weight Maps
- Copy from Meshes: Copy weigths from all other visible meshes bound to same Armature
- Automatic from Bones: Generate Weights with Bone Heat Algorythm
Avastar can pre configure a Mesh to use either of the weighting patterns. For details read the Skinning section.
Note: Of course you can also manually mix mBones and volume Bones (fitted Mesh) manually. But you may get better results when using the Fitting Panel.
3.) In the Armature Tools panel (Weight Paint Mode)
While working on the weights of a mesh in Weight Paint mode you can do a weight copy on a bone by bone base. The details are described in the weight copy tool reference below. For details read the Vertex Tools section
The Weight Copy Tool Reference
Below you find all Copy tools explained in more detail.
Selected to Active Bone
If you want to copy from another bone, then you must ensure that you have selected exactly 2 bones, where the source bone must be selected first while the target bone is SHIFT Selected second (so the target bone becomes the active bone)
Note: The target bone’s weights will be entirely replaced by the weights from the source bone, not added or merged!
Mirror from Opposite Bone
If you want to mirror copy then you only have to select the target bone(s). You can select a set of bones. Avastar will perform the mirror function on each selected bone.
Note: If you have Sparkles-Pro then you get the additional option Shape Mirror Copy which is less accurate but works in any case even if the topology is completely different on both sides of the mesh.
Details about Mirror Copy
A common pitfall with Weight Copy happens when your mesh is slightly asymmetric. on the next image you see an example:
The boots look pretty much equal, so you have the impression that a weight copy should be no big deal. But actually i have moved the left boot slightly out of symmetry, so all vertices have a small offset from perfect symmetry. And you can not see this slight asymmetry by just looking at it.
Lets assume you have carefully weighted the left boot and now you want to mirror copy the weights from the left ankle to the right ankle.
So you will select the right ankle bone, and then perform a Mirror from Opposite Bone. But you end up with the weights not mirrored. In the image you see the weights are not copied to the right ankle as expected, but the weights remain on the original vertices.
Whenever you see this happen you can be sure that your mesh is not exactly symmetric. In that case you can try a topology mirror copy, but unluckily this has its own pitfalls as well…
So lets try to do a mirror copy with topology mirroring enabled (select Topology in the selector right to the Bone Mirror Copy Button). In my case i ended up with a very strange result as you can see in the next image.
The problem with topology mirroring is that the used function needs a more complex mesh to identify the mirrored vertices. I have not fully understood how it works, but apparently it does not work for low polygon meshes, hence Topology mirroring is in general not suitable for game engine development.
Stepping out of the pitfall
So if you have the situation that i just have explained above, then you have 2 options to proceed:
- Either you decide to use Blender’s Symmetrize function (in edit mode Mesh -> Symmetrize)
- Or you can decide to delete half of your mesh and use a Mirror modifier to fix this issue. Using the mirror modifier has the nice extra advantage that your weights get automatically mirror copied when you apply the modifier.
However, if you are working with slightly asymmetric meshes, then you might not be able to use mirror weight copy. Then you only can weight both sides of your mesh manually.
Side note: In our new Blender Add-on Sparkles-Pro we have added an additional Shape Mirror Copy which is less accurate but works in any case even if the topology is completely different on both sides of the mesh. So if you are lazy and you want the one click solution, you may want to check out the Sparkles Pro tool.
Note: If you select a bone AND its mirrored bone, then only one of the bones will be mirrored. That is: We do NOT swap the weight data and thus you always end up with a symmetric result! This may not be what you want in all cases.
Swap Collision with Deform
Each classic mBone is related to a corresponding fitted mesh cBone. Hence when you select any of the Deform bones the tool knows which is the counterpart bone according to the table below.
Each time when you call the tool, the weights of the selected Bone(s) will be swapped with the weights of their corresponding counterpart.
|mCollarRight, mCollarLeft||R_CLAVICLE, L_CLAVICLE|
|mShoulderRight, mShoulderLeft||R_UPPER_ARM, L_UPPER_ARM|
|mElbowRight, mElbowLeft||R_LOWER_ARM, L_LOWER_ARM|
|mWristRight, mWristLeft||R_HAND, L_HAND|
|mHipRight, mHipLeft||R_UPPER_LEG, L_UPPER_LEG|
|mKneeRight, mKneeLeft||R_LOWER_LEG, L_LOWER_LEG|
|mAnkleRight, mAnkleLeft||R_FOOT, L_FOOT|
Important: The grey relations are ambiguous thus they are ignored by the Swapping Tool![/symple_toggle_sub]
This option removes all Weigth Groups with no defined weghts, or where all weights are zero. Additional settings become available in the Operator Redo Panel
Check Bone Hierarchy (only enabled for Armatures)
Check Bone Hierarchy
This tool is only available for Armatures. It just checks if the current Armature has a bone hierarchy that is compatible to Secondlife.
Note: The bone hierarchy does not need to be complete. It only needs to have the bone parent/child hierarchy of the included bones equal to the bone hierarchy in Secondlife.
Right after you have called the function, you see the result displayed in the Operator redo panel. This is just a convenient way to get you informed.
The green Animation Bones in the Avastar rig are in general not restricted regarding hierarchy, so they can be rearranged to your likes. However you must take care of a few things here:
- Should you ever try to use the Update Tool your custom hierarchy gets reverted.
- Changing the Parent hierarchy might not work nicely together with the Appearance sliders.
- Pelvis-PelvisInv-COG is a critical section. Changing the bone hierarchy here can be troublesome.
Add Missing Mirror Groups
Add missing Mirror Groups
For each existing bone which has a Mirror symmetric bone defined (e.g. mCollarLeft – mCollarRight are mirror symmetric bones) Avastar checks if both bones of the pair have weightmaps defined and creates the maps if they do not yet exist.
Note: Symmetry maps are only created when both bones of a symmetry pair actually exist in the Rig.
Copy from Rigged
Copy from Rigged
Copy Weightmaps from other Mesh objects rigged to the same armature.
Weights are copied from the closest vertices from other meshes. If 2 or more vertices are located at the same position, then it is not defined which weight will be transferred to the active Object.
If you want to copy weights from other meshes (weight sources) to a mesh (weight target), then all source meshes and the target mesh must be siblings of the same armature. (all meshes must be attached to the same armature). All currently selected bones will become Copy targets in that case.
Note: Only visible weight sources are taken into account. Hence at least one weight source (mesh) must be visible.
Note: If you want to do a full weight Copy, then you only need to select all SL Bones (the blue ones) as seen in the image to the right.
Note: Custom meshes can also be used as Sources for a Weight Copy, provided they are siblings of the active Mesh!
Note: the topology of the source meshes and the target mesh may be different!
Copy from Selected
Weld to Rigged
Weld to Rigged
When 2 meshes have adjacent edges, then in almost every case you may want to ensure that the weights on the matching vertices also match. This avoids that the verts along the adjacent edges move differently when animated.
Now lets say both Meshes have been weighted by hand and naturally the weights at the adjacent edges are slightly different. In our case i have deleted the weights of the Skirt-mesh along the mesh border as a demo.
This is where the Weld to rigged functions comes as a rescue, as it simply ensures that adjacent vertices on both meshes have exactly the same weights.
Note: Actually the tool does not take an average weight, but it copies the weights from the adjacent mesh (the Top-Mesh in this case).
So when you display the weight maps of both Meshes after the Weight welder was applied, then you see that now both meshes can be animated in parallel with no visual gap along the mesh borders.