Exporting Lattice deformed eyes to unity or Unreal

I have a curious questions. I’ve been looking around trying to find a way I can export lattice deformed eyes into other stuff such as unreal or unity. My current interest in getting characters into unreal for some possible animation or game development.

For people that might not get what I’m trying to export, I’m trying export lattice eyes, where the pupil moves, but the eye maintains a oval shape.

Anyway, I know that blender will not export modifiers with filetypes like fbx, which I want to use for this. Is there anyway to export deformed eyes that are animate-able?

1 Like

Shape key animation can be exported to game engines.

I’ve tried some shape keys, but it doesn’t look too good cause the shape of the oval eye warps between shapes. At least that is how it goes for me. If anyone wants to show me how shape keys can work with oval eyes, be my guest

1 Like

Some illustration could help you get more detailed answers. Uploading a blend file is the best way to get the best help.

This is what I am trying to achieve. I don’t know how to have it in other file types such as fbx

1 Like

You can add in-between shapes between extremes to make the interpolation better. The more the better, I only added one.

eye_shape_key_anim.blend (816.8 KB)

Yeah, I can see how that can work. Truth to be told, it didn’t come to mind to do something like this cause I’m only really familiar with how bones and shapes keys could be exported. I didn’t know animation could also be exported. Any place I can read more on the subject?

I was not able to make the suggested method of shape keys work in Blender 2.8, and I used 17 shape keys. The problems is that the basis for each key is the same and the shape of the mid-transition is often very strange.

(note: I am a new user and not allowed to post the necessary images required to describe this problem, so I am posting a GIF animation below and linking you to the same question I asked yesterday on Stack Exchange, which has all the images I needed.

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:

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

Demo

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:

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:

I tried making 17 shape keys for the right eye based on a forward looking direction but this arrangement does not seem useful, as it does not enable a good blend from any one key to any other, only between that key and the basis (and even that can look strange). How is this going to work with an armature?

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. Here is the diffuse texture for the eye:

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:

  • Is there really no way to make keep the lattice deformation?
  • How are shape keys supposed to work with an armature?
  • Solutions must be viable with Unity

Thank you!