Sub topic 3
Normalizing weights and limiting influences
This chapter assumes you can bind a mesh with automatic weights, switch to Weight Paint mode, and read vertex groups. Each vertex's weights should total 1.0 across its bone groups, and many game engines cap a vertex at four bones.
Normalizing weights and limiting influences
Normalize scales each vertex's weights so they sum to 1.0. In Weight Paint mode, open the Weights menu and choose Normalize All. Limit Total caps how many bones can influence one vertex. Run Limit Total first, then Normalize All, because capping can leave a sum below 1.0.
Mirroring weights across the X axis
Symmetric characters need symmetric weights. Enable X Mirror in the Weight Paint options, then paint on one side. Use the Weights menu and choose Symmetrize to copy the weights across. Bone names must end in .L and .R so Blender can pair left and right bones.
Cleaning and smoothing weights
Clean removes weights below a threshold, such as 0.01, so stray influence disappears. Smooth blends each vertex's weight with its neighbors. Clean first, smooth second, then normalize again.
Testing deformation in Pose Mode
Select the armature, enter Pose Mode, and rotate each bone through its full range. Watch joints such as elbows and knees. Return to Object Mode and clear the pose before you edit weights again.
Troubleshooting common skinning problems
Most failures come from three causes:
- Unapplied scale on the armature or mesh distorts deformation. Apply scale with Ctrl+A.
- The Deform checkbox is off for a bone, so that bone moves nothing.
- Too many bones overlap on one vertex, which causes twisting at joints.
Inspecting and assigning weights with Python
This script caps each vertex at four bones, normalizes the result, and prints the first ten vertices. It assumes the mesh is the active object in Object Mode.
import bpy
obj = bpy.context.active_object
# Keep at most 4 bone influences per vertex, then make each vertex sum to 1.
bpy.ops.object.vertex_group_limit_total(group_select_mode='ALL', limit=4)
bpy.ops.object.vertex_group_normalize_all(group_select_mode='ALL', lock_active=False)
# Print the remaining weights for the first ten vertices.
for v in obj.data.vertices[:10]:
for g in v.groups:
print(v.index, obj.vertex_groups[g.group].name, round(g.weight, 3))Exercise
A vertex has weights of 0.5, 0.4, 0.3, and 0.2 across four bones. What does Normalize All make these weights?
Show answer
The total is 1.4. Dividing each weight by 1.4 gives about 0.357, 0.286, 0.214, and 0.143, which sum to 1.0.