Creating a Rotating Eyeball Setup from a Given Non-Spherical Eye
1.
Create a perfect sphere with enough geometry and place it as close in size and center as possible to the general shape of the “Given Eyeball”.
2.
Duplicate sphere and rename one as “BaseSphere” and the other as “DeformSphere.”
3.
Selecting the DeformSphere, create a lattice deformer with enough subdivisions to be able to recreate the shape of the given eyeball by deforming the sphere. Remember the settings used.
4,5,4 or 5,5,5 subdivisions have given good results so far while still being manageable.
4.
Duplicate the lattice before moving any vertices and rename it to Lattice_Orig and hide it. (Won’t work on anything, it’s alright, it doesn’t need to)
5.
Shape the first lattice so the DeformSphere is as close to the given eyeball as possible, (the closest you get the better the result). For shaping it, move the individual lattices or use soft modification to move them along with their surroundings. Use transparency mode to check everything matches as closely as possible.
6.
When done, duplicate the DeformSphere and rename it as WrapShere.. Next, select the Given Eyeball and make it a live surface. Select all vertices in the WrapSphere and scale them slightly just so that they’ll pop into place and finish matching perfectly the shape of the Given Eyeball. (The less they need to pop into place the more exact the setup will be).
The logic behind this is that the most important part for a cartoon eyeball to work is that the base shape before any lattice is a perfect sphere, for this reason, it’s necessary for the deform sphere to match as perfectly as possible so that it’ll transform back to a perfect sphere.
7.
Once the WrapSphere is a perfect match, select all the elements of the Given Eyeball and then the WrapSphere and create a wrap deformer, so that when the WrapSphere is deformed it will deform as well all the Given Eyeball elements.
This is in case there are separate objects for the cornea, pupil, limbus, etc if there is just one then just wrap that one.
8.
Select the BaseSphere from the beginning and the WrapSphere and create a blendshape so that when it’s turned on the Wrap Sphere goes back to being a perfect sphere and it moves the Given Eyeball elements with it. This is the process to convert the given, deformed eyeball into a perfect Sphere so it can be rotated.
9.
Place a joint in the exact center of the sphere by selecting all the vertices, creating a cluster deformer (It will be placed in the center of the eyeball) snapping a joint to it, and then deleting the cluster. Rename the joint to L_Eyeball_Jnt.
10.
Erase history on all the Given Eyeball elements and hide and Wrap Sphere (it’ll be needed for the right eye).
11.
Select the Lattice_Orig (1) and then the first lattice (2) and create another blendshape node so that when it’s turned on, the first lattice will return to its perfectly square shape and when it’s turned off the lattice will go to its deformed state. Turn the blendshape on (3) so the lattice will turn back to the square.
12.
While the first lattice is still a square, go to the windows menu -> Relationship Editors -> Deformers set, and add all the Given Eye elements into the deformer set for the lattice. If there are multiple in the scene, then the one pertaining to the first deformer can be found by selecting the deformer and looking at the output tab in the Channel Box.
13.
Once they are connected just turn off the blendshape and let the lattice go back to its deformed state and it will deform the eye to its “original” deformed shape. (How close it actually depends on how close the DeformSphere was to the Given Eyeball’s original shape). The lattice can then be edited afterward by creating another blendshape in case the deformation isn’t perfect or some fixes need to be made.
14.
Now bind the Given Eyeball meshes to the eyeball joint and go to each of the meshes, open the right click marking menu and go to inputs -> all inputs… and place the lattice deformer over the skin cluster.
15.
Congratulations!!! You now have a perfectly rotating deformed eye!!!
Extra: Creating the right side
1.
Select the BaseSphere, FirstLattice (in it’s deformed state) and WrapSphere and duplicate them. Rename old objects that belong to the old setup by adding the prefinx “L_”to them and the new ones an “R_”, the duplicated First Lattice which should no work on anything) will be called “R_Lattice_Deform”.
2.
By selecting the R_BaseSphere create a new Lattice with the same settings as the first lattice, this lattice will be referred to as the R_Lattice.
3.
Connect the R_Lattice_Deform to the R_Lattice with a blendshape so that when it’s turned on the lattice will go to the deformed position.
4.
Group the R_BaseSphere, R_Lattice_Deform, R_WrapSphere and R_Lattice (Everything bellow the _______ group) together and scale that group in -1 X.
Rename the group to R_Eyerig_Grp.
Group the elements from the original setup under the name L_EyeRig_Grp.
5.
Wrap all the “R_” Given Eye elements to the R_WrapSphere just like before with the left side.
6.
Connect the BaseSphere to the WrapSphere using a blendshape and turn it on to make everything into a perfect Sphere and to place a R_Eyeball joint like before.
Delete the history on the “R_” Given Eye elements. Hide the WrapSphere, it’s not needed anymore.
7.
Check the name of the deformer set of the R_Lattice and with the blendshape off (meaning it’s a perfect cube). Connect all the R_ Given eye elements to it just like before.
8.
Turn on the blendshape on the R_Lattice to recreate the deformation.
9.
Finally, bind the R_Eyeball_Jnt to the R_GivenMesh objects and reorder the inputs like before. And that’s it. Two working cartoon eyeballs from previously deformed objects.