Advertisement

Effectively use Constraints to Rig Non-Spherical Eyes in Maya

by

In this tutorial you will learn how to effectively use constraints to rig any misshapen, non-spherical, cartoon eye. Not every model has a circular eye, and the shape of your eye shouldn't stand in your way. The tutorial is written for Autodesk Maya 2009.

Republished Tutorial

Every few weeks, we revisit some of our reader's favorite posts from throughout the history of the site. This tutorial was first published in November of 2009 2009.


Final Effect Preview


Many CG characters have oddly shaped eyes.

And when you rotate an oddly shaped eye, it doesn't fit in its socket. This won't do!

Step 1

Name your oddly shaped NURBS eyes EyeL and EyeR. Duplicate EyeL. Ungroup it from everything, and rename it IRIS.

Step 2

Hide everything except IRIS. Right click on IRIS, and select Isoparm.

Step 3

Pull an isoparm to where an iris would make sense. In my scene I pulled an isoparm to where the ramp edge ends.

Step 4

Within the SURFACES menu set, navigate to Edit NURBS > Insert Isoparms.

Step 5

With the new isoparm selected, navigate to Edit NURBS > Detach Surface. Your new surfaces may look wrong, because the ramp is now wrong.

Step 6

Delete the larger of the NURBS surfaces, leaving you with just an iris. Rename it if necessary.

Step 7

Within the Hypershade window, duplicate the shading network that was on your Eye. In my case it was EyeSG.

Step 8

Rename the duplicated shader IrisSG.

Step 9

Give IrisSG a ramp with a more correct color scheme.

Step 10

Show the EyeL and EyeR geometry. If necessary, make the eye color for EyeL and EyeR pure white.

Step 11

With the IRIS selected, navigate to Modify > Center Pivot.

Step 12

Pull the IRIS slightly away from the EyeL geometry.

Step 13

Curve snap the IRIS pivot to the very front of the EyeL geometry (where all the edges meet at a point).

Step 14

Group IRIS and name it GRP_IRIS.

Step 15

Navigate to Modify > Center Pivot, then curve snap the GRP_IRIS pivot to the very front of the EyeL geometry (where all the edges meet at a point).

Step 16

Duplicate GRP_IRIS. Rename the original group GRP_IRISL and IRISL, and the newly created group GRP_IRISR and IRISR. Curve snap the new GRP_IRISR to the very front of the EyeR geometry (where all the edges meet at a point).

Step 17

Select both EYEL and EYER and both GRP_IRISL and GRP_IRISR, and navigate to Edit > Delete by Type > History, and then navigate to Modify > Freeze Transportations. Now we have two irises nicely placed on our eyes!

Step 18

Navigate to Create > Locator.

Step 19

Curve snap the locator to the very front of the EyeL geometry (where all the edges meet at a point).

Step 20

Scale down the locator's Local Scale to .2, and name the new locator IRISCONTROL. Duplicate IRISCONTROL, and name the original IRISCONTROLL and the new one IRISCONTROLR.Curve snap IRISCONTROLR to the very front of the EyeR geometry (where all the edges meet at a point).

Step 21

Group IRISCONTROLL and IRISCONTROLR together, and name the group GRP_IRISCONTROLS. With GRP_IRISCONTROLS selected, navigate to Modify > Center Pivot.

Step 22

Show the rest of your geometry again, and move GRP_IRISCONTROLS in front of your character's head.

Step 23

Select the eyes, irises, and the locators, and navigate to Edit > Delete by Type > History, and then navigate to Modify > Freeze Transportations.

Step 24

Now time for the constraints! Select the CONTROLLER first (called the Target), and the CONTROLLED second (called the constrained). Select EyeL, then shift-select GRP_IRISL.

Step 25

Within the ANIMATION menu set, navigate to Constrain > Geometry.

Step 26

With everything still selected, navigate to Constrain > Normal > edit box.

Step 27

Make sure the Aim vector is set to Z (because the IRIS is facing Z), then hit Add.

Step 28

Repeat steps 33-36 with EyeR and GRP_IrisR. Your GRP_IRISL and GRP_IRISR layers should now look like this:

Step 29

Grab GRP_IRISL and GRP_IRISR and move them around. Look! They stick to the EYE geometry! Just make sure when you are done moving them, you UNDO your moves so that they are back at ZERO.

Step 30

Now select IRISCONTROLL, then shift-select GRP_IRISL.

Step 31

Navigate to Constrain > Point.

Step 32

Repeat steps 38-39 with IRISCONTROLR and GRP_IRISR. Now you can grab GRP_IRISCONTROLS and move it around. YAY! Our irises move beautifully along the eye geometry.

Step 33

From the side view, you should see your oddly shaped eye with the iris floating on top.

Step 34

Now for a few cleanup steps. Select GRP_IRISCONTROLS. Select the translate Z, rotate XYZ, and scale XYZ attributes and RMB > Lock Selected. If you want, you can keep Scale X unlocked for nice crossed eyes.

Step 35

Select IRISCONTROLL and IRISCONTROLR. Select everything except visibility, and RMB > Lock Selected. If you want, you can leave translate unlocked so you can move the L and R irises separately.

Step 36

Select IRISL and open the Attribute Editor. Under Render Stats, turn off Casts Shadows. Repeat for IRISR.

Step 37

You're done! Misshapen cartoon eyes that stay in their sockets properly.


Advertisement