Search Unity

Exporting a rigged model from Maya to Unity

Discussion in 'Animation' started by Anzuue, Oct 30, 2020.

  1. Anzuue

    Anzuue

    Joined:
    Oct 30, 2020
    Posts:
    5
    Hi, I'm new here so I don't know if it's the right section, if not I'm sorry, but I can't find anywhere a solution and I Need help.
    I have created a model of a human body in Maya 2020, and I've also rigged It, and I wanted to export it into Unity. So I animated It, cached the animation, and exported all in FBX file, then dragged It info Unity. I connected the rig to the body (in avatar definition etc...) in the inspector Windows, but when I tried to play the animation in the animation tab nothing appened and I cannot understand why. I watched a lot of tutorials on internet, but none of them fixed the problem.
    So my question was if someone could help me to understand what I did wrong, or redirect me to some guide for exporting rigged model with or without animation, from Maya to Unity, and if with the animation how to make them working in It?
    And also, watching tutorials I couldn't find one that exported only the animation, but all the tutorials exported the mesh + rig + animation, but what If I already have my rigged model in Unity and just wanted to import the animation without re-importing everything else? Is It possible? And if so how?
    I Hope I explained well, if not I'm sorry but I'm currently studying english.
    Thank you so much.
     
  2. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    A few things. 1. If I'm having issues with an animation I import the animation back into Maya to see what the extra data looks like. This eliminates the file being the issue. 2. You can export "animation only" if you disable the skin checkbox inside of the FBX. I used to do this, but don't anymore because, if you ever want to pull that animation file over to another app you don't have the mesh anymore. 3. Once you define your avatar in animation file A, then when you import animation file B, go to the rig tab and pick the pre-existing avatar definition vs creating one from scratch. This will keep things clean on the import. 4. Sometimes I don't see animations playing in the import preview window. Just drag your file with the avatar definition complete into the window to tell it to use that rig.
     
  3. Anzuue

    Anzuue

    Joined:
    Oct 30, 2020
    Posts:
    5
    Hi, thank you for replying!
    So, I tried to Import in Maya the .FBX file I exported to Unity, and I could see that the rig was moved Away from the Mesh, and It wasn't attached to the mesh so obv the animation wasn't working. As I could read online, FBX files doesn't save Control rig perfectly so what can I do to export my rigged model without problems?

    * the model in .MB Is perfectly rigged and animated, without problems, It changes when I export it in FBX and re-import It in Maya, so this Is why in Unity the animation doesn't work I think.
     
  4. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    Yeah. This is where things can get hairy (if the rig you're animating wasn't designed for exporting to another app). Example: relies on Maya specific mesh deformers. Etc, Etc. you're out of luck without fixing the base setup. If the rig is game-engine friendly then you need to make sure your export options are correct. The biggest of which is making sure you're animation data is baked. Then any constraints will be converted over to raw transform keyframes. I usually keep my game mesh and skeleton in a separate group, then have a Maya specific rig drive the game skeleton. The decoupling of the game rig from the control rig saves a lot of headaches if you have to make changes mid-production.

    anim_export_options.PNG
     
  5. Anzuue

    Anzuue

    Joined:
    Oct 30, 2020
    Posts:
    5
    Ok thank you I'm gonna try again and give an update!
     
  6. Anzuue

    Anzuue

    Joined:
    Oct 30, 2020
    Posts:
    5
    Hi! Exporting the rigged model I couldnt find the "connection" parameter between embed media and advanced option, what can I do?
     

    Attached Files:

  7. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    Odd. No clue. I bet you'll be ok with it off. The key setting is the bake options.
     
  8. Anzuue

    Anzuue

    Joined:
    Oct 30, 2020
    Posts:
    5
    Ok so apparently I managed to export it, i changed the FBX type from 2020 to 2013 and It worked, I don't understand why and I didn't believe It could be that the problem. Anyway I could have fine It with the animation, but if I want to export Just the rig how should I do?
    Thank you again
     
    earth2jeremy likes this.
  9. wrensey

    wrensey

    Joined:
    Mar 12, 2017
    Posts:
    15
    For anyone who is having a related problem and using Maya 2023. The only way I could fix this was by switching to Maya 2022 and exporting my rig from there, I was banging my head against this for two days trying every option, and could not get my rig to export using 2023 at all. Only Maya 2022 worked.
     
  10. nguyennhu_thieny

    nguyennhu_thieny

    Joined:
    Jun 8, 2017
    Posts:
    3
    Not really related but I have the same export settings as you but somehow the fbx Maya file is heavier than the fbx export file from Blender. it's not clear why Blender's fbx still works fine on Unity with 1/3 the size of the fbx from Maya !