Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
3D Character Rigging in Blender

You're reading from  3D Character Rigging in Blender

Product type Book
Published in Apr 2024
Publisher Packt
ISBN-13 9781803238807
Pages 164 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Jaime Kelly Jaime Kelly
Profile icon Jaime Kelly

Table of Contents (14) Chapters

Preface 1. Part 1: An Introduction
2. Chapter 1: Introduction to Rigs and Terminologies 3. Chapter 2: Starting with Bones 4. Part 2: Rigging
5. Chapter 3: Using Weighting Tools to Give Life to a Mesh 6. Chapter 4: Beginning the Rigging Process 7. Chapter 5: Getting Started with Weight Painting 8. Part 3: Advanced Techniques
9. Chapter 6: Using IK and Rig Controls 10. Chapter 7: Getting Started with Shape Keys 11. Chapter 8: Beyond the Basics 12. Index 13. Other Books You May Enjoy

Using IK and Rig Controls

Inverse Kinematics (IK) is a tool we can use to automatically pose bones based on a few inputs. IK is typically composed of two handles, a target and a pole. The target is the point in space where the IK system tries to get the end bone to match and the pole controls the direction of deflection. Its primary use is for rapid and precise animation but it can be used beyond animation in some edge cases.

By the end of this chapter, you will understand the differences between IK and FK and when to use each one. You will have a rig featuring an IK setup for both the legs and the arms that allows animators to work with tools they are most comfortable with, saving time and energy on their part.

In this chapter, we will cover the following topics:

  • Understanding IK and FK
  • Understanding the effects of IK and FK in animation
  • Preparation for IK
  • Adding the IK constraint
  • Applying IK to the legs
  • Constraints on handles

Understanding IK and FK

Before we move on to creating our own IK system, we should get a grasp of what IK and FK are. If you have experience in animation then you likely already know this. If you do not know the difference or need a refresher, the following subsections offer detailed explanations of both IK and FK.

Forward Kinematics

Rotating every bone one at a time into a pose is known as Forward Kinematics (FK).

In an FK chain, each successive bone inherits the rotation of the previous bone and is not affected by bones further up the chain. While it may feel like a very rigid system, it’s surprisingly the most effective way for animators to produce large sweeping arcs and precise movements. Its downside is that it requires an immense amount of effort and time to work with, so much so that it’s the much less frequently used of the two modes.

You may recognize this pose method because it’s what you have been using throughout the book to pose any of...

Understanding the effects of IK and FK in animation

While you may not be an aspiring animator, it’s somewhat important that you understand some key theories within animation. This knowledge will allow you to decide where to use FK and IK on rigs. If you can preemptively decide what system belongs where, you can save a lot of time and people will appreciate your work just that little bit more. In general, IK goes on arms and legs while FK fills in the gaps such as the spine, neck, fingers, and toes.

In the real world nothing organic moves in straight lines; all of our motions occur in arcs. From humans walking to birds flying, there is never a straight line. In animation, straight lines are a result of linear interpolation between two points. Take a look at Figure 6.1 and Figure 6.2, which show how FK and IK systems move from keyframe to keyframe when animating.

Figure 6.1 – FK controls form a clear arc

Figure 6.1 – FK controls form a clear arc

Inverse kinematics form a linear...

Preparing for IK

There are some things we need to do before we add the IK constraint. We need to adjust the bones that will be in the chain and add some new bones for the IK system.

Pre-bending IK chains

The IK constraint isn’t very smart – take a look at Figure 6.2 and notice how the elbow bends the way we expect it to. Chances are that the IK constraint will choose to bend the elbow the wrong way just because it has no concept of a human elbow.

Thankfully, there’s a way for us to show it how to bend and it is pretty simple. We take the arm bones into Edit Mode and give it a slight bend at the elbow. This preexisting bend tells the IK what direction it should bend in when animating a movement.

Figure 6.3 – Elbow bend

Figure 6.3 – Elbow bend

Shown in Figure 6.3 is the little bend I gave the bones by grabbing the elbow joint in Edit Mode and just sliding it toward the back of the arm a little.

Adding control bones

We’re going to...

Adding the IK constraint

In this first IK setup, we will cover the configuration of a very basic single IK constraint on the hands. A constraint is just a function in Blender that limits/modifies how an element might behave. In our case, we will be working with bone constraints.

Head into Pose Mode with our armature selected, select either of the hands and head on over to the Bone constraints tab, pictured in Figure 6.5. Then, add an Inverse Kinematics bone constraint.

Figure 6.5 – IK constraint added

Figure 6.5 – IK constraint added

The steps to add the constraint are shown in Figure 6.5, but the navigation should be somewhat familiar by now. With this IK constraint added you will see plenty of boxes for us to fill. We will cover each box in descending order, starting with the Target field.

Target:

  1. Click the box next to Target and select the armature. There should only be one armature in the scene.
  2. A new box appears directly below asking for a bone. Click this...

Applying IK to the legs

The idea behind the legs is identical to the arms. I’ll give a recap and show you what it should look like.

The quick steps are as follows:

  1. Add an IK constraint to the foot bone.
  2. Make two new bones, Foot.L.IK and Leg.L.Pole, and clear the parents with Alt + P.
  3. Place the IK bone in front of the ankle and the pole in front of the knee.
  4. Bend the knee in Edit Mode just as you did for the arm.
  5. Set the target and pole to the respective bones.
  6. Untick Stretch and set the chain length.
  7. Push the target bone up to bend the leg, move the pole to the side, and adjust the pole angle so that the knee points towards the pole bone.

With all that done, you should have something similar to the following:

Figure 6.7 – IK setup with bones and constraints

Figure 6.7 – IK setup with bones and constraints

Figure 6.7 shows the whole setup for the legs. Some of your values may be different so if you don’t get the correct result at first, just...

Constraints on handles

A more advanced trick you can use is to place constraints on handles to change how they are used and prevent the rig from going places it’s not meant to.

A simple example is the Limit Location constraint, which can be used as an artificial floor for the wheels of a vehicle, as follows:

Figure 6.8 – Car with constraints

Figure 6.8 – Car with constraints

The pictured vehicle has many constraints to keep the wheel above the ground and keep the body above the wheel. No matter how much you push the car down, its wheel will not go through the floor and the body will not go through the wheel.

Take a look at the Add Bone Constraint dropdown to see the range of constraints available. Their names explain what they do for the most part.

Figure 6.9 – The Add Bone Constraint dropdown

Figure 6.9 – The Add Bone Constraint dropdown

If you are ever unsure of a particular feature, just check the Blender documentation; failing that, there are always quick videos online showing...

Summary

In this chapter, we covered the uses of IK and FK and how they worked. We moved on to the IK constraint and learned about the function and purpose of each part of the constraint, starting with adding the supporting pole and target bones to adjusting the chain length and pole angle.

With the knowledge from this chapter and the previous ones under your belt, you should be able to approach many rigging tasks with a solid understanding, from adding bones to weight painting and now using constraints to modify how the rig is controlled.

While the rig is currently functional, there are still many small features you can add to make this rig a brilliant piece of work!

The next chapter will cover shape keys and drivers, using bones to apply hand-sculpted effects to the mesh in ways that simple weight painting cannot achieve.

lock icon The rest of the chapter is locked
You have been reading a chapter from
3D Character Rigging in Blender
Published in: Apr 2024 Publisher: Packt ISBN-13: 9781803238807
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $19.99/month. Cancel anytime}