How to Create Your First Character Rig in Blender: Part 1 - Setting up the Armature
Blender is a 3D application with a wide range of tools, allowing you to create 3D models, render, rig, animate, etc. The process we'll be discussing in this article is rigging, which is a vital part of any production. Rigging is the process of creating bones and joints for the 3D models which allows the animators to pose them and manipulate them in anyway they want. The techniques and workflows for setting up character rigs are very similar across all 3D applications, but knowing the program's set of tools will ensure you're using the rigging toolset to its full capabilities. Let's go over setting up a very basic biped rig inside of Blender so you can get familiar with setting up bones as well as skinning and weight painting.
One thing that needs to be laid out on the table first is the fact that Blender features a pre-built basic bipedal rig that you can drop in and tweak to the size and shape of your 3D model. This is an extremely handy feature, however, it's important that you understand the basics of rigging, and how the tools in Blender work. The preset biped rig is really meant as a place to start from, which you can add to and tweak as needed. To really get you to understand the basics of rigging in Blender I'm going to walk you through the process of creating a biped rig from scratch. While it's certainly nice to have a "Rig Button" being able to create a rig from start to end on your own is a skill that will benefit any 3D artist.
In order to build a rig, we need something to create it for. I've gone ahead and imported the Biker character model which you can learn step-by-step how to create it in this tutorial. It's a 3D model that has been built with rigging and character animation in mind, so the topology is nice and clean.
If you're new to Blender I recommend checking out some of the introductory articles to Blender like Mastering the Blender UI and What You Need to Know When Learning Blender.
Creating the Bones for the Upper Body
To start setting up the rig we need to first place the bones. You can access the armature menu by pressing Shift+A and opening the Armature tab. You should see that you have the option of a single bone. If you select it, a new bone will get placed at the center of the grid, or where ever your 3D cursor is placed. If your 3D cursor is not placed at the center of the grid then it's best that you reset it, so press Shift+C to reset the cursor.
When you select single bone, you should see that a new bone has been dropped in at the center of the grid. Our biker character is rather large, so the bone is pretty small, you can scale it up if you need to, just to make it easier to see. We want this bone to eventually act as the root bone, which will be what we can select to control the entire character. So let's place this bone flat, as if it were laying on the floor. Go into Edit Mode, and select the top of the bone, and with the increment snap turned on rotate it in the side view until it's flat on the grid.
Now that the root bone is placed, we can start to setup the upper body. So duplicate the bone by pressing Shift+D and drag it up in the side view until it's roughly at the bottom of the pelvis, and grab the end of the bone and move it up to about the belly button of the character. If you press the "G" key you can free translate the bone, and press the axis that you want to translate it along, so in this case it's the Y Axis. You might be having some trouble seeing the bone because it's placed inside the character mesh, so unless you're in wireframe, you really can't see what's going on. Not being able to see makes it extremely difficult to rig. Luckily, this can easily be fixed by going into the properties panel and selecting the Armature properties and checking the X-Ray box in the Display tab. Now the bone is going to be visible, no matter what is in front of it.
Selecting the tip of the bone, and pressing "E" will allow you to extrude, which creates another bone. You want to continue the chain of bones all the way up to the top of the head. In all, we've created five bones to make up the torso.
It's always a good idea to name your bones as you go along, so coming up with a logical naming convention is something you should get into the habit of. The first bone we created is called hips, and second is spine, the third is chest, the fourth is neck, and finally the head. With those bones created, we've successfully established the basic setup for the upper body.
Creating the Bones for the Arm and Hand
To start setting up the arms let's first create the shoulder bone, so pop into the front view by pressing "1" on the number pad. Select the chest bone, which is the bone just before the neck bone, and duplicate it by pressing Shift+A. Position the root of the bone near the base of the neck, and the end of the joint right at the base of the arm.
Extrude the bone once to the middle of the elbow, again to the base of the wrist, and another extrusion to the base of the fingers. Don't forget to go over the bones again and rename them. You can name them whatever you want, but make sure you put "L" for left at the end of the name. This is going to help us when we mirror the rig across. So for instance, upper_arm_L.
Finally we'll need to go into the side view, and adjust the bones so that they match up in the side as well.
Creating the Bones for the Leg
Next we need to create the leg bones, so you can just duplicate the hip bone, and rotate it around until the root of the bone is positioned right around the belt line. Position the end of the bone right at the middle of the knee, extrude from the base of the knee, down to the base of the ankle.
Now go into the side view and position the bones until they fit within the leg, and then extrude from the base of the ankle, to roughly the middle of the foot, and then do one more extrusion to the end of the toes. You can also go into perspective now and tweak the position of the bones for the foot, so that match up with the model. Don't forget to name these bones, again, you want to end it with "L" to establish that these are the left leg bones.
Creating the Finger Bones
Now that we've set up the bones for the upper body, legs, and arm it's time to go back to the hand, and add the finger bones. This is the last step before we mirror the rig across.
The begin creating the finger joints we're going to take the last bone on the arm, which is the hand bone. With that selected we need to duplicate it by pressing Shift+D. You want to take the duplicated bone and move it to where the end of the bone is placed roughly at the base of the thumb, and the root of the bone is placed right toward the base of the hand. Which you can see in the image above.
You want to repeat this process for the rest of the fingers, placing the end of the joint at the base of each finger. Also, go into your perspective and side views to make sure the bones fit up where they're suppose to be inside the hand model.
Now on each finger, extrude three bones for all three joints on the fingers. Your rig should resemble the image above.
The last thing to do is parent the fingers to the hand, so shift select all the knuckle bones, and the very end joint on the hand bone and press Ctrl+P and choose "Keep Offset" Now when you move the entire hand the fingers will follow.
With the fingers completed we can mirror the leg and arm over to the other side. So marquee select the shoulder bone, the arm, hands and fingers as well as the leg. Make sure your 3D cursor is at the middle of the grid, if it's not then press Shift+C. Now press the "." key to set the pivot at the 3D cursor and Press Shift+A to duplicate, and then select the Armature menu at the 3D view header, and choose Mirror>X Local.
One last thing to do is rename the bones. If you remember all the bones of the left side of the body ended in _L for left, now all the bones on the right side of the body should end with _R. Going in an naming each bone individually would just take way too long, luckily, in the 21st century the 3D applications can do this task for us. Select all the bones on the right side of the body, and press "W" and choose "Flip Names." With one click of the button, all the bones are renamed for us.
Setting up Vertex Groups
Right now, you can go into the Pose Mode and move each bone individually; the problem with this is that as you can see the character mesh doesn't follow along. In order to actually have the mesh follow along with the movement of the bones, we need to setup Vertex Groups.
To do this we need to first select the character, and shift select the armature and press Ctrl+P to open up the parent menu and select "With Automatic Weights." This will allow Blender to calculate what part of the mesh should be assigned to what bone, of course, manual weight painting will still need to be done down the road, but it's a great starting point.
With the weights now set, we can go into Pose Mode and start manipulating the bones to see the effect it has on the mesh. Pretty awesome, right? You've now created a working character rig. While the basic rig is setup, and it's doing what it should, there are some minor things we need to change, the first is the parenting of some of the bones.
If you were to select the chest control, and started to rotate it in pose mode, you'd notice that it's not really rotating how you expect, that's because the parent between the shoulder bones and the spine needs to be changed.
You can do this by shift selecting both shoulder bones, and then shift select the spine_02 bone. Press Ctrl+P and choose "Keep Offset."
Now when you rotate the chest bone it should behave and move like a real spine. We also need to parent both leg bones to the hipbone, so shift select both leg bones, and the hip bone and press Ctrl+P and choose "Keep Offset."
Setting up Inverse Kinematics (IK)
The next step is to setup the IK system for our legs and arms, this will allow us to select just the arm bone, and move it and have the other bones follow, and the same goes for the leg.
To do this we need to apply an IK constraint to the arm. So select the lower arm bone, and go into the Bone Constraints attributes on the properties panel and choose Inverse Kinematics.
Now you need to set the target, which is going to be the entire armature. You'll also need to set the Bone, but we actually need to create a separate IK bone first.
So go into Edit Mode and select the end joint on the lower arm bone, and press "E" to extrude this out. You also want to make sure your X-Axis Mirror option is turned on, so this bone is created on the other side as well.
With the new bone selected press Alt+P and choose "Clear Parent." This will remove any parenting and disconnect the bone, and will act as the IK bone. It's a good idea to name this bone, for example arm_IK_L.
Now go back into pose mode, select the lower arm bone again, and in the Bone option select the arm_IK_L. You'll also want to change the chain length to 2, because you want the IK to affect to bones up the chain, which would be the lower arm, and upper arm.
When you select the arm_IK_L bone and translate it, it will now affect the other two bones up the chain, and now you have an IK arm! Repeat this same process for the right side of the arm. So we have the basic IK arm setup for both arms, however, there is one more step that must be taken before it can really be called done. If you've ever used a character rig before, you probably know that an IK arm also has to have a target. This target, when adjusted will let you change the position of the elbow, and this is what we're going to setup.
In order to set this up, it's very much the same as how you setup the arm IK. The only difference is that you select the elbow joint, extruding it out. You also want to make sure to press Alt+P to clear the parent. Since this is going to act as a target, in most rigs you want this to be translated out away from the character mesh so that it's easier for the animator to select it. Make sure to name these as well, so something like "elbow_IK_L."
Like you did before, select the upper arm bone, and add a new Inverse Kinematic constraint to it. Set the target to the armature, and the bone to the new target you just created so in this case it's elbow_IK_L. If your mesh jumps toward the target that's because you need to set the Chain Length, so set that to 1.
Now we have finished IK arm, go ahead and repeat this process for the right side of the rig.
As you can probably already guess, setting up IK for the legs is done in the exact same way. So create a new bone for the foot, just as you did for the hand, and clear the parent. Apply a Inverse Kinematic constraint to the lower leg and set the target to the armature, and the bone to the new IK bone you created for the leg.
With both legs completed, you now have a fully functioning character rig ready for some animation to be thrown at it! Of course, there is still some skinning to be done, as the automatic weights do not produce the most desirable results, but skinning in Blender can be saved for an article all it's own. So be sure to check back as we finish this character rig, adjust the weights, and add animation controls in the Blender articles to come.