Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Resolved Mixamo imported FBX has broken 0 rotation T-Pose (marthon-envs broken character)

Discussion in 'Animation' started by NT_Ninetails, Dec 21, 2022.

  1. NT_Ninetails

    NT_Ninetails

    Joined:
    Jan 21, 2018
    Posts:
    196
    I exported some fbx animations from Autodesk Maya to test out the marathon-envs machine learning project. after following the tutorial to setup a new character I noticed that the when all the joints are reset to their initial positions, my character didn't look right.


    At first i thought the code in the project was broken so i spend the last 2 days coming through the code and copying all values and import settings from the project onto my model. Nothing worked and I was ready to give until I decided to switch the avatar definition in the animator controller from mixamo's avatar definition, to the one provided by the project. When i did this the animation now looked broken but the initial position of mixamo's model was correct!
    upload_2022-12-21_0-21-30.png
    (i was going for a t-pose with this one and it's close)

    So i was like "yoooo it's the avatar definition, I figured it out!.......what's an avatar definition do?"

    according to unity it's "The Avatar system is how Unity identifies that a particular animated model is humanoid in layout." (I just looked this up while writing this and didn't have this information before)

    so anyway I'm playing around in the editor and decided to 0 out the rotation of the project's sample model and mixamo's model and this was the result:
    upload_2022-12-21_0-25-32.png
    (project model on left, mixamo model on right)

    So now I'm like "Yoooooo mixamo's the reason I've been suffering!" So I went back to Maya, zeroed out the rotations, deleted non-deformer history and exported back to Unity. That fixed nothing.

    So After a few more hours of reasearch and testing in Unity I now have the solution:

    shoutout to Blackpinecone for leading me in the right direction with this video!




    Solution:



    This is caused by incorrect World Joint Orientation. The joints provided by the project are oriented in world space while mixamo's exported joint are not. This is the space mixamo's joint are oriented in according to maya:
    upload_2022-12-21_0-30-34.png



    This is incorrect and to fix it you have to follow these simple steps:

    1) If you try to check the "Orient Joint to World" box and hit apply then your model will look all busted up. what you need to do is first is unbind the skin from the model while keeping the history.
    upload_2022-12-21_0-36-29.png

    then you select all the meshes and bones and perform the joint reorientation to world.
    upload_2022-12-21_0-37-22.png

    Then you reattach the skin and congrats you fixed the model.

    NOTE: all animation data seems to be lost...still working on that..
     
    Last edited: Dec 21, 2022
  2. NT_Ninetails

    NT_Ninetails

    Joined:
    Jan 21, 2018
    Posts:
    196
    ok it looks like you can still do animations if you setup your fresh model like this:
    upload_2022-12-21_0-48-50.png upload_2022-12-21_0-49-6.png
     
  3. NT_Ninetails

    NT_Ninetails

    Joined:
    Jan 21, 2018
    Posts:
    196
    I'll be making a video tutorial regarding this issue later most likely later.