After having created the setup for your skeleton and having modeled the character you want to animate we can attach the model (the 'skin') to the skeleton, this is called. We are going to use a method called smooth skinning for this, so the skin of the character will smoothly be deformed by the movement of the skeleton.
- your geometry has no double vertices, faces or edges
- there are no holes in the geometry
- the history of your model and the transforms are deleted
- the detail level of your character matches the precision of the movements the character needs to make
- the joints of your skeleton are oriented
- the skeleton is able to make the movements you want it to be able to make
Preparing your scene
Before we start, make sure that your character model is clean. You can use thecommand to clean up your mesh and/or the option to get rid of unwanted folds and creases. Check your model also for holes in the surface.
Place and scale the model conveniently according to the skeleton.
After making sure the model is clean and placed correctly, delete its history (select the surface and go to edit > delete by type > history) and freeze its transformations (select the model and go to modify > freeze transformations).
Because we only want to bind the skin to certain joints (for instance not to the IK and FK leg and arm, but only to the legs and arms responding to those), it is easy to create a 'quick select set' containing all the joints you want to bind the skin to. To do this, select all the joints you want to bind the skin to (it's easy to do this in the outliner) and go to create > sets > quick select:
Type a convenient name and press 'add to shelf' to create a button on your shelf with which you can easily select your joints:
You can now select the joints in this set by either clicking on the button of your shelf (remember that the button will only show when you're working on the same computer as you did when creating the button), by going to edit > quick select sets >... or by rightclicking on the selection set in the outliner and choosing 'select set members'.
Binding the skin to the skeleton
Once you've got everything ready you can start to bind the skin to the skeleton. First select all the joints you want to bind to the skin by selecting the selection set, then shift select the skin. Now go to the skin > bind skin > smooth bind optionbox:
Make sure that 'bind to' is set to 'selected joints'. A maximum influence of 3 and a dropoff rate of 2 will be sufficient in most cases:
You can see now that if you move a part of the skeleton the skin will move along with it:
It is clear Maya automatically assigned certain weights controlled by the skeleton to the vertices of the skin. Some parts of the skin do not move along the way we want though, for instance in the example below we want the neck to remain still when our character moves its head and we don't want the head to take another shape:
To get more control over how the skin responds to the skeleton we can paint weights on it to determine how much influence the skeleton has where. This will be discussed in the section below.
Adjusting skin weights
As shown above the weights of the skin are not always assigned as you would like them to be. Luckily you can adjust this by using the.
Maya uses normalization on the weights of the skin. This means that the total amount of control on a vertex always remains at the same value (1,0). This has as a consequence that when you add value to the weight of one joint on a vertex, it automatically decreases the influence of the other joints on it. This may seem as something rather unpractical, but it is necessary to make sure that one of the vertices will not move slower than other vertices when the complete skeleton and skin are translated (because the total value of all weight on that vertex could be lower that 1,0). So take into account that when you add or decrease weight of a joint on the skin that the value of the weight caused by other joints will be influenced by it as well.
The paint skin weights tool
Work in shaded mode (5 on your keyboard), select your skin and go to skin > edit smooth skin > paint skin weights tool > optionbox:
You can now see the tool settings of the paint skin weights tool and that your character's skin is shown in tones of white, grey and black:
In the viewport is shown in greytones what the influence is of the joint selected in the influence section of the paint skin weights tool settings on the vertices of the skin. The whiter the area the more influence the joint has on it.
The tool settings menu is divided in 6 sections of which we will explain 4 in more detail here.
- In the brush section you can choose the brush with which you want to brush on the weights. With the radius you can adjust the size of the brush.
- In the influence section you can choose which joint's weights you want to paint. A convenient way to work is to start with the mass of the body and move outward from there to the extremities of the body. If you work like this you will work from rough to very refined and will encounter less problems than if you work the other way around.
- The paint weights section allows you to choose what you want to do with the existing weights.
- With 'replace' checked the existing weight will be replaced by the weight given at 'value'. You can also use the eyedropper to get the value to match an already used value.
- With 'add' as a paint operation you can add weight with the specified value.
- 'Scale' decreases the influence on the vertices.
- When using 'smooth' the weights get smoothed out.
- The 'value' specifies what weight the brush will apply using the selected paint operation. You can also use minus values, this can be convenient when you want areas to have less weight than shown.
- With 'clamp' you can limit the weight to a certain range even if the brush value is set lower/higher than the lower/upper 'clamp values'.
- With the 'flood' button you can assign the set weight value to the entire selected skin. This can be useful in specific situations, but be careful with this option
- In the display section you can choose how you want the skin and brush to be showed. If you don't see any greytones make sure that color feedback is checked in the display section of the tool settings. You can also use the multi-color feedback, this gives a slightly more detailed representation of the weights used:
As mentioned before it is convenient to work from the root of the skeleton on. In this case we could start with the pelvis, but because you don't need to rotate it for any kind of motion we will start with the spine. The movement the character should be able to make is to bend forwards. When selecting the spine joint and rotating it you see that the back and chest area don't really respond as desired:
You can see that not all vertices of the upper body respond evenly to the rotation of the spine, so we are going to add weight at the top of the torso. Let's make the brush a bit smaller to a radius of 0,3. Check that the right joint is selected (in this case the spine). We are going to add weight to choose add as paint operation and decrease the value a bit. If you don't see any gray tones check the color feedback box:
Now start adding weight to the upper part of the torso by painting on the torso. You can alternate between the different paint operations and different values to get the desired weights:
Test the influence of the adjusted weights while painting to see what is happening. After adding some weight and smoothing it a bit our skin bends like this:
It's not perfect yet, but as good as it gets by just adjusting the weights of this joint. Keep in mind that adjusting the weight of other joints will most likely also influence the weight of the one we just adjusted, so it will change a bit anyway.
Now we want to start painting the weights of the joint above it, the second spine joint. Select the skin again and go to the option box of the paint skin weights tool again and choose spine2 in the transform field of the influence section influence:
You see that now the weights of the spine2 joint are shown in gray scale tones. You can now paint the weights of this joint on the skin like we did before.
The component editor
Another useful thing to use when adjusting the weights of the joints on the vertices of the skin is the component editor. Sometimes when you are painting weights one of the vertices of the skin does strange things and seems to be influenced by something that shouldn't influence it:
You could check all the joints with your paint skin weights tool, but it is easier to use the component editor to fix this. First select the vertex acting odd and open the component editor by going to window > general editors > component editor:
In the component editor open the tab smooth skins. Here you see the weights of all the joints on the selected vertex:
You can see here what joint has what weight value on the selected vertex. Here you can also see the normalization, because the total of the weights is always 1.000. You can now numerically put in the weights of the different joints (as long as the number is no bigger than 1.000), so in this case we will set the weight of spine2 to 0 to correct the vertex. The moment you press enter on your keyboard the influence will be removed from the component, the vertex will go to it's new location and the influence will disappear from your component editor:
Mirror skin weights
What can also save you a lot of time is to mirror the skin weights, so you will only have to paint the weights on one side and you will be sure that the movements will be equal on both sides. The only thing is that this will only work if both your skeleton and skin are symmetrical and if your character and skeleton are standing at the origin of the scene.
Position the pointer of the mouse over the skin. Rightclick and select Vertex. You are now in the vertex-selecting mode. Select the vertices on the side you want to mirror from (this can easily be done in the front view) and then select with shift the vertices that you want to mirror the weights to. Then go to skin > edit smooth skin > mirror skin weights and open the optionbox. Set 'mirror across' on the axis you want to mirror across. Make sure that 'positive to negative' is turned on. The surface association should be set to 'closest point on surface' and set 'influence association 1' to 'one to one':