Unable to control both eyes at the same time with eye rig

Context:

My model’s eyes are not spheres; they’re faces that are part of the head model.

Each of the eyes have their own materials:
image

and each of those material’s texture coordinates are manipulated by drivers:
image

These drivers are from the x and z coordinates of the LookAt bones in pose mode:
image

If I move LookAtTarget.L and LookAtTarget.R individually, their pose-position values change and I can see the eyes move with their respective bones:
image

which is great. It’s working perfectly.

Now, I would also like the LookAtParentTarget bone to move BOTH of the eyes at once. So what I did was I parented the previous bones to LookAtParentTarget:
image

and when I moved JUST THE PARENT, the child bones did move with it but the eyes didn’t. When I inspected the pose-position values of the child bones, I see that they did not change:
image

How do I resolve this?

Note: the child bones are still working as intended (they move their respective eyes) but when I move the parent bone, the eyes do not move with it (and I suspect it’s because those location values are still zero).

My goal is to be able to move them individually as well as both at the same time.

Please refer to the video

Add…

Alternatively, you can use the UNWrap modifier.

I tried using local constraint but it didn’t do anything.

By the way, I was following this video:

in the comments, the person who made the video suggested to use local constraints if we wanted a controller to move both of them :

however I tried this and I can’t get it to work. I unparented one of the eyes from the parent while keeping the other as a child. I did this because I wanted to see if the parent-child relation has any effect on this. Anyway, for LookAtTarget.L (unparented) and LookAtTarget.R (parented), I added a local constraint on each of them:

image

As for the constraints, I tried messing around with the values for both the parented and unparented targets:

image

but when I move the parent target, the eyes didn’t move.

Has anyone been able to get this to work?

For stuff like debugging drivers, it’s helpful to post the file. If you don’t want to share your entire model, that’s fine, all that’s needed is the parts that you are having trouble with - the eyes and the targeting rig.

As you discovered, the drivers can’t read the actual position of the target bones - only the relative position of the bones relative to their rest positions in the reference frame of the parent bone.

Try this:

  1. Add an empty inside each eye where roughly the middle of the eyeball should be, with the Z direction pointing forward and Y direction pointing up.
  2. Parent these empties to the head bone or to the eye master bone.
  3. Add a damped track constraint to each empty to point the Z direction toward their respective target bones.
  4. Add a copy scale constraint to each empty targeting their respective target bones. Set the target space to Local.
  5. In your material, in the texture coordinate node, set the object to each eye’s respective empty, and use the “object” coordinates. Delete the drivers for the X and Y location in the mapping node and hardcode the values to 0.5.
  6. Adjust the mapping scale to an appropriate size.

With this setup, you get control of the eye’s position and size without using drivers.

2 Likes

Here is the blend file (it’s a Blender 4.0 file):
test.blend (2.6 MB)

I also tried what you suggested but eye did not orient correctly.

I forgot one step to get the object coordinates method to work, so I have edited the steps to add in an offset of 0.5 to X and Y location.

I tried out his tutorial myself and it didn’t work either, so I downloaded his full rig which was linked in his next video. The drivers in the rig are different, and do work with the copy location constraint.

Tutorial driver:
image
Rig driver:
image

Why he uses a different driver in the tutorial than his rig is a question only he can answer.

I’ve modified your blend file to show how both methods are done. You didn’t pack the eye texture so I used one I had lying around. One eye uses the driver method, and one eye uses the empty method. Modify the shader nodes to switch between them.

sonic eye rig.blend (2.8 MB)

1 Like

Thank you very much for looking into this and I apologize for forgetting to pack my eye texture.