How to rig cartoon (non-spherical) eyes

I’m making a cartoony character with eyes that can roll around, but the eyeball shape appears “flattened” from front to back no matter what direction the eyes are pointing. (See first two images) In a 3d package this is done with a lattice or mesh deformer. But in UE4, I know of no such real-time deformation.

I tried parenting each rotating bone under a parent bone that was then scaled by 50%, hoping that the child bone (and the eyeball meshes skinned to them) would inherit the scale of their parent bones. But instead, as seen in pic #3, this doesn’t work in UE4.

The scale is “applied” permanently to the eyeball’s rotation bone, and the whole eyeball mesh rotates with a static flattened deformation on it.

Does anyone know of a way to accomplish a lattice-like deformation on part of a skeletal mesh?

World position offset! Okay, that sounds promising – I’ll work my way through it and post some findings should I come up with something worthwhile.Thanks!

Te recomendaria usar Blendshapes que adapten los movimientos de los ojos

I’ve tried the blendshape idea, but doesn’t give the best result. Would like to know how to get lattice deformations in UE4 too

for Lattice is the best that each deformation be a blendshape

Thanks, I’ll try doing more blendshapes to keep the shape constant

I am doing this in my game by creating a separate skeletal mesh with one eye in it, then I put two of those into the character blueprint. If you scale the component the eye rotation will happen in the new oval shape. Add Eggshell eyelids and things look even better

I was a rigger at pixar for 4 years and we did something similar for toy characters with simple eyes. Woody, Buzz and many other characters essentially all have the same eye rig it is just fitted and shaded differently. The rigging systems are completely different, but its the same basic principle, its all about the deformation/execution order. In one step the bones do their deformations as though they are unscaled and in another step unreal is scaling the component, because of the order of operation you maintain the oval shape.

This does mean you will have to work a little blueprint magic, but if you make your eye blink and eye dart animation procedural its pretty darn easy to setup.

Let me know if you have any questions

1 Like

That’s a fantastic solution! That actually results in the compressed, yet still rotating eyeball, without lattices, and still in engine. Thanks for the great idea!

I can’t seem to get this to work. I create a sphere, parent it to a bone (call it rotator), and parent that bone to a second bone (call it parent). In blender, when I rotate the rotator while parent has scaling on it, the eye stays deformed just fine.

However in Unreal when I scale the parent and rotate the rotator bone, the entire deformation rotates as if the parent had been scaled at a rotated axis!

Hey rotoslinger, I’m trying to setup cartoon eyes the same way. Do you have an example file/scene I can checkout on how to get the deformation/execution order working correct? I’m trying to get scaled cartoon eyes made in Maya working in Unreal by scaling the I joint deformation.

Having a clear map of how to do this would be nice. A Screen cap of the blueprint and rig/bones?

Thank you! Total hero!!

I realise this reply comes a bit late for most participants of the topic, but I figured it out thanks to roto’s excellent post and then saw some confused users, so for anyone else in the future Googling this…

Here’s my full repro for you:

  1. In Maya, create a sphere at (0,0,0). Create two joints. Parent one joint to the other, and ensure correct joint orients (Attribute Editor > Joint > Joint Orient – I did (-90, -90, 0) so Z is up and X is forwards). Set transforms to (0,0,0).

  2. Rotate the sphere so one of its poles faces down the Z axis. Freeze transforms.

  3. Select both joints and the mesh, and Bind Skin the mesh to both joints.

  4. Group all four objects together (CTRL/CMD+G). This may break the hierarchy of the joints. Reparent if necessary.

  5. In Rigging Mode, go into Skin > Paint Skin Weights.

  6. In the Tool Settings (top-right, hammer with the three dots coming out of it), select the parent joint, and hit “Select Geometry”. Flood all influences to 1.0.

  7. Select the faces and/or vertices around the forward-facing pole. Select one or two more rings as per your liking. This will be your pupil. Select the child joint, and flood influences to 1.0.

  8. Select the next ring of verts and use Paint Operation: Smooth. Smooth three steps. Next ring, smooth two steps. One more ring, smooth one step. We’re doing this to avoid shearing of the pupil geometry when we scale its joint up and down for cat eye and/or pupil dilation.


  9. For debug purposes to visualise where the pupil is in Unreal Engine, go into the UV Editor for the mesh and create a new UV set: UV Sets > Create Empty UV Set.

  10. Go back to the first UV set, and select the faces that match with the pole you used for the pupil. In my case, it was the top three rows of faces. Cut these from the first UV set.

  11. In the second UV set, paste them. In my case, they ended up all overlapping. For production, you’d want to clean this up so you can actually texture your pupil, but since I’ll be using flat colours in this tech demo, I don’t care.

  12. Time to export! File > Export All… → choose FBX format, and appropriate settings (e.g. Geometry > Smoothing Groups YES; Cameras NO; Lights NO; Audio NO; Axis Conversion you can leave on Y up (UE will fix this in Import)).

  13. In Unreal, Import your FBX as Skeletal Mesh.

  14. Right-click the eyeball Skeletal Mesh and Create > Control Rig.

  15. Right-click the parent joint and create a control, then right-click the child joint and create a control. Unparent both of these, then make the control for the parent joint the parent of the control for the child joint. You never want controls in the same space as the bones, to avoid double transforms!!
    Screenshot 2024-07-05 at 18.31.44

  16. Set up the controls so they drive the appropriate bones; drag a control into the graph and click “Get control”, then drag the bone you want it to drive into the graph and click “Set Bone”. Link them up from the Forwards Solve and attach the Transform pin from a Get Control node to its Set Bone node.

  17. Make the controls nice to use and see; e.g. use the Ring_Thin shape, and move them a little bit in front of the eye. I will explain why mine are a bit oblong in a moment.
    Screenshot 2024-07-05 at 18.31.58

  18. Make a Blueprint of type Character. Import your skeletal mesh of choice, then create a new child on the Mesh (CharacterMesh0) component of type Skeletal Mesh. Choose the eyeball you just imported. Put it in place, and scale it around a little so that it becomes clearly not-spherical. You want to be sure this effect is working as intended.
    Screenshot 2024-07-05 at 18.32.22

  19. If you now try to rotate this non-spherical eye, you’d run into problems as expected: the weird shape of the eye starts clipping through the mesh in all sorts of ways. This is the problem we’re solving! Keep going.

  20. Only one more step, really! Drag your Blueprint into the Level Editor, then open Sequencer and add your Character to the Sequencer. Twiddle down the controls for the eye Skeletal Mesh and find your parent bone control. Rotate it around… magic!!


    (You can see here that my controls are round instead of oblong. I inverse-scaled them in the control rig so they’d turn out round in Sequencer after being scaled in the Character Blueprint.)

As promised by our Pixar hero, we have now set up a system where, as far as the eye is concerned, it’s first deforming according to its spherical shape, i.e. rotating as a sphere would. And then Unreal goes “actually, you’re an oblong spheroid inside this character’s head”. The order of deformations is correct: we get a rotating eyeball that is non-spherical. BEAUTIFUL!!