Realistic Eye

Rig Walkthrough: Simplified Version

Please Note that this page is depreciated and is not supported in the C3dC Subscription

This tutorial goes through the rigging of an eye in Maya with full skin follow. This is a simplified version of the rig used in the drag and drop face rig. A very simple yet powerful setup, and it’s fun to get stuck into nodes to see how they work.

1. Introduction (1:23 mins)

Introduction for this tutorial

VIDEO 1.1 : INTRODUCTION (1:23 mins)

Information
REALISTIC EYE RIG

1. INTRODUCTION, EXAMPLE OF WHAT WE’LL BUILD
The following tutorial is about 45 mins total and shows how to setup a realistic eye with skin follow. There are many variations of eye setups I find this one is the least hassle for the best results. We use 4 joints per eye, 2 for each lid and with some nice skinning and custom attributes, a couple of multiply and divide nodes we have a cool pro eye rig in a pretty short amount of time.

Characters with rounder cartoony eyes may require more detail in a variation of this setup.

This setup works great for fairly realistic stylised eyes as seen here.

2. Joint Creation (3:04 mins)

In this section we’ll create the joints for this setup which relies heavily on joints and skinning.

VIDEO 2.1 : JOINT CREATION (3:04 mins)

Information
JOINTS AND SKINNING

2. BUILDING THE EYE JOINTS

3. Skinning (10 mins)

Now we’ll move onto skinning the mesh

VIDEO 3.1 : ADDING INFLUENCE OBJECTS, NEW JOINTS TO SKIN (51 sec)

Information
3. ADDING THE JOINTS TO THE SKINNED MESH
VIDEO 3.2 : RANGE OF MOTION PREP (1:38 mins)

Information
4. PREPARING RANGE OF MOTION (ROM)
VIDEO 3.3 : SKINNING THE EYE (8:09 mins)

Information
5. SKINNING THE EYE
4. Preparation For the Control (9:44 mins)

Now we’ll get into the deeper aspects of this rig and find out how the lid follow effect works. We’ll do a bit of preparation before building the control that will control all the elements.

VIDEO 4.1 : EXPLAINING THE FOLLOW (1:33 mins)

Information
6. AUTO EYE FOLLOW INFORMATION
VIDEO 4.2 : SETTING GIMBAL ORDERS (2:02 mins)

Information
7. SETTING THE GIMBAL ORDER OF ROTATION
VIDEO 4.3 : EDGE JOINTS AND SKINNING (6:09 mins)

Information

8. CREATING AND SKINNING THE EYE EDGE JOINTS

5. Building The Eye Control (28 mins)

Here we’ll build the eye control that the animator will use to control the eyes. Then it’s into the real core of the rig, hooking up all the attributes and nodes to drive the eye automatically.

VIDEO 5.1 : BUILDING THE EYE CONTROL (3:29 mins)

Information
THE EYE CONTROL CURVE

9. BUILDING THE EYE CONTROL CURVE

VIDEO 5.2 : EYE BALL ROTATE (3:03 mins)

Information
10. ROTATING THE EYE BALL
VIDEO 5.3 : CNTRL FOLLOW THE HEAD (1:38 mins)

Information
11. PARENTING THE CONTROL CURVE TO THE HEAD
VIDEO 5.4 : CREATING ATTRIBUTES (3:34 mins)

Information
12. CREATING CUSTOM ATTRIBUTES
VIDEO 5.5 : HOOKING UP THE BLINKS (3:48 mins)

Information
13. HOOKING UP THE LID BLINKS
VIDEO 5.6 : HOOKING UP ROLL AND LR (2:50 mins)

Information
14. HOOKING UP THE EYE LID ROLL
VIDEO 5.7 : HOOKING UP THE AUTOMATIC FOLLOW (10 mins)

Information
15. HOOKING UP THE AUTO EYE LID FOLLOW
6. Finishing and Mirroring (10 mins)

Now we’ll finish up the eye and mirror it to the other side which can be a little tricky.

VIDEO 6.1 : ONE EYE FINISHED (47 sec)

Information
COMPLETED EYE

16. SINGLE EYE COMPLETED

VIDEO 6.2 : MIRRORING THE JOINTS (1:12 mins)

Information
MIRRORING

17. MIRRORING THE JOINTS

VIDEO 6.3 : MIRROR SKINNING (5:01 mins)

Information
18. MIRRORING THE SKINNING
VIDEO 6.4 : MIRRORING THE CURVE CONTROL (3:03 mins)

Information
19. MIRRORING THE CONTROL CURVE

