Search Unity

Maya FBIK Animation Problems

Discussion in 'Formats & External Tools' started by mgravelle, May 2, 2008.

  1. mgravelle

    mgravelle

    Joined:
    Jun 22, 2005
    Posts:
    35
    I have encountered a very annoying bug with the Maya FBX exporter and I'm wondering if anybody has a workaround for me. I have a FBIK rigged character with a few extra joints (tail, antennae) that aren't part of the FBIK system. The animations in Maya are nice and smooth . . . but as soon as I export as FBX weird things begin to happen with the animations. By comparing the graphs of the FBX and Maya models, I can see that they don't match up. It seems that it's not interpolating the animation curves correctly in the export.

    Here's what I have tried . . .
    - Importing the maya file directly into Unity. This creates even worse results because none of the FBIK animations work, even if the animations are baked in the import settings.
    - Numerous variations of the FBX export options in Maya.
    - Deleting non-deformer history in maya.
    - Baking in keyframes by using "Bake Simulation" in Maya

    I'm still relatively new at animations in Maya -- and this is actually my first experience with FBIK.

    Any ideas welcome!

    Thanks,
    - Matt
     
  2. Brian-Kehrer

    Brian-Kehrer

    Joined:
    Nov 7, 2006
    Posts:
    411
    we use FBIK for our entire pipeline.

    To get files into unity, you MUST bake to FK before you export if you want to avoid horrible FBX bugs.

    We animate with FBIK, bake to FK. Then i'll usually preview / cleanup the keyframes. Delete the FBIK rig and any other extraneous data and export (skeleton only) using FBX.

    All skinned mesh data is exported separately. This keeps the models and animations separate, which is handy, actually.
     
  3. mgravelle

    mgravelle

    Joined:
    Jun 22, 2005
    Posts:
    35
    Thanks Brian for the info! I'm about to give it a try right now.

    To be extra clear, what do you specifically do to "bake to FK." Is this found in Edit -> Keys -> Bake Simulation? Or is that something else entirely?
     
  4. Mr. Animator

    Mr. Animator

    Joined:
    Oct 2, 2005
    Posts:
    193
    Bake simulation will do the trick (you'll see it generate a key on every frame).
     
  5. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Really curious if this worked... baking the FK inside Maya should be similar to baking it in the Unity import settings. Let us know if this solved your problem.
     
  6. mgravelle

    mgravelle

    Joined:
    Jun 22, 2005
    Posts:
    35
    Unfortunately, baking the keyframes did not solve the problem. Everything appears normal in Maya, but when I export to FBX it still introduces the strange phantom movements. I get these warning messages when I export:

    The plug-in has changed some FCurves tangents type to User to ensure interoperability. This mode change will not affect the FCurve's values

    Maybe this has something to do with it?
     
  7. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Ok, I'm now pretty much convinced that this is a problem with Maya and little to do with Unity. I'll file a bug with Autodesk tomorrow with your example and see if they have any suggestions.

    Ethan
     
  8. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    Hey all,

    I'm having the same problem with Maya, and I just want to get rid of this crappy FBIK. It has given me nothing but problems :/

    Anyway I cant seem to get bake simulation to work properly. It creates the keys on my skeleton but when i delete my FBIK it kills my animation for some reason.

    Could someone please take a look? I have no idea how to delete the FBIK and its essential to a school project I'm working on. Thanks.

    http://gtproductions.net/uploads/punk_character.zip

    -Alex
     
  9. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    I gave up and reanimated. Ah well, never using fbik again.
     
  10. mitul087

    mitul087

    Joined:
    May 5, 2009
    Posts:
    1
  11. fox

    fox

    Joined:
    Jan 14, 2009
    Posts:
    118
    This is the proper way to bake the FBIK in maya:

    1. First of all, select all of your joints in the outline.
    Then select the transform and rotate channels in the attribute editor.

    Pic of step one:


    2. Then go to edit>keys>bake simulation option box.
    Make sure that Hierarchy is "Selected", and Channels is "From channel box".

    Pic of step two:


    3. Remove your effectors and your fbik. Save your file, import it to Unity.
     
  12. media3d

    media3d

    Joined:
    Apr 15, 2009
    Posts:
    32
    Brian,
    Been wondering about this. Using Max here, and we have a bunch of custom animations, I've exported them all and able to call them in Unity.

    I've exported via fbx, baked animations and all, but still import the whole mesh + skeleton. How do I go about just exporting the bones alone?
    Can I export just the tpose and then export the bones alone and apply these to the mesh in Unity?
    Thanks
     
  13. quelareine

    quelareine

    Joined:
    May 7, 2009
    Posts:
    1
  14. media3d

    media3d

    Joined:
    Apr 15, 2009
    Posts:
    32
    Got it to work

    I exported the file as fbx, without the deformation, and it only exported the bone animation. Using the right naming convention in Unity brought that in and it worked almost great( did get some weird bone movement, but seems easy to fix)

    I also deleted the mesh in before exporting and the file size was WAY smaller.

    thanks
     
  15. Lincoln

    Lincoln

    Joined:
    May 26, 2009
    Posts:
    1
  16. Mrguy

    Mrguy

    Joined:
    Jun 9, 2009
    Posts:
    8
  17. clairebear04

    clairebear04

    Joined:
    Jul 14, 2009
    Posts:
    2
  18. giyomu

    giyomu

    Joined:
    Oct 6, 2008
    Posts:
    1,094
    no they don't until you know what you are doing ;)
     
  19. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    To those of you using FBIK.

    How?

    I know how to set up FBIK and use it, but it seemed so buggy to me it was unusable. Like I would copy and paste a key, then the whole skeleton would break. Or sometimes keys just wouldn't copy at all. Or I couldn't get it to work at all with trax, or at all with animation layers.

    To anyone using FBIK succesfully, did you run into any bugs and quirks like this, how do you avoid them?
     
  20. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    Just set FBIK keys instead of the regular set keys command and everything should be fine. Remember to set the right FBIK options (body, part, etc) before setting keys. Generally I block in animations using Full body mode and then fine tune the animation using parts keying, works great.

    FBIK is sensibly harder to master than traditional rigs but provide many advantages for complex body animation. You get a much more stable rig and all IK is projected internally to "realistic" movement curves, instead of the linear movements you get from traditional IK generally, very nice.

    Although I also got the export problem for additional bones appended to the rig, will try the bake-in-maya approach and see if it works things out.

    Update: Found the bug with joints appended to the FBIK skeleton not work even after baking. Apparently it's a bug with the FBX implementation (I've tried many different versions to no evail), it seems to ignore all bone weighting past the "default skeleton hierarchy" of the FBIK naming conventions. Just save the file in Maya format and Unity will read it without a hitch.
     
  21. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    But what about animation layers, copy and pasting keys, trax editor?

    Every time I've attempted to use FBIK myself in maya the skeleton always freaks out at some point.
     
  22. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    What's the problem you get with them? Like I said, just stick to set FBIK keys instead of the regular set keys. Also use 'delete FBIK keys' instead of delete keys, right click on the time track and you'll see the option. Haven't tried using the trax editor with FBIK, but I've seen some people using it in videos (Maya to MotionBuilder workflow) with no problems.

    If by "freaking out" you mean losing correspondence between the FK and IK skeletons, well, there are many ways to "fix" that, all very well documented. In short, stick to Full Body IK keys as far down in the animation process as you can, body part and selection (even in the FBIK options) generally lead to this asynchrony - especially if you use them in far between keys. As a last resort you may try a small - and very very handy - script called FBIK_CTRL, you can find it easily on creativecrash.com. It's got a "match effector" option that's aimed to synchronize both sketons, just remember you will need additional (and traditional) keying of the FK and/or IK skeleton. Use it as a last resort.

    Seriously, fine tuning FBIK animations *are* a bit of a pain, but it's miles easier to get things to pro level than every single other rig I've tried, including Anzovin's.

    One last and very important tip: remember the problem of appendage joints being inadvertently scaled? Well, there's an easy fix for that. Just select every joint of your appendages and in the attribute editor (ctrl+A), joint tab, de-select the 'joint scale compensate' option. Bingo! :)

    PS.: Why on earth would Autodesk add support for this option in FBX when NO other of its applications, or 3rd party applications, support it? Just to take our sleep away, probably.
     
  23. davinzi

    davinzi

    Joined:
    Jan 16, 2011
    Posts:
    2
    THX man~It works. tip: From channel box