From BlenderWiki
[edit] Weight Paint mode
We're going to tell Blender which vertices in the mesh to move whenever we move a bone in the armature. While we could manually choose vertices and assign them to groups, a more powerful way to do this is with Weight Paint mode.
- First, let's make the bones a little less obtrusive. Select the armature.
- In the Armature panel under the Edit buttons, choose Stick as the draw type. This changes the bones from bulky octahedrons (which are a useful shape for building armatures) into thin sticks that don't take up as much space on the screen.
Note
In order to select bones in the armature while weight painting, the armature has to be in Pose mode.
|
- Make sure the armature is in Pose mode.
- Select the character mesh.
- Switch to the mesh's Weight Paint mode with Ctrl TAB. Similar to Pose mode for armatures, we've substituted Weight Paint mode for Object mode.
Notice the mesh turns dark blue. As you'll see, weight painting uses colors to represent information about groups of vertices.
- In the Edit buttons a new panel is now available: the Paint panel. Make the following settings:
- Change Weight to 1.0. This determines the color of the brush.
- Change Opacity to 1.0. This is how much "paint" is applied with each brush stroke.
- Turn off All Faces. This gives us a little more control over what gets painted.
- Turn off Vertex Dist. This will also give us more control.
- Leave Soft on, but this is mostly personal preference. For what we're doing, it just makes the painting look a little smoother.
- Important: Turn X-Mirror on. This will let us take advantage of our symmetrically-named bones, so we'll only have to paint one side!
The Weight in weight painting refers to the strength of a bone's influence. With the upper_arm.l bone selected, we want the vertices in the upper arm of the mesh to be influenced. So we paint them!
[edit] Weight painting the upper arm
- Select the upper_arm.l bone with RMB
. Even though we're in the mesh's weight paint mode, we can still select bones because we told the mesh we're going to be using this armature using the Armature modifier.
- Using LMB
, carefully paint over the the upper_arm.l bone with the brush. The mesh now appears red, indicating those vertices have a weight of 1.0 when it comes to being affected by upper_arm.l. Other colors indicate other weights, but for the purposes of this tutorial we will use all weights of 1.0.
- Rotate the view to get a good look at the back of the mesh. Ctrl NumPad 1 is a quick way to do this (Rear view). Paint the back side of upper_arm.l as well.
- Select the upper_arm.l bone and rotate it (r). The mesh deforms along with the bone.
- Select upper_arm.r on the other side. Notice the vertices for this bone are already painted! That's because we named the bones symmetrically (l and r) and enabled X-Mirror in the Paint panel. Blender found the bone on the other side and mirrored the weights for us.
- Select upper_arm.l again and clear its rotation with Alt r.
[edit] Tips for weight painting
Here are some tips to keep in mind while weight painting.
- The vertices you paint will be assigned to the bone you have selected.
- Make sure you paint over only the vertices you want to move with the bone you have selected. A little bit bleeding over into an adjacent bone's area may be OK.
- If you make a mistake, Ctrl Z only undoes the last step, not multiple steps. I find that the best way is to press the Clear button in the Paint panel. This clears all weights for the selected bone. Important: Clearing the weights does NOT happen symmetrically! If you aren't happy with upper_arm.l and clear it to start over on that bone, you have to select upper_arm.r and clear the weights on that bone as well. Otherwise you'll end up with residual weights on upper_arm.r that will make things unsymmetrical.
- It doesn't matter if your weights don't look exactly like those pictured here, as long as you're happy with the resulting deformation of the mesh when you move the bones around.
[edit] Weight paint the rest of the arms
- Select lower_arm.l and weight paint it. Don't forget to rotate around to the other side of the mesh to paint the back of the lower arm as well.
- Continue on down to the hand and finger bones, first selecting the bone and then weight painting from the front and back.
If you make a mistake
If you make a mistake while weight painting, Ctrl z only undoes one step. The most straightforward way to fix a mistake is to reset the weights for the bone you have selected by pressing Clear in the Paint panel, and redo the weights for that bone.
|
- Now select the finger2 bones and move them. If Auto-IK is enabled, the arms should move along with them. Auto-IK is a property of the armature, so if it's not enabled, you have to switch to Object mode, select the armature, and turn on Auto-IK.
Sometimes you'll miss painting a vertex at all. When you go to move the bones, you might see something like this:
To correct it, select the bone that should move those vertices . . .
and then paint the uncooperative vertices. They should snap back into place where they should be.
Depending on how you modeled your character, it may take some playing around with in Weight Paint mode to get the bones to deform the character correctly.
- To reset the bone rotation and location, we have to exit out of Weight Paint mode with Ctrl TAB
- Then select the armature.
- Use the A-A-Alt G-Alt R combination to clear the location and rotation of all bones.
- Re-select the character mesh.
- Switch back to Weight Paint mode (Ctrl TAB, with the armature reset to rest position.
[edit] Weight painting the head and torso
Now let's weight paint the head and torso.
- Switch to Weight Paint mode for the character mesh.
- Select the head bone.
- Paint away! Don't forget the front and back.
- With the head bone still selected, move it backward in Side view with G. Whoa! What's going on?
- By moving the head, we're able to see that we missed some vertices. It turns out that these are the vertices on the inside of the head that we couldn't see before: the inner faces of the eye sockets, and the inside of the mouth.
- To fix this, with the head bone still selected just paint over the left-behind vertices. By the way, don't worry about the eyes yet. We'll fix that momentarily.
- Reset the bones (Ctrl TAB, select armature, A-A-Alt G-Alt R).
- Go back to Weight Paint mode of the character mesh.
Select the spine bones and the neck bone, and start weight painting.
My weights looked like this:
[edit] Parenting the eyes to the head bone
When we moved the head, the eyes were getting left behind. We couldn't weight paint them to the head bone while we were weight painting the body mesh, because the eyes are separate mesh objects.
It's possible to apply an Armature modifier to the eyes, select the head bone, and weight paint the eyes to the head bone. However, this isn't the best way to do it.
Here's why: We're going to eventually make the eyes track a target. To do so, they need to swivel around their object centers. If we weight painted the eyes to the head, when we moved the head it would pull the eye vertices away from the object center, making the eye tracking all funky.
Instead, we'll parent the entire eye object to the head bone -- not just its component vertices.
- Switch out of Weight Paint mode.
- Make sure the armature is in Pose mode.
- Select one of the eyes.
- With the eye still selected, shift-select the head bone.
- Parent the eye to the head bone with Ctrl P>>Bone.
Do the same thing with the other eye:
- Select the eye
- Shift-select the head bone.
- Ctrl P>>Bone to parent to the head bone.
Now try moving or rotating the head. The eyes should follow along now.
[edit] Testing the rig
All right! Switch out of Weight Paint mode, and select the armature. You can now pose your character! Try out some test poses and test renders to play around with your new creation!
Very handy tip
So far, we've been using R to rotate. Try hitting R-R (hit it twice in a row). This enables trackball rotation, and makes positioning bones much easier than regular old rotation.
|
It'll probably take some practice to get used to the controls. Try these different methods of moving bones to see how they react differently:
- Turn Auto-IK ON.
- Select a bone and move it
- Select a bone and rotate it. Notice how Auto-IK only kicks in when you move, but not when you rotate.
- Turn Auto-IK OFF
- Select a bone and move it
- Select a bone and rotate it. Notice they do the same thing, EXCEPT when you try to move the upper arm. Moving the upper arm detaches it from the shoulder. Well, that's easy to fix: don't move the upper arm, just rotate it!
Summary
By weight painting, we told Blender which vertices to move when we moved the bones. The character finally moves! Next, we'll build the lower body armature and do some more weight painting.
|
You can download the .blend file up to this point:
Media:BSoD-ItCA-upper_body_weight_paint.blend.
Next: Lower body: armature and weight painting
Previous: Upper body: armature














![[]](/skins/blender/open.png)
