The size of our pupils can say a lot about how we're feeling. Some methods of marketing research relate the size of the pupils to the attractiveness of TV commercials, for example.
Greater sizes can indicate that the person is attracted, happy, or just likes what it is seeing. Smaller usually denote the opposite, and that kind of control can be very useful in close up shots to help indicate how your character is feeling.
003-Pupils.blend
from the book's support files. You'll see a rig to control the eyes and eyelids, with shapes applied to the bones. That's our starting point, as you can see in the next screenshot: Eye.L
object, navigate to the Properties Window, in the Object Data tab, and locate the Shape Keys panel. Press the plus button to create the Basis shape. Click two more times to create our shapes. Select each on the panel and name them Pupil_Small and Pupil_Big, as seen in the following screenshot:We could just repeat the last three steps now to create similar shapes as the right eye, but we'll see a nice Blender feature to make our lives easier.
Eye.R
object. Go to the Shape Keys panel in the Properties Window, click on the button with a down arrow below the minus button and pick Transfer Shape Key, as seen in the following screenshot:This will transfer the active Shape Key (currently Pupil_Big) from the left eye object to the right eye, since they have the same topology.
Eye.L
object again, activate the Pupil_Small
shape, and repeat steps 5 and 6 to transfer this Shape Key to the Eye.R
mesh.Now that we have the necessary Shape Keys for each eye, it's just a matter of creating a driver controller for them.
Armature
object, enter in its Edit Mode (Tab). Make sure the X-Axis Mirror property is turned on in the Tool Shelf (T) panel. Eyelids.L
bone, extrude (E) it to roughly half the height of the eyelids controller. This will create a smaller bone in the same position of the Eyelids.L
bone. You'll notice that another bone will be created at the base of the right eyelids controller, since we're in X-Axis Mirror mode, as you can see in the following screenshot: Eyelids.L
bone and press Ctrl + P (Keep Offset) to make it child of the eyelids controller. Name the created bones as Pupil.L
and Pupil.R
.Now you should add a Driver for each Shape Key
var
on the box below the Add Variable button, change its type to Transform Channel; select the Otto_Armature
object and the Pupil.L
bone in the Ob/Bone fields; choose the Y Scale type and enable the Local Space field. The driver setup values are shown in the next screenshot, and the left eye pupil should dilate when you scale (S) up the Pupil.L
bone:The var-1
value on the Expr field is because the default scaling value of objects and bones in Blender is equal to 1, in contrast to location and rotation which get default values of 0. This value allows us to get the desired result when scaling up the bone driver.
Pupil_Small
shape you should repeat steps 12 and 13, with the only difference being that the Expr value should be set to 1-var
. The next screenshot shows the driver setup values, and the contracted pupil achieved by scaling down the Pupil.L
bone: Pupil.L
to Pupil.R
in the driver properties on the Graph Editor window. Repeat it for the other shape and you're done with the pupil controllers!The file 003-Pupils-complete.blend
has this finished recipe for your reference.
By creating shape keys for the pupil sizes and assigning bone drivers to their values, you can control the amount of their dilation. To use the same controller for both contraction and dilation shapes, you must use inverted expression values for evaluation in the Graph Editor window.
Besides the fact that the human iris doesn't contract nor expand, you can apply the same techniques shown here to control their size. If used very carefully, this kind of control can help you express your character's emotional state. This is most applicable to cartoon characters, though.
Chapter 1: Using corrective shape keys
Chapter 1: Making a IK-FK switcher
Chapter 3: How to control where your characters looks at
Chapter 3: The eyelids controllers
3.128.198.59