Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Maya rig to Unity: issue with the joint orient

Discussion in 'Formats & External Tools' started by methusalah999, Apr 24, 2020.

  1. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    644
    Hi there !

    I'm having an issue when importing a rig from Maya to Unity. The issue occurs both with FBX export and .mb files directly.

    I read in the Unity dos that the Maya joint orient value is not exported. Aa we can see in the image below, it is not, indeed. I understand it is not a issue in most situations but as my character is driven by physics (ragdoll and else), I need to have correct bone orientations

    Is there a workaround or a Maya script to update children transform and obtain the correct bone orientation when exported to Unity?

    Thanks in advance !

    upload_2020-4-24_16-56-3.png
     
  2. fengkan

    fengkan

    Joined:
    Jul 10, 2018
    Posts:
    82
    Hi, I have the opposite problem, the joint orient is exported in my case, do you know how to make the rotation in Unity the same as in Maya? Thank you.

    3.png 4.png
     
  3. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    644
    It's not the opposite. Is actually the same. What differs from your situation to mine is that in my case, there was a rotation axis set to the opposite of the joint orient in Maya, which was cancelling things. I can see that your rotation axis is left to zero, so you got the negative joint orient as base rotation in unity.

    The reality here is that a joint in Maya is described by three rotations: orient, axis and rotation. While a game object in unity only contains one. Information is lost on import.

    I personally solved that problem by adding a game object in-between. The parent is rotated like the joint orient, and the child rotation is zeroed. During simulation, only the child is rotating. This way rotation in unity exactly matches rotation in Maya whatever it is and limits remain correct in all axis.


    Hope it helps
     
    fengkan likes this.
  4. fengkan

    fengkan

    Joined:
    Jul 10, 2018
    Posts:
    82
    Thank you for the explanation, I didn't notice about rotate axis before. Your information is very helpful!

    I ended up by freezing the transform to zero out the joint orient btw.
     
    methusalah999 likes this.