A character I made have oval eyes and I’m trying to setup a rig on it. The eye is built using a UV sphere with a lattice modifier to hold on its oval shape inside the eye sockets. When I rotate the eye in object mode, the deformation holds. However, when I set a bone on the eye, the deformation is lost. The eye have the following Modifier Stack configuration:
1.Lattice
2.Armature
3. Subsurf
I already tryed to swap the Lattice and Armature positions on the stack but its no use.
Does anyone have an idea how can I set a rig without losing the lattice deformation?
It doesn’t. Try this: select the eye and rotate it all around and make the eye look down (90 degrees). You see that the oval shape stays inside the lattice. If you do the same with the bone in pose mode you will see that the eye go out of the lattice limits. I want the bone to behave like the first situation, so it can stay inside a eye socket.
No, don’t apply the lattice modifier. That completely defeats the purpose of the modifier, as the eye will no longer be dynamically deformed when moving.
Your setup is mostly correct, at least in the order of modifiers. I made only a couple of changes. First I’ve enlarged the lattice to suit the eye a bit better, but more importantly I’ve changed the location of the bone. The bone that controls the rotation of the eye should be at the center of the eye. The problem here was that the eye wasn’t rotating around its own center; it was rotating around some other point, making it bob all over the place. Turn off the lattice modifier in your file from post #1 and rotate the eye bone to see what I mean.
I’ve also added a track target, which makes it easier to rotate the eye in a useful manner. Here are my revisions: eye_problem.blend (592 KB)
I’m in my work now and I don’t have the model from which I got this eye. But your rig was exactly what I was trying to accomplish. I’ll get the model and test if the eye still fits in the sockets (it probably fits).
It should still fit. I didn’t really do anything that should change the size or shape of the eye. The only adjustment I made to the lattice was in Object Mode, so it should mostly just be an interface cosmetic change. Let me know if the shape is noticeably different though, because that would mean I’m slightly wrong about how lattices work.
It fits perfectly and keeps the deformation as it is. I took a while to find the right model (when I’m rigging I save a lot of backup files) but here it is. Anyway, thanks again K. Horseman.
Looking good! For a cartoony character you can also use the meshdeform modifier with shape keys on the deform cage to get squash and stretch on various parts of the body. The lattice eyes can be made to follow that as well. BlenderCookie has a whole course on that type of rig. http://cgcookie.com/blender/cgc-courses/creating-an-advanced-face-rig/
I am doing the very same thing with my character’s eyes. I used lattice modifier to get the cartoonish shape of rigged eye.
But one thing I miss here is - how to move the whole character using only one bone (most of the time i rig my bodies in that way, so I can easily animate - move/rotate the whole body/structure by moving/rotating just one bone.
In this example I see the same issue - eye rotation is working fine, but if one tries to move the main bone, eye mesh is “leaving” lattice cage and deforms in undesirable manner.
I found out that the applying the very same transform to both - the bone and the lattice does the job - for this simple example.
It is practicaly inapplicable in cases of more complex structures/armatures.
So I tried to put the lattice in the armature structure and make it follow the very same bone (the eye’s mesh control bone) - yet then mesh runs away from the lattice.
I am not a total noob with Blender and would appreciate any thoughts on this.
Best
It sounds like you’ve set the parent of both the eye and the eye lattice to be the eye bone. Correct? Your eye bone’s parent is probably the head bone. Try parenting the lattice to the head bone instead of the eye bone. Leave everything else the same.
As K Horseman said, you have to parent the lattice directly to the head bone. To do that, put the rig in pose mode, select the lattice object and parent it directly to the head_bone.