Now you need to tell Blender how those bones and which of their properties will control the shape keys’ values. For that, you’ll use drivers. Using drivers is something quite technical and advanced, so here you’ll only get your feet wet with the basics, but you should investigate this topic to learn how to create more complex rigs with drivers.
Divide your interface and, in one of the editors, switch to the Graph Editor. On the Graph Editor’s header, you’ll see an option that will let you switch between F-Curves and Drivers; select Drivers. (You’ll learn about F-Curves in the next chapter; they’re used for animation.)
At this point, the Drivers interface will be completely empty because you don’t yet have any drivers in your scene. It’s very easy to create them: just find the parameter you want to control anywhere in the interface, such as the Value parameter for one of the shapes in Jim’s face, right click it, and in the menu that appears, you’ll see the option Add Driver. Once you do this, you will be unable to control that parameter from the interface (it will be overridden by the driver) and it will turn violet so you know that it’s controlled by a driver.
Let’s set up the driver for making the eye blink when you scale down a bone, and then you’ll need to use the same method for the rest of the shapes and control bones.
1. On the left side of the Graph Editor, you’ll see a list of the properties that currently have drivers. You may have to expand the list items to see the different properties that they have stored inside (see Figure 11.15). Click the property and, with your cursor over the Graph Editor, press N to display the Properties Region. Now you’ll see from top to bottom which parameters you need to adjust.
2. Find the Drivers panel in the Properties Region. The first option you have is the driver Type. Set it to Averaged Value because you won’t be scripting for now. This will create an average of the variables (in this case, you’ll only use one, so that’s the value Blender will use, but you can add more and make this feature extremely complex).
3. In the Add Variable panel, there is already one variable, called var by default (there’s no need to change its name, but you can in case you want to use several variables and still be able to recognize them). In the Object name fields, insert the name of the armature and another field will appear in which you will have to insert the name of the bone you want to drive this action.
4. Now you can select the type of transform you want for the bone that will drive the property. In the case of the eye-blink shape, we want to control it with the Z scale (actually the axis doesn’t matter, as we want the transform to work when we scale the bone in the three axes simultaneously). Set the Space to Local Space, so the transform depends on the local position of the bones because they’ll be moving around with the head, so the World Space option is probably not a good idea.
5. At the top of the Drivers panel there are two buttons, Update Dependencies and Remove Driver. To make sure the driver has been updated with the changes you’ve made, click Update Dependencies. Now go to the 3D View and try it to make sure the control works.
6. It works, but the eye is now closed and will open as you scale the object down. In order for the animation control to be intuitive, you want it to be opened and closed when you scale the bone down. To achieve that goal, in the Drivers panel you’ll see the Modifiers panel. (Yes, drivers can have modifiers!) All those diagonal lines in Figure 11.15 represent the effect of each driver; by modifying that line’s inclination, you can change a driver’s effect; for example, the effect can be faster or slower.
Add a Generator modifier. By adjusting the Generator modifier’s values, you can control the inclination of the line that defines the effect of the driver, and hence the effect the bone has on the shape. To keep it simple, with the second value you set the starting point of the line and with the third value you control the inclination of the line, which will control the speed of the effect (if you have to move the bone a lot to increase the shape’s value, increasing the effect’s speed will compensate for that).
Tip
If you want to reverse a driver’s movement, you can use negative values in the Generator modifier. Remember to click Update Dependencies as you change those values to see their effects, and look at the bones in the 3D View to see if they’re working properly.
7. Repeat this process with every controller and every shape.
3.129.67.246