Hi again,
Finished up the screenshots to help illustrate rigging an eyeball with a deformation lattice. I refer to this as a cartoon style eyeball, but this method could be used for realistic eyes as well. Most real eyeballs are not perfect orbs, and the lattice can help keep an eyeball from breaching the eye socket while moving around during an animation.
Cartoon eyeball rigging with a deformation lattice
NOTE: These notes are similar to process above, but include a few extra steps to support the use of a deformation lattice which may be useful for cartoon styled eyes.
Delete the default cube.
Add Suzanne mesh.
Delete center eye vertex and the surrounding two loops to open up the eye socket.
Object Mode with nothing selected.
Ensure cursor is snapped to World Origin. Right click in 3d view port > Snap > Cursor to World Origin.
Add UV Sphere
r x 90 enter
s .2 enter
Position in eye socket. It won’t fit very well. This is just a quick demo.
In Edit Mode, select the forward most vertex and next ring or two and sink them back into the eyeball to create iris. This will help make it easier to see eye movement later.
Duplicate eye for other socket
Select head and both eyeballs, g z 5 enter to lift everything up z-axis by 5 units. This just eases positioning with the rig we’re about to add.
Select eyeball, right click, Snap > Cursor to Selected
Add > Lattice (added at origin)
eyeball tutorial 08.png
Select lattice, right click, Snap > Selection to Cursor
While still in object mode, S .3 enter
Select eyeball, shift select lattice, Control + P > Lattice Deform
Select lattice, go to Object Data Properties > Increase Resolution U, V and W to 3
eyeball tutorial 08a.png
Select only the lattice and enter Edit Mode.
Adjust the vertices to deform the eyeball into the desired cartoon shape.
Object mode > reposition lattice (and therefore eyeball)
eyeball tutorial 09.png (I’ve hidden the right eyeball to reduce overlap confusion)
In object mode, test the eyeball’s deformation by selecting the eyeball and r, r, move mouse around.
The eyeball is rotating and deforming as expected
Control+Z any eyeball test rotations so the eyeball is pointing straight ahead.
Right click in 3d viewport > Snap > Cursor to world origin
Object mode with nothing selected. Add > Armature > Human meta-rig
While still in object mode, scale body up to match necks
Switching to Edit mode, select all bones above the neck and scale them out to align with the eyeballs. Try to align the base of the eyeball bone to (roughly) the center of the eyeball orb. It doesn’t need to be perfect, we’ll use the cursor to fine tune later.
Don’t worry about legs, torso, arms, mouth, ears or anything else. We’re just focused on the eyeballs for this example.
eyeball tutorial 10.png
Return to Object Mode with the armature selected.
Object Data Properties (running human icon) > click Generate Rig button.
NOTE: If this option is unavailable, it means the Rigify add-on hasn’t been enabled. Go to top menu bar > Edit > Preferences > Add-ons > Search “Rigify” > Check/enable “Rigging: Rigify”.
Use Rigify button to “Generate Rig”. The pointer might not immediately switch to hourglass/wait indicator, but be patient. This may take a few moments.
eyeball tutorial 11.png
The fancy rig will be really small. Scale it up to align with the original armature.
Delete the original armature.
eyeball tutorial 12.png
Object mode, select eyeball, right click, Snap > Cursor to Selected
Activate skeleton layer for eye mechanics
Edit mode, Select base end ball of rig:MCH-eye.L (Easier to select the whole bone then shift de-select the end ball out front.)
Right click > Snap > Selection to Cursor
eyeball tutorial 12a.png
Now it gets a little weird.
Select the fancy rig and activate the Torso layer. This is the 4th Skeleton Layer on the Object Data Properties tab. You can also press “n” in the 3d viewport and use the slide-in Rig Layers menu.
eyeball tutorial 13.png
Object mode, select lattice, Shift-select rig, Pose Mode, select “rig : head” bone, Ctrol+P > Bone.
eyeball tutorial 13a.png
Return to Object Mode.
Select the fancy rig and activate the MCH layer.
Object mode, select eyeball, Shift-select rig, Pose Mode, select MCH-eye.L, Ctrl+P > Bone.
Activate eye controls layer
eyeball tutorial 14.png
The eyeball shifted back into the head a little bit. Other times, the eyeball jumps off to some crazy location. I think it’s jumping to the point at which it was originally parented to the lattice. So, if I was working with the eyeball and deformation lattice off to the side somewhere then moved it into the head, that’s point in space where the eyeball leaps. That’s okay, because here’s the fix:
Object mode > select the eyeball > right click > snap selection to cursor (which was still at the earlier eyeball origin -where the bone base was snapped)
The eyeball seems to move back to where I’d want it.
eyeball tutorial 15.png
Return to Object Mode, de-select everything
Select the fancy rig, activate the Face Layer. This is the first layer on the 1st row of layers. It can also be accessed by pressing “n” to bring up the slide-in “Rig Layers” menu and selecting “Face”.
With the rig still selected, Enter Pose Mode.
Select the eyeball control circle, grab it with “g” and move it around. the corresponding eyeball should follow the eyeball target circle while deforming inside the lattice and remaining properly in the eye socket.
eyeball tutorial 16.png