Note for the Version 2 Setup
Version 2 is an adjusted method as shown above here. (coming soon)

This setup will provide adjustable eye driven deformation around the lids. We’ll have two methods for animating the eyes, fk controls at the eye’s pivot which will be the main control. We’ll also have a look at control (eye aims) for those who like to animate with look at, though this control will be secondary as these controls are a pain to animate.

We’ll have switchable world/local space so the eyes can be animated in world space or local head space as both methods are often needed by animators depending on the situation.

The joints will also control blinks.
Corrective can be added to neaten the blinks if needed.

And we can put some blendshape deformation for squints, smile angry shapes etc.

This setup will also be compatible with the cutoff head rig and scaleable.

Advantages of a Joint Based Eye Systems
The joint based system for eyes has a couple of advantages over blendshapes.
1. Joints move in arcs and eyes are round.
2. Joints are easy to link via driven keys since they are in rotation format

Importance of Topology
The eye topology should be as radial as possible, this will make skinning easier. It should also have enough extra spans/loops to have the eye blink close properly.

??Perhaps Get the eye follow to work??
maybe get the eye follow to work first as we need the correct orientation of the eye to drive the lids. And we need 2 controls that add together to get that.

Actually is pretty easy to switch

The Joint Hierarchy
At a minimum this system works with two joints per eye, one for the the upper and lower lids.

In this variant we’ll use 6 joints per eye, a top lid and bottom lid then two for each edge. This is usually enough for most regular eye setups. We can always add corrective blendshapes if needed to fix minor details. In some situations it may be ideal to have many more joints depending on the needs and accuracy of the eye setup.

So in this version each eye has 6 joints

1. bottom lid
2. bottom lid inner
3. bottom lid outer
4. top lid
5. top lid inner
6. top lid outer

Each joint will pivot from the center of the eye. Because of a mirror skin weights problem in Maya it’s best if these pivots are locators rather than the joints themselves as joints in exactly the same position will often cause errors while mirroring skin weights.

We also want to double up the pivots for driven keys so that the animator has access to a control they can key manually if desired. And extra grps for zeroing rotations.

So for each joint the hierarchy will go

bottomLid_grp (to zero rotations/translation)
– bottomLid_pivot_dk_loc (the pivot for driven keys)
— bottomLid_key_loc (animator over ride to be keyed if necessary)
— bottomLid_jnt_grp (to zero out the joint)
—- bottomLid_jnt (the joint to skin, can also be dk’d or aniamted)

Setting Up Gimbal
Because of gimbal problems of this setup it’s best to make sure all the locators and the eye control have the correct order of rotation. All controllers and locators need to match. The good news for eyes is that they don’t need to roll, this will help us out with any gimbal problems.

In this case all pivots relating to the eye control will have to be switched from xyz to…

zxy

Adding The Lid Up Down
Because we’re going to mirror this setup later, for now we’ll make a dummy controller with some attributes. In this case lets just use the “EyeJointsGroup” and create 5 new attributes as regular float type.

TopLidUpDown
BotLipUpDown
LidsLR
TopLidRoll
BotLipRoll

Next we want to bring it up in the node editor along with all the topLid dk locators.

eyeJoints_grp_L
and
eyeLidTop_connect_loc_L
eyeLidTopOuter_connect_loc_L
eyeLidTopInner_connect_loc_L

Now we’ll connect the topLidUpDwn
1. Connect
eyeJoints_grp_L (topLidUpDwn) > eyeLidTop_connect_loc_L (rot x)

2. Create two multiply Divide Nodes
Rename to
multiplyTopLidOuter_L
multiplyTopLidInner_L

3. Connect the inner and outer using the multiply and divide nodes
– eyeJoints_grp_L (topLidUpDwn) > multiplyTopLidOuter_L (input x)
– multiplyTopLidOuter_L (output x) > eyeLidTopOuter_connect_loc_L (rot x)

and

– eyeJoints_grp_L (topLidUpDwn) > multiplyTopLidInner_L (input x) >
– multiplyTopLidInner_L (output x) > eyeLidTopInner_connect_loc_L (rot x)

Now we can animate the eyeJoints_grp_L (TopLidUpDown) and test the eye setup and adjust the multiply and divide nodes to suit our character’s inner and outer eyes.

Now we’ll connect the eyeJoints_grp_L (botLidUpDwn) using the same technique but with the bottom lid connectors.

Skinning The Lids
We want to make a small range of motion on the eyes so we can skin the eyes correctly.

Set keys on the attributes
eyeJoints_grp_L (TopLidUpDown)
eyeJoints_grp_L (botLidUpDwn)

