Sub topic 9
Normalizing Weights and Limiting Influences
Assume you know how to bind a mesh to an armature and enter Weight Paint mode. You should also understand vertex groups and basic mesh selection. This chapter focuses on keeping weights mathematically consistent after automatic binding or manual painting.
Why weight normalization matters
A vertex can be influenced by several deforming bones. Each influence has a weight from 0.0 to 1.0. The Armature modifier combines those influences when it calculates the vertex's final position.
For predictable deformation, the weights for one vertex usually add up to 1.0. This process is called normalization. For example:
| Bone | Weight |
|---|---|
| UpperArm.L | 0.70 |
| Forearm.L | 0.30 |
| Total | 1.00 |
If the total is 0.6, the vertex may not move as expected. If the total is greater than 1.0, the vertex can move too far or produce unwanted volume changes.
Normalization changes the existing weights proportionally. Suppose a vertex has weights of 0.4 and 0.2. Their total is 0.6, so normalization changes them to approximately 0.667 and 0.333. The relationship between the influences stays the same.
Limit the number of influences
Game engines often limit the number of bones that can affect one vertex. Four influences per vertex is a common limit. Extra groups with the smallest weights are removed, and the remaining weights should then be normalized.
Use this order:
- Limit the total number of influences.
- Normalize the remaining weights.
- Test the result in several poses.
In Weight Paint mode, enable Auto Normalize when you want each brush stroke to keep the affected vertex weights balanced. This is useful during painting, but it does not replace a final normalization pass.
import bpy
# Select the mesh before running this script.
obj = bpy.context.active_object
if obj is None or obj.type != 'MESH':
raise RuntimeError("Select a mesh object first")
if obj.mode != 'OBJECT':
bpy.ops.object.mode_set(mode='OBJECT')
# Keep no more than four bone groups on each vertex.
bpy.ops.object.vertex_group_limit_total(
group_select_mode='ALL',
limit=4,
)
# Make the remaining weights on each vertex add up to 1.0.
bpy.ops.object.vertex_group_normalize_all(
group_select_mode='ALL',
lock_active=False,
)
print("Influences limited and weights normalized.")The lock_active=False setting allows Blender to change every selected group. A locked group keeps its value while Blender adjusts the others, which is useful when you need to preserve a specific influence.
A reliable cleanup pass
Very small weights can create unnecessary bone influences. After limiting and normalizing, use Clean with a small threshold, such as 0.01, to remove nearly zero memberships. Then normalize again. Do not use a large threshold near joints, because small weights can help create smooth transitions.
The processing order
Check the result
Inspect vertices around shoulders, elbows, hips, and knees. These areas need blended influences. A hard boundary may indicate that one bone owns too many vertices. A collapsing joint may indicate that useful transitional weights were removed.
Exercise
A vertex has weights of 0.5, 0.3, 0.1, 0.05, and 0.05, but the engine allows four influences. What should you do?
Show answer
Remove one of the 0.05 influences, then normalize the remaining four weights so their total is 1.0.