Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Maya to Unity - No solution yet

Discussion in 'Editor & General Support' started by Jayrastaman, Oct 5, 2014.

  1. Jayrastaman

    Jayrastaman

    Joined:
    Sep 13, 2014
    Posts:
    9
    Hello -

    I have posted multiple posts in multiple forums (cgsociety, autodesk, unity answers, etc.) with the same question and no one is able to help me as of yet. My game is now a month behind because of this issue.

    I am simply trying to get a model with animation on it from Maya 2014 to Unity. I am not using any fancy rigging systems; simple 16 bones rig with 1 iK chain.

    What is the exact protocol from Maya to Unity? I need a step by step solution, please. I have already gone through over 20+ pages of multiple google searches including youtube videos, etc. and I can get NOTHING to work. The closest I have gotten was I had the animation working in the preview window but would not work when I placed it in the scene, and when I placed it in the scene the model was deformed incorrectly.

    I am trying to get an animated tentacle model into unity. So far, to no avail. Does anyone on planet earth have a solution to this? I have actually found myself looking around for different softwares, but I really don't have the funds or time to change toolsets. I have been using Maya since version 4 (before autodesk bought it), so I know I am exporting correctly. I have been using Unity for about 5-7 months now. I have had extensive training with Unity so far. I say all that to let all know I am not an amateur.

    I am actually hoping for a answer from Unity support team.....But if anyone else has a solution I will gladly try it out... All I know is I have run out of ideas concerning how to do this; I have posted on Unity answers the same post twice (on purpose) and no one knows what to do - I got an answer that suggested I change to 3ds Max... I can't say how stupid of an answer that is, but anyway.....

    Please advise....If I can't get this to work out I will have to cancel Unity and my project and begin learning a new toolset; I don't want to do that. PLEASE.....help me get this to work. Thank you in advance.
     
  2. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,489
    I export to FBX, then import to Unity. Going directly from an MB to Unity doesn't work as well in my experience.
    I haven't tried importing any live IK information, but I never had any issues if I baked a keyframe into the bones on every frame. I should mention that I am still using the legacy animation system and not Mechanim because this project has been going for a VERY long time...

    If you want to post the model (or just the bones with a substitute skin) I'd be happy to test and see if I can get it in and tell you what steps were involved.
     
    Jayrastaman likes this.
  3. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,613
    Unity doesn't support imported IK from external tools - i.e. you can't take an IK chain in Maya and have Unity create the same IK chain on import. You have to bake, as guavaman says.

    If you got the animation working in the preview window, then that sounds like you had it right but were missing an Animator Controller asset for your game object at play time.
     
  4. Jayrastaman

    Jayrastaman

    Joined:
    Sep 13, 2014
    Posts:
    9
    I attached one of the Maya files that I am having trouble with. The only difference with this one and the other 4 is the fact that this file does not have the material files. It just has a basic Blinn material that I use for my work when I build/create. All 5 file I am working on are different tentacles (for front, back, sides, etc.). When I put them together they will essentially make a type of monster I am creating. The final material is always last in my personal workflow. Anyway, It does contain the animation and rig, etc (important stuff).

    Thanks for the offer to help. I really appreciate it. Once again, thanks in advance.
     

    Attached Files:

  5. Jayrastaman

    Jayrastaman

    Joined:
    Sep 13, 2014
    Posts:
    9
    Thanks for the reply. i didn't see it till I posted my previous post with the file. I did try to add after baking and I get the same result - no animation in Unity. Sorry I forgot to mention that before. I have tried so many things I am losing track of what I have tried.....Thanks for the reply though.
     
  6. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,489
    @Jayrastaman I tested your file and initially had the same issues exporting from Maya 2015.

    The first thing I noticed was the model was coming into Unity really small. By clicking on each bone I was able to see that they were all being put in roughly the same position in space. Obviously, this isn't right. Then Unity gave me this error:

    From that error, it was pretty easy to figure out what the root of the issue was. The world scale is causing a problem. Disable the auto scale and set your scale to centimeters in the FBX exporter. If your model comes out too small in Unity, adjust the scale in the importer options.

    It seems this issue has been around a while: http://answers.unity3d.com/questions/187902/maya-file-fbx-file-unity3d-is-it-a-bug-on-the-scal.html

    The only other things I did was enable bake animations, disable lights, camera, and blend shapes. But after some trial and error, the only thing that made it start working was setting scale to CM.
     
  7. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,489
    Here's an FBX you can try
     

    Attached Files:

  8. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,489
    I wasn't sure if Unity had added that at some point so I didn't want to say it wasn't possible. It's been quite a while since I was setting up the characters and animation in my game and a lot has changed since then. A bit surprised this hasn't made it in by now.

    As superpig said, you do have to add an Animation Controller too and set up the animation.
     
  9. Jayrastaman

    Jayrastaman

    Joined:
    Sep 13, 2014
    Posts:
    9
    I had to take a few days off - I was getting very stressed out because of this issue....Now, I just downloaded the attachment in your reply post and I got it working. Thanks a lot for helping me out, guavaman. I'm going to bookmark this post for future use. Finally after 2 weeks of frustration, I can continue forward with this project. Thanks again.