Hey, everyone!
I've been banging my head against the wall for half a year (!) about a particular issue for a personal project.
I have this character, rigged in Maya (previously rigged in C4D as well), who I'm going to export to Unreal Engine 4. This character has eyeballs that are non-spherical, as in not perfectly round. I believe I have found a way to get them working properly using a joint hierarchy in which one joint scales and one rotates.
The problem is that it doesn't seem to export properly. For a long time I thought the issue was with UE4, but I think I found the solution to that (check "preserve local transform" when importing, and it seems to import non-uniform scale joints just fine).
Any suggestions on how to get this working in an FBX export from Maya?
Here's what happens. Top is from C4D (I'm currently converting to Maya), in which I get the desired results, and the bottom is how it displays in UE4. The red stripe marks the bottom of the eyeball.
Alternatively (feel free to direct me to the UE4 board), could I get the desired result using a shader on the eyeball?
Replies
If it needs to deform in engine, I'd use a blendshape/morph or make a cunning rig from a few bones.
If it doesn't, reset the transforms before you export it.
I'm not sure what unreal can do WRT non uniform scaling in engine but I'd usually avoid any sort of wonky transforms at export
Also yes, you could use a shader to deform it
The eyes are supposed to do minimal deformation when not considering the non-uniform space it has to rotate in (only a few blend shapes for slightly exaggerated facial expressions would require the eyes to scale up slightly for still fit the eye socket).
Apparently, UE4 does support non-uniform scale animation, but the provided examples don't show any rotation:
https://docs.unrealengine.com/en-us/Engine/Animation/NonUniformScale
The problem I find with using blend shapes, is that I can't have the eyes rotate while keeping them in the eye socket. They would just be a couple of deformed spheres popping out of the eye sockets when they rotate. The only theory I have that could work with blend shapes is storing lots of eyeballs rotated in different directions and doing some scripting to make them rotate with an aim constraint (or whatever makes eyes look at stuff in UE4, haven't gotten that far yet), but that would look really choppy, and then I would have all the various eyelid states for different facial expressions to go through as well (the eyelids in the Maya rig adjust to different facial expressions, not by blend shapes, but by orient constraints). It sounds like a really messy process that won't even be optimal.
I'm already planning to redo the character with different eyes that are easier to get working in UE4 (something like https://www.youtube.com/watch?v=hWxAw_mVASM, but with blend shapes for facial expressions and blinking rather than animated textures), but I would have liked to keep the current one for a demo. I would also have to figure out how to get UV offset to work with aim constraints in both Maya and UE4, unless you're supposed to do all eye movement in UE4.
You should be able to hook the uv offset up to match maya in unreal, just base it on a target rather than animating the uvs explicitly and hook it up with blueprints.
(I'm not posting to bump the thread, but a duplicate of my previous post showed up here somehow)
@BTDarmstad did you have any update on this ? Seems I'm facing the exact same issue