Why does my character's top joint rotation keep getting reset in preview?

My character is made in Maya using ‘y’ as up. UE4 uses ‘z’ as up. Although I got the character to be oriented correctly in the game, it’s still sideways when I look at previews (like Persona). Every time I use these, I pick the top joint and rotate it 90 degrees. However, I have to do this every single time I open a preview. Is there a way to make it remember the orientation I want in preview?

This sounds very odd. Using Maya Y-up and exporting with FBX should give you a properly aligned character, on import to the engine, without any additional setup. See if you have the proper settings in your FBX Exporter, I believe it should be set to Y-up there as well. Most likely the engine needs Y-up to understand it should convert the coordinates to Z-up. I’m not at the workstation now, but I believe that’s what I use as I have none of the issues you’re describing.

I would advice that you try to re-export your character, then import as a new character, and experiment with the FBX exporter until you get proper alignment by default. Then replace your current character with the proper version.

If that doesn’t work, please look at your animations and see if perhaps the root bone is being twisted to offset the character’s alignment. You can see this if the bind pose and animation values on the root bone are different in Persona.

I hope that helps.

What happens is that in the game Unreal orients the animations to the model. In the preview windows in orients the model to the animations. Very inconsistent and I don’t understand why. If I set maya as ‘z’ up and rotate the top node 90 degrees in every animation, it all works but I have too many animations to do this with (hundreds). What a pain. Is there no way to tell the preview to remember the rotation I gave it?

Are you sure that you haven’t oriented the skeletal mesh for the character so it appears correct? Check in your components and see if the mesh has offset values.

I can’t say much more without looking through the assets myself, but you should not get different results in different views unless there are transforms somewhere.

Well for your future reference, Unreal is ‘z’ up and there’s no way to change it. If you import a character made ‘y’ up, something should be 90 degrees off. If not, you should check your pipeline and see where you’re compensating for it (to know). My guess is that you switched Maya to ‘z’-up at some point.

On my side, the model and animations are made ‘y’ up in Maya, and neither the model nor the animations have any root rotation in them. As a test, after exporting the model into FBX from Maya, right there, I imported the animation data right into the same exact model that I had just exported, just to make sure everything was consistent. Once I applied the animation to my model, I exported the animation into FBX with the same exact settings.

In Unreal, the model comes in upright, but the animations come in sideways. The mystery is NOT that the animation come in sideways. That’s the expected behavior. The mystery is why does the model come in upright. Regardless, since the model is upright, the games plays upright. Since the animations come in sideways, all the animation previews are sideways. Rotating all the animations by hand would be too big of a task for me. In Maya’s FBX converter I tried playing with the axis conversion settings, but they don’t seem to be doing anything (tried it both ways on the model and animations not seeing any difference in either).

The FBX pipeline has support for converting between Y/Z world up axis. Which works well when jumping between Max and Maya. Support was in UDK, so UE4 should not be much different.

I made a simple scene in Maya 2015. (FBX 2014) A character with Root, Pelvis and arm bones. I exported by selection: bones and meshes.

  • Maya Scene: Y-up
  • FBX File Format: 2014 (2013 works as well), Y-up
  • FBX exported Mesh: smoothing groups, tangents, triangulation on. Animation off.
  • FBX exported Animation: same settings + animation on + bake animation 0:30

I tried importing everything twice. First I used default settings. Second time I used Frame T0 As Reference Pose. Only difference is less errors about no bind pose.

As you can see from the screenshots everything works fine. I assume that Unreal still uses X as forward axis, so the only offset seen is in Yaw; the skeletal mesh assumes Y as forward axis. That is same orientation as Epics example content for third person character. (the blue dummy)

I have attached my scene and FBX files for you to look at.

I still don’t see how the problem is with Maya and UE4 having different up axis. FBX should take care of that.

(I’m having attachment issues, I’ll see if I can post multiple replies)

Here are the screenshots that didn’t want to be attached in the previous post.

First is animation in Persona.

Second is reference pose.

… and last, two meshes in the scene played in simulation.

I know this discussion doesn’t answer your question of adding a permanent offset. Hopefully, you’ll solve it one way or another.

Ok I made progress. Your rep convinced me there was some bug in Unreal’s fbx importer (inconsistent behavior = bug or unhandled case). I looked for possible candidates for something unusual Unreal might not handle. I noticed the top node in my skeleton hierarchy was not a joint (just a regular transform with everything zero’d out), switched it to being a joint, and the problem went away. My guess is that the code that looks for axis orientation checks that top node when processing an animation file, for whatever reason, and chokes on it. Although the model file also has that node in it, it doesn’t choke on it. Only chokes if it’s trying to read an animation.

EDIT: I just corroborated this. Thinking that the code that converts from y-up to z-up doesn’t run in an animation if the top node is not a joint, I set up a test character and animation, with Maya set as z-up, and the same non-joint node present. If my theory was correct, the result in unreal should match maya since no axis conversion is necessary. That’s exactly what happened. This also rules out the top node itselt as being the culprit. Any wonkiness in the top node would show up in the z-up test, yet that wasn’t the case.

It’s great to hear that you successfully found the source of the problem. I think Epic would appreciate it if you could report this to them, as using groups with no transformations is quite common after all.

I’m grateful for this because now I know another thing to avoid while working with Maya<->UE4. :slight_smile:

Hi rantrod and Denny -

Yes this is a known FBX importation limitation, but thank you for your diligence in tracking down the bug, it is something that we are aware of, but I do not have any ETA on possible fixes. For now, the best option is to stick with Joints and Mesh.

Thank You

Eric Ketchum