Sub topic 7
Binding a Mesh with the Armature Modifier
This chapter assumes that you can navigate Blender, switch between Object, Edit, and Pose modes, and understand basic object parenting. You should also know that a vertex is a point in a mesh and that a modifier changes how Blender evaluates an object.
An Armature modifier makes a mesh follow an armature. The modifier reads the armature’s bone transforms and the mesh’s vertex groups. A vertex group is a named set of vertices. When its name matches a deforming bone, the group’s weights tell Blender how strongly that bone affects each vertex.
How the binding works
A normal binding has three parts:
| Part | Purpose |
|---|---|
| Armature object | Provides the skeleton and its bone transforms |
| Armature modifier | Applies the skeleton’s deformation to the mesh |
| Vertex groups | Store which bones affect which vertices and by how much |
The usual workflow is:
- Select the mesh.
- Shift-select the armature.
- Press
Ctrl+P. - Choose With Automatic Weights.
Blender adds an Armature modifier to the mesh, creates vertex groups named after the bones, and estimates weights from the mesh shape. The mesh then deforms when you pose the armature.
Inspecting the modifier and weights
Select the mesh and open the Modifiers tab. The Armature modifier should point to your armature object. If the object field is empty, choose the armature manually.
In the mesh’s Object Data Properties, open Vertex Groups. A group named upper_arm.L, for example, must match the corresponding bone name exactly. Blender uses this name to connect the group to the bone.
A weight of 1.0 means full influence. A weight of 0.0 means no influence. Smooth deformation usually requires several nearby bones to share vertices with partial weights.
import bpy
# Select an existing mesh and armature by name.
mesh_obj = bpy.data.objects["CharacterMesh"]
arm_obj = bpy.data.objects["CharacterRig"]
# Create a group matching the deforming bone name.
group = mesh_obj.vertex_groups.get("upper_arm.L")
if group is None:
group = mesh_obj.vertex_groups.new(name="upper_arm.L")
# Assign selected mesh vertices with full influence.
vertex_indices = [0, 1, 2, 3]
group.add(vertex_indices, 1.0, "REPLACE")
# Connect the mesh to the armature.
modifier = mesh_obj.modifiers.get("Armature")
if modifier is None:
modifier = mesh_obj.modifiers.new(name="Armature", type="ARMATURE")
modifier.object = arm_objThe script expects objects named CharacterMesh and CharacterRig. It demonstrates the same relationship created by automatic parenting.
Common errors
- The modifier points to the wrong armature.
- A vertex group name does not match a bone name.
- The armature is not in the modifier’s object field.
- The mesh has unapplied scale, causing unexpected deformation.
- The wrong bone is marked for deformation.
- The mesh has poor topology around a joint.
After automatic binding, pose an elbow or knee. If the joint collapses or nearby geometry moves incorrectly, use Weight Paint Mode to inspect and refine the influence.
Exercise
Why does an Armature modifier need vertex groups with bone names?
Show answer
The modifier uses those matching names to find which vertices each bone can deform and uses the stored weights to calculate the amount of influence.