Sub topic 5
Binding with automatic weights
This chapter covers the step that turns a static mesh and a bare armature into a rigged character: parenting with automatic weights. It assumes you can switch between Object, Edit and Pose Mode. It also assumes you know what a vertex group is and that bones have a Deform setting, both covered in earlier chapters. You don't need to have painted weights yet. Automatic weights are meant to give you a starting point for painting.
What the bind actually does
Selecting the mesh, then the armature, and pressing Ctrl+P > With Automatic Weights does three things in one step:
- It parents the mesh to the armature object.
- It adds an Armature modifier to the mesh, with the armature set as its object.
- It creates one vertex group per deforming bone, named exactly like the bone, and fills each group with weights calculated from the bone's position.
The weights come from an algorithm called bone heat. Each deforming bone acts as a heat source inside the mesh. The heat spreads through the surface, and the amount reaching a vertex becomes its weight for that bone. Vertices near a bone get high weights. Vertices that are close to two bones get a share for each. Heat travels along the mesh volume rather than through empty space, so an arm hanging next to a torso usually doesn't pick up the torso's bones.
The result is usually good enough to pose with, but it is rarely final. Expect to correct the shoulders, hips, hands and anywhere the topology is dense.
Before you bind: a checklist
Most failed binds come from the input, not from the operator. Check these first.
- Apply scale and rotation on the mesh. In Object Mode, select the mesh and use
Ctrl+A> Scale (and Rotation if needed). Unapplied or non-uniform scale distorts the heat calculation and also distorts deformation later. - Keep the armature's scale at 1 as well. If you must scale an armature, do it in Edit Mode on the bones, or apply the object scale.
- Check the Deform flag. Only bones with Deform enabled in the Bone properties get vertex groups. Control bones, IK targets and pole targets should have it off. If a bone that should move the mesh is missing a group after binding, this is the first thing to look at.
- Clean the mesh. Remove loose vertices, doubles (Merge by Distance), zero-area faces and interior faces. Bone heat needs a mesh it can treat as a solid surface.
- Place the bones inside the mesh. Bone heat works best when each bone sits within the volume it should move, not outside the surface.
- Check the bone sizes. Very short bones can fail to produce a solution on their own.
Selecting in the right order
The order of selection matters. The mesh is selected first and the armature is selected last, so the armature becomes the active object. In the Outliner, click the mesh, then Ctrl+click the armature. In the viewport, click the mesh, then Shift+click the armature.
If you do it the other way around, Blender treats the mesh as the parent target. You get no armature relationship, or an unwanted one. If the menu doesn't offer the armature options, check the selection order before anything else.
The parenting options
Ctrl+P with an armature active shows several armature entries. They differ in what weights they create.
| Option | Armature modifier | Vertex groups | Weights |
|---|---|---|---|
| Armature Deform | Added | None | None. You create groups yourself. |
| With Empty Groups | Added | One per deforming bone | All empty (no assignments) |
| With Automatic Weights | Added | One per deforming bone | Calculated with bone heat |
| With Envelope Weights | Added | One per deforming bone | Calculated from each bone's envelope size |
Use With Automatic Weights for most characters. Use With Empty Groups if you want to paint everything yourself, for example on a stylized low-poly model where automatic results are mostly wrong. Use Envelope Weights only if you have deliberately sized the bone envelopes. They are a coarse method, and they can't detect that a vertex sits on the wrong side of a thin wall.
The same bind in Python
The operator version needs the same selection state as the interface. This script checks the common problems first, then binds, then confirms that each deforming bone got a group.
import bpy
mesh_obj = bpy.data.objects["Body"]
arm_obj = bpy.data.objects["Armature"]
# The operator only runs in Object Mode.
if bpy.context.object and bpy.context.object.mode != 'OBJECT':
bpy.ops.object.mode_set(mode='OBJECT')
# Pre-bind checks.
if tuple(round(s, 4) for s in mesh_obj.scale) != (1.0, 1.0, 1.0):
print("Warning: mesh scale is not applied:", tuple(mesh_obj.scale))
deform_bones = [b.name for b in arm_obj.data.bones if b.use_deform]
print("Deforming bones:", deform_bones)
# Mesh selected, armature selected last and active.
bpy.ops.object.select_all(action='DESELECT')
mesh_obj.select_set(True)
arm_obj.select_set(True)
bpy.context.view_layer.objects.active = arm_obj
bpy.ops.object.parent_set(type='ARMATURE_AUTO')
# Post-bind checks.
group_names = {vg.name for vg in mesh_obj.vertex_groups}
missing = [n for n in deform_bones if n not in group_names]
print("Bones without a vertex group:", missing)
print("Modifiers:", [m.type for m in mesh_obj.modifiers])The type 'ARMATURE_AUTO' is the script name for the With Automatic Weights entry. The other entries map to 'ARMATURE_NAME' (empty groups) and 'ARMATURE_ENVELOPE'. Plain Armature Deform is 'ARMATURE'.
When the bind fails
If the solve can't find weights for some bones, Blender reports that bone heat weighting failed for one or more bones. Parenting still happens, and the bones that failed are left with empty or unusable groups. Bones that failed show up as bones that don't move the mesh in Pose Mode.
Work through the causes in this order:
- Unapplied scale on the mesh or the armature.
- Non-manifold or dirty geometry: loose parts, duplicate vertices, interior faces, zero-area faces. In Edit Mode, use Select > Select All by Trait > Non Manifold and Merge by Distance to find and fix them.
- Bones outside the mesh, or bones so close together or so small that the solve is degenerate.
- Separate overlapping meshes. If clothing sits tightly over a body, bind each piece on its own, or bind the clothing by transferring weights from the body later.
A practical workaround for stubborn meshes is to bind with With Empty Groups and then use Weights > Assign Automatic from Bones in Weight Paint mode. That command runs the same kind of calculation but lets you re-run it after fixing the mesh, without re-parenting.
Re-binding and what carries over
You can bind again if you change the armature or the mesh. Each case behaves differently:
- Adding a deforming bone later. Create the bone and give it a vertex group with the same name, then paint it. You don't need to re-run the whole bind, and re-running it would risk overwriting existing work.
- Renaming a bone. Rename the vertex group to match. The modifier links groups to bones only by name, so a mismatched name means that bone has no effect.
- Binding a second time. Parenting again with automatic weights on a mesh that already has groups can create duplicate parents or modifiers. Clear the old setup first: remove the extra Armature modifier, and use
Alt+P> Clear Parent if you need a clean parent relationship.
Judging the result
Don't judge the bind by the weight colors alone. Switch to Pose Mode, select the armature, and rotate a few key bones: an upper arm, a thigh, the spine, the head. You are looking for these problems:
- Vertices that stay behind when a bone moves, which means the group is empty or the weight is too low.
- Vertices that move with the wrong bone, such as a hip pulling the other leg.
- Collapsed or pinched joints, which are fixed by painting, not by re-binding.
Each of these has a repair in the following chapters. Automatic weights only need to be good enough that those repairs are small.
Exercise
You select an armature, then the mesh, and press Ctrl+P. The menu has no armature options. After fixing the selection, With Automatic Weights runs, but the left forearm bone does not move the mesh in Pose Mode. List what went wrong with the selection, and two things to check for the forearm.
Show answer
The mesh must be selected first and the armature last, so the armature is the active object. Selecting the armature first made the mesh the active object, so the armature options were not offered. For the forearm, check whether the bone has Deform enabled (if not, it has no vertex group), and check whether a vertex group named exactly like the bone exists, with weights above zero. Also look for a bone heat failure message, which points to unapplied scale or dirty geometry.