Sub topic 15
Building a Simple Arm Rig with Control Bones
This chapter assumes that you can create an armature, switch between Edit Mode and Pose Mode, and insert basic keyframes. You should also understand that a pose bone is the runtime version of a bone used for posing, while an edit bone defines the armature's rest pose.
A useful arm rig separates the bones that deform the mesh from the bones that control the pose:
upper_armandforearmdeform the character.hand_ikmoves the hand through an IK target.elbow_polecontrols which way the elbow bends.- Control bones usually have deformation disabled.
Plan the Control Bones
Place the hand target beyond the wrist and place the elbow pole in front of the elbow's intended bend direction. The exact positions depend on the arm's orientation and the character's coordinate system.
The IK target determines where the end of the chain goes. The pole target removes the ambiguity about the elbow's direction.
Create the Arm and Controls with Python
Run this script in Blender's Scripting workspace while in Object Mode. It creates one armature, a two-bone deforming chain, and two non-deforming control bones.
import bpy
import math
arm_data = bpy.data.armatures.new("ArmRig")
rig = bpy.data.objects.new("ArmRig", arm_data)
bpy.context.collection.objects.link(rig)
bpy.context.view_layer.objects.active = rig
rig.select_set(True)
rig.show_in_front = True
bpy.ops.object.mode_set(mode="EDIT")
bones = arm_data.edit_bones
upper = bones.new("upper_arm")
upper.head = (0, 0, 0)
upper.tail = (1, 0.1, 0)
fore = bones.new("forearm")
fore.head = upper.tail
fore.tail = (2, 0, 0)
fore.parent = upper
fore.use_connect = True
hand = bones.new("hand_ik")
hand.head = (2, 0, 0)
hand.tail = (2, 0, 0.3)
pole = bones.new("elbow_pole")
pole.head = (1, 2, 0)
pole.tail = (1, 2, 0.3)
bpy.ops.object.mode_set(mode="POSE")
arm_data.bones["hand_ik"].use_deform = False
arm_data.bones["elbow_pole"].use_deform = False
ik = rig.pose.bones["forearm"].constraints.new("IK")
ik.name = "Arm IK"
ik.target = rig
ik.subtarget = "hand_ik"
ik.pole_target = rig
ik.pole_subtarget = "elbow_pole"
ik.pole_angle = math.radians(-90)
ik.chain_count = 2The constraint belongs on the last deforming bone, forearm. A chain count of 2 includes forearm and upper_arm. Move hand_ik in Pose Mode to test the chain, then move elbow_pole if the elbow points in the wrong direction.
Keep Controls Separate from Deform Bones
| Bone | Role | Deforms the mesh |
|---|---|---|
| `upper_arm` | IK chain member | Yes |
| `forearm` | IK constraint owner | Yes |
| `hand_ik` | Hand position target | No |
| `elbow_pole` | Bend direction target | No |
Test the Rig
Select hand_ik, move it, and rotate it. The arm should follow while the elbow aims toward elbow_pole. If the elbow flips, check the pole position and adjust pole_angle in small increments. If the whole arm moves unexpectedly, verify that the target bone is not part of the IK chain.
Exercise
Why should the hand IK target and elbow pole be non-deforming control bones?
Show answer
They provide pose inputs without adding unwanted bones or transformations to the character mesh.