Home Unreal Engine

Non-uniform scale joint FBX export

polycounter lvl 6
Offline / Send Message
BTDarmstad polycounter lvl 6
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

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    This sort of thing makes the rigger in me shiver.. 

    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
  • BTDarmstad
    Options
    Offline / Send Message
    BTDarmstad polycounter lvl 6
    It does need to deform in engine. The idea is that it's an oblong eye that can rotate as the character is looking around while staying in place, inside the character's oblong eye sockets. I also have eyelids for the character made the same way, scaled up slightly to cover the eyes, and orbiting around them using separate joints all under the same parent joint that is scaled non-uniformly.

    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.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    I reckon blendshapes for the major form and uv transform for the pupil movement is your best bet. You won't need to rotate it then 

    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. 
  • BTDarmstad
    Options
    Offline / Send Message
    BTDarmstad polycounter lvl 6
    Thanks for the tip, I'll see if I can get it set up in UE4 later.

    (I'm not posting to bump the thread, but a duplicate of my previous post showed up here somehow)
  • Vexod14
    Options
    Offline / Send Message
    Vexod14 polycounter
    Hi there !

    @BTDarmstad did you have any update on this ? Seems I'm facing the exact same issue
  • Vexod14
    Options
    Offline / Send Message
    Vexod14 polycounter
    Just in case someone wants to track this too directly on the UE4 answerhub : https://answers.unrealengine.com/questions/963699/view.html
Sign In or Register to comment.