Animation import not recognized

I’m trying to import an animation and unreal says my file “does not appear to correspond to selected type” and will import almost correctly, except that my character is lying on her back with her face twisted inside out. I built my own rig and everything works perfectly in Maya (using 2015). I was animating in a referenced file. My skeletal mesh has the same orientation issue, but her face is undamaged.

I’ve already dug through the forums for solutions and haven’t made any headway. I’ve exported an FBX with baked animation for the skeleton only as well as the mesh with skeleton (both Y up and Z up), baked the animation to the skeleton, exported skeleton with and without mesh with Y and Z up, I’ve tried reimporting the skeletal mesh, and I even tried painting the damaged face to a different joint with no success. She still imports on her back with a twisted face.

So far, I’ve had better luck with Y up (Z up punches a hole through her chest) and I can get all the frames, but her face and physical orientation are still mangled. I’m pretty sure it’s something on my end, but I’m running out of ideas. Help is very much appreciated!

If you are willing to send over an FBX or Maya file (both even better!) I would be happy to take a look and debug this for you.
(jeremy.ernst@epicgames.com)
Thanks!

Hey!

My apologies for getting back to you just now, today was a bit crazy!
Ok, so I’ve debugged what was going on and fixed the issue. Here’s a video walkthrough (no audio, sorry) that goes through my export process:

https://dl.dropboxusercontent.com/u/10939513/Import_Animation_Issue.wmv

The issue is that the skeleton hierarchy is under the rig hierarchy, and therefore has no keys. You could potentially use FBX’s bake animation option to resolve this, but personally, I would advise against it because your skeletal mesh and animation hierarchies in game won’t match. The animation hierarchy will include that MasterControl whereas the mesh won’t.

I wrote you an export script (in python. If you’re using LT, just let me know and I’ll write you a MEL script instead). For this script, you select the pelvis bone underneath your MasterControl, and then run the script:

rootJoint = cmds.ls(sl = True)[0]
namespace = rootJoint.partition(":")[0]

dupeSkel = cmds.duplicate(rootJoint)
if cmds.listRelatives(dupeSkel[0], parent = True) != None:
    cmds.parent(dupeSkel[0], world = True)
joints = []

for each in dupeSkel:
    if cmds.nodeType(each) == "joint":
        joints.append(each)
    else:
        try:
            cmds.delete(each)
        except:
            pass
            

for joint in joints:
    for attr in [".tx", ".ty", ".tz", ".rx", ".ry", ".rz"]:
        cmds.setAttr(joint + attr, lock = False)
    cmds.parentConstraint(namespace + ":" + joint, joint)

cmds.select(joints)
startFrame = cmds.playbackOptions(q = True, min = True)
endFrame = cmds.playbackOptions(q = True, max = True)
cmds.bakeResults(simulation = True, t = (startFrame, endFrame))

This will create a copy of the skeleton, constrain it to the original skeleton, and bake the motion down onto the copy. From there, you can just select the new skeleton that was created, and export selection. Once done, just delete the skeleton that the script created. I hope this helps clear things up! Basically, there was no actual animation data in the FBX file, because the motion wasn’t actually on the joints, it was on the controls.

Cheers!

It works now! I didn’t realize my controls would get in the way of exporting animations. I’ll make sure to practice building cleaner rigs so I can avoid this in the future. Thank you so much for helping sort this out!