Sub topic 12
Edge flow for animation and deformation
This chapter assumes you can model with the Subdivision Surface modifier, place edge loops, and move poles, as covered in the earlier chapters. It also assumes you know what an Armature modifier is and have seen a basic rig. You do not need to build a rig here. You only need to know that bones move vertices.
Why deformation changes the rules
A static model only has to look good in one pose. A deforming model has to look good in every pose it will reach. The edge flow that works for a statue can fail at an elbow.
When a bone rotates, the vertices it controls move along arcs. Edges that follow the surface smoothly in the rest pose can stretch, fold, or collapse in a bent pose. The topology decides where the mesh has enough vertices to bend without kinking, and where it only has to hold a shape.
Two goals sometimes pull against each other:
- Clean subdivision wants quads, few poles, and loops that follow the form.
- Clean deformation wants loops that follow the direction of movement and extra density where the surface folds or stretches.
Usually both goals agree, and the rest of this chapter focuses on those cases. Where they disagree, the fix is a compromise, covered near the end.
Loops that wrap around the bend
Joints bend around an axis. The most reliable rule is to run edge loops perpendicular to the bending axis, so they wrap around the limb like rings. A bend then compresses loops on the inside of the joint and spreads loops on the outside. Both cases are easy for the mesh to handle.
If loops run along the length of the limb, or cross the joint diagonally, the bend has to shear faces. They twist and the surface creases in an ugly way.
How many loops at a joint
A joint needs enough loops to describe a curve in the bent pose, so more than a straight cylinder would need. A common starting point for an elbow or knee:
- One loop at the joint center, where the bend is sharpest.
- One loop on each side of the center, which gives the curve a smooth transition.
- A loop placed further out on each side to hold the limb's cross-section shape.
Three loops at the joint is the minimum for a smooth bend. Five gives better control for a character that bends deeply. Long straight sections such as the upper arm between shoulder and elbow need only a few loops, because nothing there bends.
Density follows motion
Put the density where the surface moves, not where the detail looks interesting. A forearm that never bends can stay sparse. A knuckle, a knee, and a neck need more loops because they fold, stretch, or twist.
Anatomical joints in practice
Elbows and knees
An elbow bends one way. The inside of the bend has to fold, so the loops there get closer together. The outside has to stretch, which means the loops spread out. Place the center loop slightly toward the outside of the bend to give the joint room. Keep the loops evenly shaped, with no triangles or poles at the very center of the bend.
Shoulders
Shoulders move in almost every direction, so no single loop direction works for all poses. The usual solution is a pole at the shoulder, with loops radiating from it like a star. The pole sits where several loops meet: the arm loops, the chest loops, and the loops over the shoulder cap.
Poles are normally something to avoid, but here they carry a deformation job. Put the pole where the surface moves little relative to the bone. Do not put it on the underside of the arm pit, where the fold is deepest. Move it up onto the shoulder cap or sideways onto the deltoid, then test it with the arm raised.
The face
Faces deform with muscles that wrap around openings. Edge flow around the eyes and mouth should be concentric loops, meaning nested rings that match how the sphincter muscles close those openings. A loop of edges around the mouth lets the lips pucker, stretch into a smile, or open for speech. The same applies to the eyes, where eyelid loops let the lids close without tearing the surface.
Lines on the cheeks and forehead follow the creases that expressions make. A loop that runs along the nasolabial fold (the line from nose to mouth corner) holds that crease when the character smiles.
Faces put the most demands on poles. Typical placements are at the mouth corners and the sides of the nose, where flow switches from concentric to radial. The surface there moves less than at the lip centers, so a pole causes fewer problems.
Rest pose and modifier order
Choosing the rest pose
Model the character in a pose that makes both deformation and weight painting easier. Two common choices:
| Pose | Arms | Advantage | Drawback |
|---|---|---|---|
| T-pose | Straight out at 90° | Easy to model symmetrically and to unwrap | The shoulder is stretched at rest, so lowering the arm squashes the armpit |
| A-pose | Down at about 45° | Closer to the average working pose, so shoulder deformation is milder | Slightly harder to model the armpit area cleanly |
Many artists prefer the A-pose because the shoulder needs to deform less in the most common positions. Whichever you pick, keep a slight bend in elbows and knees in the rest pose. This tells the rig which way the joint folds, which prevents the joint from flipping backward during the first bend.
Armature before Subdivision
The Armature modifier must come before the Subdivision Surface modifier in the stack. The armature moves the base mesh vertices first, then subdivision smooths the result. If the order is reversed, Blender subdivides the mesh and then tries to deform the far denser result, which is slower and can change how weights behave.
import bpy
obj = bpy.context.active_object
rig = bpy.data.objects.get("Armature") # name of your armature object
if rig is not None and rig.type == 'ARMATURE':
arm_mod = obj.modifiers.new(name="Armature", type='ARMATURE')
arm_mod.object = rig
subsurf = obj.modifiers.new(name="Subdivision", type='SUBSURF')
subsurf.levels = 2
subsurf.render_levels = 3
# New modifiers are appended, so the stack order is now:
# Armature first, then Subdivision Surface.
print([m.name for m in obj.modifiers])
else:
print("No armature object named 'Armature' found.")The script adds modifiers in the order you want them. If your stack already has a Subdivision Surface modifier, drag the Armature modifier above it in the Properties editor.
Testing topology with poses
Do not trust topology until you have bent it. A quick test that costs little:
- Add a simple armature or use your rig.
- Parent the mesh with automatic weights (Ctrl+P, then With Automatic Weights).
- In Pose Mode, bend each major joint to the extremes of its range.
- Watch for creasing, collapsing volume, or stretched faces.
- Fix the topology, then repeat.
Automatic weights are rough, so some problems come from weights and not from topology. A way to tell the difference: if the surface kinks along a clean line between two loops, add a loop there. If the whole region looks soft or blurry, paint weights instead.
Common deformation faults
| Symptom | Likely topology cause | Fix |
|---|---|---|
| Elbow pinches inward and loses volume | Too few loops at the joint | Add loops each side of the center loop |
| Knee surface creases diagonally | Loops cross the joint at an angle | Reroute loops perpendicular to the bend axis |
| Shoulder collapses when the arm raises | Pole placed in the fold | Move the pole onto the shoulder cap and add radial loops |
| Lip corners tear or flatten during smiles | No concentric loops around the mouth | Add a ring of loops around the mouth |
| Twisted forearm looks like a wrung cloth | Loops bunched at one end | Space loops evenly along the forearm |
When subdivision and deformation disagree
Sometimes a loop that helps deformation adds a pole or an extra face that subdivision handles poorly. Three rules help you decide:
- Prefer deformation in moving regions. A small subdivision wrinkle in a deep joint is less visible than a broken bend. Animation shows the joint in motion.
- Triangles are acceptable in rigid regions. If a triangle sits in an area that never deforms, such as the top of the skull, it may cause only a faint shading ripple.
- Check poses before polishing. Do not spend time perfecting rest-pose shading on a region you have not yet bent.
For game assets that skip subdivision, deformation is the only concern. The mesh you export is the mesh that deforms, so the density of loops at joints matters more, because no smoothing hides coarse bends.
Exercises
Exercise
A character's knee creases diagonally when it bends, and the loops in that region run at an angle across the joint. What is the likely cause, and what is the fix?
Show answer
The loops are not perpendicular to the bending axis, so the bend shears the faces instead of compressing and spreading them evenly. Reroute the loops so they wrap around the leg as rings at the knee, with at least three loops at the joint.
Exercise
Why must the Armature modifier come before the Subdivision Surface modifier in the stack?
Show answer
The armature should deform the low-resolution base mesh first, and subdivision should then smooth the deformed result. If subdivision comes first, the armature has to move a far denser mesh, which is slower and can change how the weights behave.
Exercise
You are placing the pole where shoulder loops meet. Name one area to avoid and one area that is better, and explain the reason.
Show answer
Avoid the underside of the arm near the armpit, because that is where the surface folds most deeply and a pole there will pinch. A better place is the shoulder cap or the side of the deltoid, where the surface moves less relative to the bone.