Weight Copy

Glossary: Skinning

Skinning is the process of creating an association between a Mesh (the Skin) and a Rig. More specifically in the Skinning process we define associations for each bone of the Rig’s Skeleton to each vertex of a mesh. In practice, for a polygonal mesh character, each bone is associated only with a subset of the character’s vertices.

Portions of the character’s skin can be influenced by 2 or more bones, where each vertex of the affected area gets an influence factor to each associated Bone. This factor is also called Vertex Weight. Thus the influence of each bone on a specific Vertex is defined by its Vertex Weight.

The process of Skinning includes:

  • Binding the Character to the rig in a specific Pose (basically establishing an association between the Rig and the Mesh)
  • Weighting the Mesh to the Armature bones (create the Vertex Weights)

 

Once you have bound your custom mesh to an Avastar rig, you either can use Blender’s weight tools or you can use Avastar’s Weight Copy Panel to change or generate additional weights for your meshes.

The weight Copy panel is admittedly complex. However it is still well organized and once you understand its elements and how they interact, weight copy should no longer be a mystery for you.
 

Important: When you have selected an avastar Mesh, then the Weight map control section is not shown. Weight maps can only be reliably created for custom meshes.

 

The Weight Copy Tool is accessible from 2 different places:

1.) While attaching a Mesh (Binding)...

When binding a mesh to an Avastar rig you have access to a simplified user interface of the Weight Copy tool. This is for creating initial weight maps for your mesh(es). In the image on the right you see the armature (orange) and the shirt(semi transparent) selected. In this example the weight copy will project the weights of the upper body onto the weights of the shirt. For more detailed information see the Reference guide Binding(Assign to Armature).

 

2.) In the separate Weight Copy Panel (for already bound meshes)...

The full Weight Copy Panel appears only for Already bound meshes. The Panel is divided into three subsections:

Strategy

Avastar supports various weight transfer methods(strategies):

  • 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 Algorithm
  • Create Empty Groups:
    Generate empty weight maps for all deform bones

Scope (Target Bones)

The Scope is the set of Target bones for which weight-maps shall be created. The scope can be one of:

  • (Create only for) Selected Deform Bones
  • (Create only for) Visible Deform Bones
  • (Create for all) Enabled Deform Bones

Enabled Deform Groups

The Enabled Deform Groups define the set of bones which Avastar takes into account when it actually calculates the individual weights for each vertex. The reason for having a set of selected bones (target weight maps) and a set of enabled deform groups (bones) is related to how the weight maps are actually generated. That is:

All enabled deform bones contribute to the final values in the weight maps, while the target weight maps only say for which bones weight maps can be created.

In summary: The final data in the created target weight maps largely depends on the set of enabled deform groups.

Options

  • X-mirror:
    on a symmetric rig you can select just one side of the bones and enable x-mirror to make sure both sides (symmetry) are used for creating weight maps
  • Keep empty maps:
    By default Avastar cleans up the weight map list by removing maps that have no weights assigned to vertices. Enable this option to keep empty maps in the list
  • Clear weights
    Remove all weights before generating the new weight maps. When you use the weight map controller in edit mode then you can create weights only for selected vertices (see below). In that case you might want to keep the weights intact for all other (not selected) vertices in the mesh. this is the situation where you might want to disable this option.
  • Selected verts
    When you use the weight map controller in edit mode then you can create weights only for selected vertices. This is the situation where you probably want to disable the clear weights option (see above)

More Weight copy tools can be found in the Tool Box Panel

 

A Gentle reminder

Avastar can not create perfect weights!
Especially when you try to copy weights from other meshes you have to refine the weights manually in almost every case. All that you can achieve is to get a starting point for your work. This may work nicely, or not.
For Fitted Mesh:
If you are trying out the Fitted Mesh Weighting, then we recommend to avoid using the default Avatar weights. Please consider to use Automatic Weight from Bones instead. That gives better results in many cases. Blindly using the weights from the default Avatar never works!

The example below shows 3 identical meshes: The left mesh is weighted to the classic mBones, the right mesh is weighted to the Collision Volumes (cBones) using the same weight values.

sls-4-35

The character in the center gets the full treatment of mBone weights plus mesh deforms (shape keys). This character is equivalent to the default Avatar in SL using the same Gnome shape.

For Fitted Mesh (Collision Volume Bone weighting) you can get much better results when you hand optimize the weights.

Operator Panel Properties

Depending on the chosen Strategy the operator Redo panel is setup with different extra options. Remind: The operator panel is always displayed after you have called the “Update Weights” function. The operator Redo panel pops up at the bottom of the Tool Shelf:

Facemap Generator:

This is a very special setup for an interactive face weight generation. Yes, this is only for creating weights for the Bento face bones!

Right after you clicked the Update Weightmaps button, an Operator Redo Window opens up (in the Tool Shelf lower left corner) where you can specify parameters to optimize the weights for the selected bone collection. Please play with the settings to get an idea how the generator works

Image413

Swap Weight Groups:

Exchanges Weight Gr0ups for Collision Volumes with the corresponding Weight Groups for the corresponding SL Base Bones (moves mbone Weight Groups to cBones, and cBone Weight Groups to mBones)

  • Keep Groups
  • Clear weights
  • Selected verts

Copy From Extended:

We have added Special weightmaps for Head and upper body which take care of the weights for the face and the hands.

Note: Those weight maps have been created manually and they are just meant as proposal for your meshes. You will need to fine adjust the weights in any case!

See below for the description of the extra options .

Image414

Copy From Avastar:

Use the Avastar character Meshes as Weight Sources. For this option you can exactly specify which of the Avastar Dummy Meshes shall be taken into account. it does not matter if the Avastar meshes are visible or not.
  • Keep Groups
  • Clear weights
  • Selected verts
  • Interpolate
  • Weights from Avastar (selection table)

Copy From Meshes:

Use All meshes which are also attached to the same Avastar Armature and which are currently Visible.
  • Keep Groups
  • Clear weights
  • Selected verts
  • Interpolate

Automatic From Bones:

Use Blender’s internal Weight generator by calculating the weights from the Bone configuration. This works remarkably well in most cases. However you often need some minor adjustments especially where the Custom Mesh shall behave similar to the underlying SL Avatar mesh (for tight clothes).
  • Keep Groups
  • Clear weights
  • Selected verts

Create Empty Groups:

Checks all deform Bones for existing Weight Groups. Adds missing Weight Groups as empty Groups where needed.

 No options available

The weight Generator Options in detail

  • Keep Groups: When during the copy process some previously existing weight groups get empty, they will be deleted by default. If this option is set, all empty weight groups will be kept.
  • Clear weights: Normally the weight copy is additive, that is, when Weights already exist in the Target mesh, then weights which are not copied from the source but exist in the target will be kept. When this option is set, the source weight groups will be cleaned before the copy takes place.
  • Selected verts: Normally the weight Copy copies the entire weight groups. when this option is set, then only weights for the selected verts (in the target meshes) will be replaces or added.
  • Interpolate: Normally weights are copied from the source meshes by determining the closest vertex to the destination mesh. When this option is enabled, then weights are interpolated from neighboring source verts as well. This can give smoother results at times.
  • Weights from Avastar: (Only available when Copy from Avastar is set as weight source) You can specify exactly which Avastar meshes shall contribute in the weight copy.

The default Shape

Avastar’s default Shape is exactly the same as the SL Default shape that you get when you create a new Shape in the SL Viewer, see images below for comparison:

Image008

Avastar Default Shape

default_shape

SL Default Shape