Rigging a non-spherical cartoon eye for game engine

When I create an eye that is a perfect sphere everything is easy, the eyelids and iris move around the surface without issue. But when the eye is more flat or oblong, it confuses me on how to animate it. One trick I’ve found is if I start out with a sphere and then scale just the bones until the eye is the desired shape, it will still animate as if it were a sphere as long as I don’t apply Rotation & Scale.

My question is, can I animate like this and import it into a game engine somehow? I have only a basic understanding of rigging, but from past experience trying to animate it seems as if not applying rotation and scale to your bones causes issues.



Heya,

Generally speaking, game engines only work in the simplest form of animated meshes. Meaning, they see a mesh with an armature, and they move the verts based on the weight that the verts has to their respectives bones.
So, as long as you manipulate the verts only by scaling the bones and stuff, Which you have done. I don’t think that should give any problems.
It’s only when you use modifiers like latices, that it won’t translate to a game engine.
You can however, in the Unreal engine for example, also make use of shape keys. And in the engine they’re called morph targets. I’m not sure if other engines also support shape key animating, I’ve only looked at the Unreal engine.

So in short; moving/scaling things by weighing vertices to bones should always work!

I have no experience with unapplied scales of bones, but as long as all the scaling is done in pose mode, it should just be considered as part of the animation, I think?

Hope I was of some help!
Goodluck!

Well I’m scaling the whole armature in object mode, I can’t actually do it in pose mode, it doesn’t achieve the same result. Will scaling a whole armature fly while animating? I don’t have enough experience to know. I am using unreal engine so morph targets are a possibility, but I’m not sure how it would work for the iris-- since it needs to track targets.

I was hoping there was some kind of constraint or parent/child workaround for this.

No Scaling the thing in object mode won’t translate well to the engine, I’m gonna have a look if I can get a child/parent thing to work.

Hey again,

It works by just making a child/parent relationship between 2 bones. simply rotating the child while the parents y axis is scaled down.

In the blend file I’m about to show, The deforming bone is the one copying rotation from the IK bone. In order to play with the amount that the deforming bone rotates you have to increase/decrease the influence of the IK bone. Also note that the copy rotation has to be set to Local Space-Local Space.

Ah well the file will show ya, goodluck!

SillyEye.blend (5.11 MB)

Thanks a lot, Furik. I was able to reproduce what you made and it seems to work well. It’s a bit over my head why the IK constraint is needed, but it works so I won’t question it. Hopefully this translates well into UE4 because it seems like a really simple effective method for these kinds of eyes.

Oh the IK constraint could aswell be a ‘track to’ constraint, I just somehow got used to applying IK constraints to everything :stuck_out_tongue:
But I’m glad to hear it works for you!