3
$\begingroup$

I have a rigged model of Thwomp that I need to export to Unity. The eyes are animated using an armature and Lattice Deformation modifier. As I understand it, you can't export Lattice deforms to Unity (in fact, even my bones seem to do nothing after import, but that's a different problem). So what I think could be a good alternative is shape keys, but I am having trouble.

Here is my model, a regular Gary Busey:

enter image description here

Here is what the rig can do in Blender. I would like to have the same capabilities in Unity after export:

enter image description here

Here are the objects that make the right eyeball. The right lattice deforms each of the right eyelids and the eyeball itself. I just realized I don't have the eyelids rigged right now but...baby steps:

enter image description here

Here is the armature. You can see that each eye is aligned to a bone that points towards the target. The parent bone may be superfluous but it is there to keep all the bones together. I would like to keep this rig on export. The single target has the desired effect of making Thwomp appear to be leering, but I can also set it at a far distance if I need him to appear less cross-eyed:

enter image description here

I tried to make shape keys for the right eye with the armature and lattice modifiers still active, but I found that I cannot scrub between shape keys after making them. Applying the lattice modifier and de-parenting the armature after the fact does not help. There is only imperceptible movement while scrubbing the values for the shape keys:

enter image description here

Whatever solution I settle on, it needs to use the existing textures and UVs because it took me 2 days (solid days!) to bake all the textures (read: Diffuse, Normal, Roughness) for this model and the eyes were the trickiest part. This is an original [fan]project and I made all the textures myself (not including the concrete texture, which is a free texture from TextureHaven--and I have since altered non-eye textures to match the UV's at a better scale, which was more tedious work):

enter image description here

I don't think ('THINK'!) animating the texture coordinates is an option for a mapping like this and the deformation would probably be too extreme anyway. But I am open to suggestions if your experience says otherwise.

So, recap:

  • How can I make shape keys for these eyes and retain my armature?
  • Is there a variation or alternative to shape keys that I have not considered?
  • Solutions must be viable with Unity

Thank you!

EDIT: I made some shape keys and they look terrible. All of them use a forward looking direction as a basis and they do not blend well together. The more extreme shapes are unnatural in the intermediary blend value even without other shapes being mixed:

enter image description here enter image description here enter image description here

How can I get my character rigged properly for my game??

$\endgroup$
2
  • $\begingroup$ What's the point here? To reimplement how bones work with shape keys? You could try proportional editing to linearly displace vertices to the right on one shape key, to the left on another, then also top, bottom, and control the angle of displacement with a combination of influence on those shape keys... $\endgroup$ Sep 7, 2021 at 6:57
  • $\begingroup$ What does the lattice accomplish? Are you trying to change the shape of the eyeball as the eye moves? You can probably accomplish this using bone scaling and volume preservation, the way bouncing balls are rigged. $\endgroup$ Sep 8, 2021 at 0:28

1 Answer 1

1
$\begingroup$

Notice shape keys happen after bone deformations, so they can correct wrong bendings etc. Though they're not aware of rotations, simply the vertexes move from position A xyz to B xyz, so rotating eyes by shape keys is never perfect for this, ea a shape key with eye -90 degrees does and value of 1 It Will look terrible at value -1 (it will stretch out a lot on the other side) Also, the -90 degree bending would shrink the eye and starting to look strange at -45 degrees.

With a lot of coding you could do it in substeps from 0 to -30 to -60 to -90 and 0 to 30 - 60 - 90 degrees repeating it for up and down, and then a lot of code to calculate rotation per focus point. You'll be coding a lot to get something like that working, thats not the way to make games efficiently.

But looking back at the problems,...
You also seem to be in trouble about the eye shape itself, you like them to look outward, while also don't like that this leaves you with an eye that doesn't fit the shape properly.

My advice here
Well if I were you, I'd tackle this differently, let the eyes roll out You can create the optical nerves as a slightly horrific 'rope' shape. You know the snail of sponge bob, eyes lack that put outwards.. So if the central bone moves forward your eyes move in front of it, then they can be spheres. (the player would most likely see it as a sphere if it's a 3d game, an elliptical sphere pointing at you will be seen as a sphere).

Additionally, when this figures awakens you might then literally roll the eyes forward like how a ball would roll.

But i realy want those pointy eyes... (not recomended).
Add another bone in the eyes so you be able to stretch them forward. This allso allows for adjusting them back to round eyes to better match the object, you be able to invent some new expressions. ;)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.