Search Unity

importing Maya models animated with IK

Discussion in 'Asset Importing & Exporting' started by aaronsullivan, Jan 13, 2006.

  1. aaronsullivan

    aaronsullivan

    Joined:
    Nov 10, 2005
    Posts:
    986
    Disclaimer: I could have sworn this topic was up in the forum sometime in the past or maybe on a documentation page, but I can't find it, so...

    I've been trying to import a model from Maya that was animated via IK handles. The problem, I think, is that the keyframes are recorded on the IK handles themselves and Unity doesn't have an IK solver. So, yes, the handles move, but it doesn't effect the bones/joints in Unity like it does in Maya, so the model just sits there, motionless... yet laughing at me somehow... :eek:

    I'm pretty sure that the person who asked this got a satisfactory response and I thought maybe it had to do with baking the keys or something, but that just bakes the IK handle keys, not the transforms of the bones.

    So, really, what I need is a magic button, or possibly a way to convert animation controlled by IK transforms to bone transforms.

    Any Maya experts that can come to the rescue? :D
     
  2. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    hey aaron, this was my question before, and baking the anims in the import panel solved the problem... "bake simulation". my goober guy in the "3rd person controller" thread used IK and they're saved as .mb files in that package file... so maybe playing around with that file could unearth any differences that are making your maya import not work? and yeah, the ik handles show up in unity, but they're just empty objects with no influence on anyhting.

    HTH
     
  3. Guest

    Ah, the import settings! That's it. Let me try...
     
  4. aaronsullivan

    aaronsullivan

    Joined:
    Nov 10, 2005
    Posts:
    986
    (that was me)
    Works great. I spent so much time in Maya and forgot all about the import settings in Unity. Is there a way to just make those import settings apply to all the imported models? Looks like no.
     
  5. ScottHarris

    ScottHarris

    Joined:
    Jan 11, 2006
    Posts:
    10
    which import settings worked?
     
  6. aaronsullivan

    aaronsullivan

    Joined:
    Nov 10, 2005
    Posts:
    986
    Right-click on the model in the Project Pane. Choose "Import Settings" and then check the "Bake Simulation" check box. :)
     
  7. Mr. Animator

    Mr. Animator

    Joined:
    Oct 2, 2005
    Posts:
    193
    IK isn't the only thing that baking will let you bring into unity.

    Let's say you have an elaborate character rig that has complex set-driven-key relationships, such as a muscle bulging bone that is driven by the bend of an elbow, or face shapes you've tied to sliders. Those kinds of relationships obviously won't translate over to maya, but they can be baked just like IK. As long as you only use bones (no blendshapes or other deformers) you can pull off some high level mesh control.

    Just remember your 4-bone-per-vert limit. :)
     
  8. Kripto

    Kripto

    Joined:
    Feb 12, 2007
    Posts:
    119
    Hey guys,

    I'm trying to do this with Maya's Full Body IK feature and can't get it to work. I've tried baking in Maya as well as upon Unity Import. Any ideas?

    Thanks
     
  9. bigbrainz_legacy

    bigbrainz_legacy

    Joined:
    Jul 15, 2005
    Posts:
    137
    To get Maya's FBIK into Unity, you just have to bake the FBIK animation into the controller skeleton in Maya. In other words, there's a fancy FBIK skeleton that drives the simplified joint-based skeleton, which in turn controls the mesh. The only thing that hung us up for a while was getting the bake settings correct.

    A quick test for that is that when you've baked it correctly in Maya, you can delete the fancy IK skeleton and all your animation will still be intact. In fact, that may be a necessary step.

    From there it should be hard not to get it into Unity because you no loner have any constraints or anything to trip you up. Let me know if anything's not working smoothly about it.
     
  10. DocSWAB

    DocSWAB

    Joined:
    Aug 28, 2006
    Posts:
    615
    Nope -- it's one by one unfortunately.
     
  11. Kripto

    Kripto

    Joined:
    Feb 12, 2007
    Posts:
    119
    Thanks for your help.

    The current solution that I just got going is to export as FBX instead of a native Maya file. After adjusting import scaling in Unity (NOT in Maya, as I had read elsewhere) everything came in perfectly.

    I do however still have some strange objects coming into Unity which appear to be the control effectors from the Maya FBIK setup. If I can delete them without killing the animation, they will go.