And then skin the eyes. We’ll also want to check a correct blink position too. With the bottom lid only coming up slightly to meet the top lid which comes down about 75%.

Eye Lid Left and Right Slide
Now we’ll setup the Lids LR. We’ll use the node editor in much the same way as we setup up the top and bottom lid up down. And we can use the same multiply divide nodes only this time we’ll be controlling y rotation instead of x.

After we’ve adjusted all the nodes we need to test out the Range of motion with the slide going left and right to see if it looks right. Adjust the multiply and divide nodes accordingly for the edges, a value on .2 works well for the inner and outer edges as we don’t want these moving much.

Repeat this for the top and bottom roll for the eyes (z rotation)

The Eye Controller and eye rotation
Next we’ll make the main eye controller that will sit at the center of the eye. It’ll control most tasks related to the eye.

Create the control and make sure it’s grouped and zero’d and in the center of the eye.

Now group the eye geo L and make sure the pivot is in the same place, in the center of the eye. Make sure the eye group has the same rotate order zxy.

In the connection editor connect the rotate of the controller to the rotate of the eye.

(could also have a joint and skin it)

Eye Lid Auto Slide and Blink
Now we want to have the eye lids slide automatically and have a control for blinking the eyes. To do this we’re going to use more nodes and a plusMinusAverage node to combine the slide LR and Up and Down with the blinks.

We’ll also nodes to reverse the bottom lid so the the blink meets half way and use the multipliers to set the range so that the blink default is 1 on both attributes.

Adding The Eye Aim
Now we need to create two more controls, the

eyeFollow_Cntrl
and
eyeSeek_cntrl_L

Position them exactly in front of the eyes but away from the body. Group each control so that they’re zeroed, but make sure that the pivot of the eyeFollow_grp matches world_faceControlsMatcher_loc, this will help us later with scale constraints.

Group the original eye control eye_cntrl_L to create a new group that we’ll use to switch the world space of the eye.

call this group eyeCntrlParentSwitch_L

Duplicate eyeCntrlParentSwitch_L and delete it’s contents call it eyeCntrlAim_L, this will be the group we aim the eye with.

Set up the aim Constraint
Aim Constrain eyeCntrlAim_L to eyeSeek_cntrl_L
There will probably be flipping issues due to the aimConstraint, set the offset to 0 and the vector to 0,0,1

Have the Seek follow the Follow cntrl

Constrain eyeFollow_Cntrl to eyeSeek_cntrl_L

Follow World or Seek
Constrain the eyeCntrlParentSwitch_L to both eyeCntrlAim_L and the world locator called world_faceControlsMatcher_loc. This will allow us to choose whether the eyes are in world mode or seek mode.

Now the eyeControl will follow the seekControl but the eye mesh will not. To get the correct orientation of the eye mesh we need to add both the EyeControl and the eyeCntrlParentSwitch_L with a plusminus average. Do that.

We’ll also need to change around a couple of values to get the aims to affect the lids.
– select the eye control and show connections in the node editor
– find the plusMinus (should rename)
– find the multiply divide nodes and change the rot x and y values

Add attributes to the eye control
showSeek (boolean)
seekSpace (enum: head,world)
worldNoSeek (boolean)

Connecting the showSeek
– Group the eyeSeek_grp_L and eyeFollow_grp so they’re under one group, we can use this grp to show and hide these controls visibility. Call it eyeSeekVis_grp
– in the connection editor connect
eye_cntrl_L (showSeek) to eyeSeekVis_grp (visibility)

Connecting the worldNoSeek
This attribute either follows the seek or world space
– open the Driven Key Window
– load eye_cntrl_L as the driver
– load eyeCntrlParentSwitch_L_orientConstraint as the driven
– key the parent so it works

Connecting the seekSpace
This attribute puts the seek object in world or the heads local space.
– select both the world_faceControlsMatcher_loc and body_faceControlsMatcher_loc and then the eyeFollow_grp and make a parent constraint (maintain offset on) it shouldn’t move since it’s pivot should match world_faceControlsMatcher_loc.
– Now with a driven key set this up so that the constraint matches the eye_cntrl_L seekSpace attribute.

At this stage we’re pretty much done with the eye joint setup. We can add blendshapes later. Clean up the head rig folder so that you can only see…

– headRigJoints
– faceControls
– matchHeadBody_loc
– world_faceControlsMatcher_loc

we should be able to select the two groups

– headRigJoints
– faceControls

And scale them and the head should scale correctly (eye balls not included). Not that this should matter much as the head will be scaled with the rig.

Mirroring The Setup

Leave a reply