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.
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!
Name your oddly shaped NURBS eyes EyeL and EyeR. Duplicate EyeL. Ungroup it from everything, and rename it IRIS.
Hide everything except IRIS. Right click on IRIS, and select Isoparm.
Pull an isoparm to where an iris would make sense. In my scene I pulled an isoparm to where the ramp edge ends.
Within the SURFACES menu set, navigate to Edit NURBS > Insert Isoparms.
With the new isoparm selected, navigate to Edit NURBS > Detach Surface. Your new surfaces may look wrong, because the ramp is now wrong.
Delete the larger of the NURBS surfaces, leaving you with just an iris. Rename it if necessary.
Within the Hypershade window, duplicate the shading network that was on your Eye. In my case it was EyeSG.
Rename the duplicated shader IrisSG.
Give IrisSG a ramp with a more correct color scheme.
Show the EyeL and EyeR geometry. If necessary, make the eye color for EyeL and EyeR pure white.
With the IRIS selected, navigate to Modify > Center Pivot.
Pull the IRIS slightly away from the EyeL geometry.
Curve snap the IRIS pivot to the very front of the EyeL geometry (where all the edges meet at a point).
Group IRIS and name it GRP_IRIS.
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).
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).
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!
Navigate to Create > Locator.
Curve snap the locator to the very front of the EyeL geometry (where all the edges meet at a point).
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).
Group IRISCONTROLL and IRISCONTROLR together, and name the group GRP_IRISCONTROLS. With GRP_IRISCONTROLS selected, navigate to Modify > Center Pivot.
Show the rest of your geometry again, and move GRP_IRISCONTROLS in front of your character's head.
Select the eyes, irises, and the locators, and navigate to Edit > Delete by Type > History, and then navigate to Modify > Freeze Transportations.
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.
Within the ANIMATION menu set, navigate to Constrain > Geometry.
With everything still selected, navigate to Constrain > Normal > edit box.
Make sure the Aim vector is set to Z (because the IRIS is facing Z), then hit Add.
Repeat steps 33-36 with EyeR and GRP_IrisR. Your GRP_IRISL and GRP_IRISR layers should now look like this:
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.
Now select IRISCONTROLL, then shift-select GRP_IRISL.
Navigate to Constrain > Point.
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.
From the side view, you should see your oddly shaped eye with the iris floating on top.
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.
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.
Select IRISL and open the Attribute Editor. Under Render Stats, turn off Casts Shadows. Repeat for IRISR.
You're done! Misshapen cartoon eyes that stay in their sockets properly.
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post