In this video, you can learn how to utilize inverse kinematics to rig a simple character inside of Cinema 4D.
- [EJ] Welcome to Motion Graphics Weekly where you up your MoGraph knowledge one week at a time. I'm EJ Hassenfratz, let's get our learn on! Character rigging using inverse kinematic rigging or IK rigging, is often looked at as a daunting and intimidating aspect of 3D. In this week's video, I'm going to aim to help you look at rigging in a new light by showing you the very basics of the subject, and how you can start adapting some rigging into your own workflow.
So here is a very simple sock character trotting around, trying to find his other sock friend. And this is going to be demonstrating a very simple use of IK and IK dynamics, which I'll be covering in the next video. So let's go ahead, start fresh, and I'll show you how easy it was to set this up using IK. So here we have the stripped down sock geometry, and we're going to give this some structure to be able to rig this up and be able to animate this. So rigging is basically setting up the bone or joint structure of an object or a character, and right now, our geometry is like a slug, no bone structure for us to move it, but we're going to fix this by adding some joints which are basically Cinema 4D's version of bones, to define the structure of how this character will move and bend.
So let's first go into our front view, and we'll create some joints in that front view, so we'll go click this top right button right here to bring up our four up view, and then find our front view here, and click that top right button on that front view to maximize it, and then I can just reposition this using the 1 key or the 2 key to pan and zoom, and then what I'm going to do is build some joints, and you can find joints in the character menu here. I'm going to go to the Joint Tool, not the Joint object, Joint Tool, and to build and create some joints, I'm going to hold the Command key down, and click.
And you're going to see that that creates a joint in my Object Manager. Now, just like you build a line with two points, you need two joints to build a full actual joint. So I'm going to Command + click again, and you're going to see now we have that one big joint or bone on this main part of our sock. So I'm just going to go ahead and create a few more joints here. I'm going to make them coincide with the subdivisions of my object as you can see here, these little loops, these little subdivisions of my geometry, and I'll just Command + click here for this subdivision, Command + click here, and then one last one at the very tip of the sock.
Now, to readjust some of these joints, you can either click here, and adjust these individually, or you can hold the 7 key down and adjust them that way as well. I'm just readjusting these, repositioning. And the name of the game is that, the more smooth you want a bend, the more definition via joints that you want, so think of your arm. Your forearm and your upper arm are two bones and you have one bend at your elbow.
Now, your finger has more bones in it, it's got three bones, and you can bend that a lot more like a curve than you can at your elbow, so just keep that in mind when you're building out your joints. It's also very important that your actual geometry has enough subdivisions for it to smoothly bend as well. Let's go ahead and set up what's called an IK chain which creates a relationship between all of these joints. So right now, if we go ahead and move these joints, you can see that it's only affecting the joints in front of it, and this is actually a very menial way of animating a character.
To get the correct pose, you need to edit every single joint to get the pose you want. As I'm editing this joint, I'll need to then reposition every joint down the chain. And this is what's called forward kinematics or FK. What we want to do is the inverse of that, where we control the last joint in the IK chain, and it controls everything else, and that again is called IK or inverse kinematics, the inverse of forward kinematics. So let's go ahead and set that up, so what I'm going to do is select the first joint in my joint chain, and Command + click and select the last joint in my IK chain, and go to Character, Commands, Create IK Chain, and that's going to create a relationship between all of these joints.
And you're going to see two things were added, this IK tag to designate this is now an IK chain, as well as this goal. Now, if I click on this goal, and move this little null, you're going to see that this is moving the entire IK chain just by moving one object. This is the complete opposite of what we were doing before with the FK, where we moved one joint and that affected everything underneath it, we're doing the complete inverse of that. So I'm going to undo all these moves that I've just made.
So basically your goal defines where your last joint is positioned, kind of like your hand is the goal of your arm's positioned, okay? There's one thing to point out, is if you remember the actual sock character animation, as the head was kind of bobbing, the floppy part of the sock was bobbing, this main part of the sock was not moving, so we want to keep that stationary. So what I'm going to do to do that is, have this IK chain not affect this first joint. So I'm just going to click and drag and move this IK tag down, and now you'll see this little green line is now building a relationship between the goal and this joint and not this goal and the very top joint here.
So now if I move the goal, you're going to see that that no longer affects this first joint, and that's exactly what we want. We can have this flopping around, and this main part is not moving at all, so I'm just going to undo those position changes. So you're going to notice that I'm moving these joints around and it's not affecting our sock geometry at all, which is kind of a problem. So what we need to do is build a relationship between the joints and the geometry by doing what's called binding. We're going to bind our joints to our geometry here, so to do that, we're going to select the geometry we want to bind, and then the joints we want to bind it to, so I'm just Shift + clicking here, so all of the joints plus the sock, you don't want to select the subdivision surface here, just that base geometry, and you're going to go up to Character, go to Command, and go to Bind, and you can see even the icon shows the joint binding with a little piece of geometry here.
So once I click Bind, you're going to see that there's now this skin deformer as a child of my sock geometry. Now, see what happens when I move this goal. You can see now we're actually deforming our geometry with our joints. The skin deformer built that relationship between the geometry and the joints. So let's go to our perspective view here, and just kind of see what this looks like, and you can see that this is kind of bending, kind of oddly kind of chunky, so there's one thing we can do to fix something like that, and that is to go to our weight manager.
If I hold Shift down and double-click on this little Weight Expression icon here, it's going to bring up our Weight Manager, and if I turn off my subdivision surface, I can actually see the influence of all of these joints color coded on my sock geometry here, so if I click on this one joint, you're going to see the influence or the weight influence in red, and you're going to see the same thing with Joint.1, Joint.2, Joint.3, and then Joint.4 is just at the very end and doesn't have any influence really, but you can see how the progression of the influence occurs across our geometry and you can see that it's not very smooth.
We have all these kind of chunky little parts here. So what I want to do is smooth all of that out, and luckily there is these commands here where if you select all of your joints, we can go from the Add mode to Smooth, and just bring up our strength as much as we want and then just hit Apply All, and you're going to see that that just smoothed everything out. Let me actually undo that, and Command + Z, and maybe we'll bring down the strength to maybe 50% and see what that looks like, so we're just smoothing it a little bit and we can actually hit Apply All again, and smooth this out a whole lot if we want to.
We can even hit this three more times if we wanted to. But let's actually select our goal, and see how this bends now, so you can see that if I turn my subdivision surface back on, this bends a lot more smoothly and I think looks a little bit better. We can smooth this a lot more if we want to but I think this is good. So, the Weight Manager in manipulating the weight adjusts the influence of the joints as they deform via that skin deformer. So, the one thing I want to mention is that IK isn't only for character animation.
It could be just used as a deformer using the skin deformer here. So say we want our sock to be stationary but we maybe want to have this kind of flopping towards the front of the sock here, so maybe something like that. And you can see that we're basically just using the skin deformer as a deformer to kind of model. So, now that you hopefully got a grasp on the basics of IK and rigging, be sure to stay tuned to next week's MoGraph Weekly where we'll dig a little bit deeper into the IK tag and how we can actually use dynamics and gravity forces to affect our joints and automate some animation.
Don't want to wait until next week to learn something new? No problem. Here are other ways to feed your creative brain to keep you busy in the meantime. You can check out my other courses in the library, visit my website, eyedesyn.com, for more tutorials, subscribe to my YouTube channel to be alerted when I post a new video, join my Facebook page for daily MoGraph inspiration, and keep up to date on all my latest MoGraph creations on Instagram. Thanks for watching, and I'll see you here again next week.
Skill Level Intermediate
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.