Ready to watch this entire course?
Become a member and get unlimited access to the entire skills library of over 4,971 courses, including more 3D + Animation and personalized recommendations.Start Your Free Trial Now
- View Offline
- Linking objects to points in Xpresso
- Creating a data slider to control a spline wrap
- Controlling multiple objects with a single slider
- Understanding the traditional character animation workflow
- Using the Character object for building and applying rigs
Skill Level Beginner
The process of creating character animation in computer revolves around the idea of kinematics, and there's two types. There's forward kinematics and inverse kinematics. Forward kinematics is the simplest of the two and it is a lot like stop motion animation where you rotate each joint one at a time. Inverse kinematics involves a process of creating something called an IK Chain that allows you to control a series of joints with a single object. Let's take a look at the first type, forward kinematics. I am in an empty scene here and I'm going to navigate to the right-hand view. And I'll bring the ground plane down a little bit and we're going to make a joint chain right here in this area.
Under the Character menu is the Joint tool, and the way the Joint tool works is that you have to hold down the Control key when you click. And I'm going to click up here once, and then I'm going to click out here to make a joint. And you saw that when I did that that I got a Root null object and then these two Joint objects. And I'm going to hold down the Control key one last time and click right down here near the center of the world. Now these joints are all parented together, but this is not an IK Chain, this in a FK Chain. And what I mean by that is, if I switch back to the Rotation tool, if I want to try and make this arm bend I have to go to the top Joint and do a rotation, and then I have to go to the bottom Joint and rotate it here.
Let's hit Ctrl+Z or Cmd+Z to undo that until our joint chain is back to its original position. Let's take key frames now for the coordinate properties on these joints. So the first two joints are what I'm going to worry about. The bottom joint at the very tip of the chain I'm not going to be concerned with it at all. So these two joints, I want to set rotation key frames, and that's the key to forward kinematics, is that it relies entirely on rotation information. So let's go to the Coordinate Property for these two joints. And I'm not going to set a key frame on position, I'm going to set a key frame on rotation.
So let's Ctrl+Click on the gray dot and click on the R column and then Ctrl+Click. That will set the key frames all at once. And now we can go forward in time. Let's say in Frame 20, I want the top shoulder joint to rotate up this way and then I want the second joint to rotate up this way. And then I'll set key frames for both. I have to remember to click on both of those guys and hold on down the Control key and click again. Now you can see that between those two frames I've got this kind of movement, so my arm is raising. And that is forward kinematics. That's all there is to it.
You're simply doing stop motion animation by setting key frames and rotating your joints. Now let's take a look at inverse kinematics. I'm going to Undo my joint chain and get rid of the key frames until my key frames are all gone. There we go. And you can double check each joint by looking to see if there's any key frames there. And now I want to create something called an IK Chain. To do that, there's a special command. If I click on the top joint here and go to the Character menu and to the Commands, I'm going to create an IK Chain. When I let go you can see three things happen. First, I've got this green line drawn in the scene, then I've got this Joint.2.Goal null over here, and I've got this tag called IK Expression.
And this IK Expression tag tells CINEMA 4D that this is a chain of objects, and this chain of objects should be controlled by this goal object. Once you've created an IK Chain, you no longer rotate the individual joint, you move the goal object. And so if I hit E on the keyboard to get the Move tool, this Joint.2.Goal now controls them. And you can see it's a much more intuitive way to move your joints. Now this raises some issues and it has some problems all its own, but for a lot of what you do, inverse kinematics will get the job done.
I've got a concrete example to take a look at. Let's go open the Window menu. I've got Mech-arm.c4d open already and this is in the Exercise Files. What I want to do is to create an IK Chain that's going to allow me to control this Mech-arm. Now what I've got set up here is a pivot hierarchy. I've got a Main pivot and an upper arm, and an elbow pivot, and a lower arm, and a scoop pivot, and a scoop all by itself. And let's get out of Edge mode and into Object mode. And let's switch to the orthographic view. This time we'll go into the front view. So what I want to do is create my IK Chain in the same location as those joints.
And so what I'm going to do is to deselect everything, and then I'll go to the Character menu and go to Joint tool. And I'm going to approximately click right in that area. Now in order to do this I think I'm going to turn on snapping. And if I go to my Snap options, I'm going to enable snap, and then what I'm going to do is click and hold on that, and I want to snap to access. And so when I enable access snap, what's going to happen is when I move in to this view you can see my cursor will snap to that location. Now I'm going to hold down the Control key and click on that Main pivot, that's going set a joint and a root, then I'm going to go up here and go to the elbow pivot and Ctrl+Click there.
And then I'll go down to the scoop pivot. Let's zoom in to make sure that we're actually hitting that guy. There we go, and then Ctrl+Click there. Now what I end up with is an IK Chain that lines up perfectly with each of the joints of my mechanical arm. Now, the beauty of a mechanical process like this is that you don't have to do any binding. It can be a simple parenting process. Let's create our IK Chain first. So you select the top joint in the chain, and then go to the Character menu, and go to Commands and say Create IK Chain. And so now we've got our goal object and I'll hit E on the keyboard to get the Move tool, and you could see that our IK Chain is working fine.
Now what we need to do is to parent up the parts of our mechanical arm to the different parts of the chain. So let's back out here. The way I have the chain built here for the mechanical arm gives you a clue to how we're going to parent things up. So let's call this first joint Base. Let's call this second joint Elbow. Let's call the last joint Tip. Now what I'm going to do is take the parts of my mechanical arm and parent them to the different objects. The scoop pivot is going to get parented to the tip object. The elbow pivot is going to get parented to the elbow object.
Now this is very important. You don't want to break the IK Chain, if I put this into this location here, I've now broken the IK Chain. I want to be careful about that. I'm going to take the tip and drag it up here. That may change the hierarchy here, and you can see that these guys are now peers with one another underneath the elbow. Then I'm going to do the same thing for the Main pivot and parent it to the Base and then reorient the hierarchy so that my joints are still in a line. Now when I move this Joint.2.goal object, if I move that around, you can see that the parts of my mechanical arm follow.
Now my snapping's still on and that's creating some weirdness in the movement. Let's undo the snapping and switch back to the perspective view. And you can see now as I move this around my mechanical arm is looking great. The interesting thing about joints is that they don't render. And so if I hit Cmd+R or Ctrl+R on the keyboard you can see that my Mech-arm is intact and the joints aren't visible. So that is a basic overview of the process of creating an IK Chain, and this is probably character animation at its most simple, and it's really easy to understand. We're going to move on through a situation in the next movie where we're binding the joints to the geometry instead of just doing a simple parenting.