Doc:Tutorials/Animation/Armatures/Flying Bird/2:Skinning

From BlenderWiki

Jump to: navigation, search

[edit] Second Part

[edit] Skinning

Now comes the part where we make the mesh to actually be deformed by the armature. First thing is to add the "Armature" modifier to the mesh so I select the mesh object and hit Add Modifier|Armature. The "Armature" modifier should be before the "Subsurf" modifier, I want the armature to deform the non subdivided mesh, so the subdivision can work on top of it and make a beautiful smoothed surface. Actually, by the moment of writing this tutorial you can´t place an "Armature" modifier below a "Subsurf" one but in the future it might be possible.

TIP
Use TAB auto completion to quickly fill in the text buttons like this one.


Adding armature modifier


OK, the modifier has two options enabled: "Vert.Groups" (Vertex Groups) and "Envelopes". If I pose my rig right now the mesh would deform horribly by the default envelopes deformation distances but I´m not using envelopes in this one, so I´ll turn them off.


Envelopes turned off


To start weight painting make sure that the armature is in "Pose" mode and then select the mesh object, then hit Ctrl TAB to enter in "Weight Paint" mode. First I´ll paint the tail bone´s weight so I´ll select that one.


Weight Paint mode, tail selected


This is the "Paint" panel located in the "Editing" buttons F9, here you can chose your brush Weight, Opacity, Size and more. The weight value will be between 0 (dark blue) to 1 (red)


Paint panel


The red verts in the tail will be fully controlled by the tails bone, so I have paint them in red, the cyan ones will be slightly deformed by it. Now I can test the deformation just by rotating the bone.

Note
The fact that a vertex group has some verts in red doesn't mean they can´t be affected by another bone´s vertex group. For example, if two vertex groups share some vertices painted in red, each vert group will have 50% of the weight over them.


Weight painted mesh, Tail bone


When you click on a bone and start painting Blender automatically creates the vertex group for you so you don´t have to manually create and name it.

Examples of other vert groups painted the same way:


Weight painted mesh, bone: Back02
Weight painted mesh, bone: Back01
Weight painted mesh, bone: Neck01


Now this is useful!, use the Alt B view clipping to reach hidden or obstructed places in the mesh or scene, hit Alt B again to turn clipping off.


Clipped view, bone: Neck02


Some times verts are easier to select in "Edit" mode like this ones for the head vert group, the you can add selected verts to the Head bone group with the "Vertex Groups" buttons at the "Link and Materials" panel.

If there is no group already created for the bone, you can turn on "Weight Painting" for a second an paint on one of the verts just to make Blender create the group for you or you can add the group manually and name it the same as the bone.


Link and materials panel, vertex groups
Head vertex group assignment, Edit mode
Head vertex group assignment, Weight Paint mode


Here is the finished weight painted model, posed to test that everything works right. The eyes are different objects and they are not assigned to any bone yet.

I´ll parent the eyes objects to the Head bone, but first I need the armature to be back at rest position.


Armature posed, eyes unparented


Pressing the "Rest Position" button in the "Armature" panel makes the armature to temporarily take its default position, this is useful because there are situations when cleaning all the bone´s transformation values is not possible.


Armature panel, Rest Position
Armature at rest position


So I first select the eye objects, then the Head bone and press Ctrl P using the "Bone" option.


Parenting eyes to Head bone


Now I´ll just turn off "Rest Position" and I got my pose again but with the eye objects correctly parented to the Head bone.


Armature posed, eyes parented


One thing I like to do is lock the attributes I know I won´t use, all the selected bones in the image are chain roots, so in a RMB drag they will move instead of rotate like other bones in a chain, so I lock the "Loc" values and now they can´t be moved, a drag will cause the bone to start "Rotate" mode. (locking can be done in the "Transform Properties" panel)


Chain roots Location transform locking

[edit] See also