- [Instructor] In this lesson we'll create some tail controls for our character. We could create FK controls just like we've done for the character's ears and head and snout area. And that would be a nice solution for a short tail like this. But what if the animator needed to pin this character's tail down? Maybe while the character is sitting the tail needs to lay in a specific orientation on the ground. Or maybe another character grabs this character's tail at some point during a sequence. So in those cases an IK set up like the one I've used for the back would probably be a better solution.
'Cause an IK spline solver allows for a more stationary pinning of the tip joints and also just generally gives the animator's a little bit more shaping control for those types of poses. But then the trade off, of course, would be that the animator would lose access to the overlap opportunities that are afforded with an FK setup or the natural sort of arcing behavior you get when rotation-based controls are the primary control system. So animators very often like to have both options. They want to be able to switch between FK and IK as needed for the shot.
And FK and IK combined systems are really common for especially arm setups for a character. And leg setups as well, but we're gonna attach an FK, IK system to this tail because it's a pretty straightforward example, and I can see it being useful in animation. So I've taken our original joint chain and duplicated it twice. And I'm going to create an FK system for one of the joint chains and an IK system for the other joint chain. It's important that the joints be duplicated in their original position and that the duplicate chains are perfect duplicates of the original, the same exact position and orientation.
That's gonna allow the system to blend properly between FK and IK. So if we switch to the outliner and expand our hierarchy you'll see that the original joint chain I've renamed the bound joint chain. This joint chain will be bound to the character mesh. And then I have my FK and IK chains as well. So here on the display layers I've created controls for the two separate systems. The FK controls are just like the ones I've created for other FK portions of this character, just controls with offsets that allow them to be completely in sync with the joints that they're going to need to drive.
And then I have some IK controls as well. These controls are very similar to the setup I've used in the back. Once again it's an IK spine setup with a cluster, this time one for each vertex. And the cluster is being moved around by a parent control. And the IK spline shape is positioning and orienting our joints. So what we need to do now is blend the behaviors of the FK system and IK system into our bound joint, which is currently not affected by either of these systems.
And we'll do this by returning to the hyper shade and creating a blend color utility node. We use blend color utility nodes already to switch the stretch on and off for our character's legs. And in this case we're going to take advantage of the fact that the blend colors are able to process vectors or three number sets. And that's gonna be perfect for what we need here, 'cause we're going to feed the x, y, z rotation values of our FK and IK joints into these blend color nodes and then the result will be passed off into the bound joints.
So I need to create one blend color node per joint. This is going to be my tail one blend. And I'm going to bring up the connection editor and load the tail blend on my right. And then I'll select the first joint in my IK chain and load it on the left. And I'll connect the rotate x, y, x of the tail IK to the color one RGB of my blend color node. Then I'll select the first FK joint.
I'll load it on the left and connect the rotate x, y, z to the tail RGB for color two. And finally I'll select the first bound joint, and I'm going to load it on the left also, and I'll switch the direction of the connection editor from left to right to right to left and I'll make sure that I turn the noncable option on so that I can access my RGB outputs. I'll connect these values to the rotate x, y, z.
So if I select my blend color node and drive the values between zero and one. You can see that at a value of one I'm in IK mode and at a value of zero I'm in FK mode. And we wanted to give the animator access to this blender attribute, so I've added a custom attribute, the tail FK, IK attribute has been added to the body control. And I'll connect that through the connection editor to my blender attribute on my tail one blend color blend node.
Make sure you change the direction back from left to right. And so now the animator can switch for this first tail joint between IK and FK. So I'll need to repeat this process for each joint all the way through joint six. The tip joints aren't really affecting the deformation of the character, so we can ignore those. So I've gone ahead and made those connections to the other joints in our joint chain. And I'm going to open up a midpoint scene in the exercises files.
In this scene I've made the connections to all the joints in the joint chains and the FK, IK attribute will transition properly between modes for all the joints in the chain. So as a last step we'll connect the visibility of the controls to this behavior. That way the IK controls will only be visible while we're in IK mode and same for the FK controls. So we'll select the body control and go to window, general editors, connection editor.
And because this value set to one activates IK I'm going to tie that into the visibility of my IK controls. So I'm just gonna select each of the IK controls one at a time and connect my FK, IK attribute to the visibility attribute of that offset group. I'll do that for each one of the IK controls, hitting reload right and making these connections.
And so now you can see that the IK controls vanish when we are in FK mode. To handle the visibility of the FK controls I'll create an expression. I've also created a custom attribute FKVis, which I'll use to help manage this behavior. I'll go to window, animation editors, expression editor, and I'm going to create an expression that drives the FK visibility attribute. So body control, FKVis, so that it's equal to one minus the body control tail FKIK value.
So this is just going to keep the visibility at a complementary value to the value of the IK setting. And this is going to turn the FK controls off when IK is on. I'll click create. You can see this value change appropriately. And then I'll connect the visibility attribute to my FK controls. So for the FK controls since they're all just in a single hierarchy, I'll pick walk up using the up arrow on the keyboard all the way to FK one offset and connect it to my custom attribute.
With the tail controls complete we can move on to controlling the dog tag by adding dynamic joints to our rig.
- Creating the skeleton
- Rigging the head, ears, and front and hind legs
- Working with expressions
- Adding extended twist functionality
- Creating an FK/IK tail
- Making the rig scalable
- Binding the mesh to the skeleton and painting skin