Search Unity

Internal Blender importing doesn't import all actions

Discussion in 'Asset Importing & Exporting' started by aleksigron, Mar 15, 2013.

  1. aleksigron

    aleksigron

    Joined:
    Dec 16, 2012
    Posts:
    14
    So I'm pretty new to animations both in Unity and Blender, but otherwise I have used these programs for years now.

    I'm creating a first person adventure game and currently I am animating the player character and bringing them into the game. I have separated the animations into multiple actions. When I bring the model into Unity by first exporting an FBX file into the assets folder everything works as expected. But I feel like the constant exporting is a bit of a hassle and there's always the danger of not remembering to change all the export settings the right way.

    So obviously I would like to put the .blend file directly into the assets folder and just edit it right there with no need to export every time. But when I do that, the internal importing Unity does, doesn't import the actions correctly. It only brings the default take and nothing else. I have even tried to find the problem in the Blender FBX exporter python files, but the Unity defaults are setup correctly there.

    I have searched all relevant sites but I can't find anyone with this problem. Everybody always says you should just export the FBX. Should I just accept the inconvenience and export the FBX file or maybe put all the animations into one sequence and split them up in Unity?

    I'm currently using Blender 2.66 and Unity 4.0.1f2. I know Unity 4.1 should be out already but it doesn't want to update.
     
  2. pixoloco

    pixoloco

    Joined:
    Dec 22, 2011
    Posts:
    47
    hmm weird, I always use .blend and I have all my actions.
    - the animation is apply to an armature or to an objet ?
    - In blender, did you check the F button (save datablock even if it has no users) for all your actions ?
     
  3. aleksigron

    aleksigron

    Joined:
    Dec 16, 2012
    Posts:
    14
    Yes, I have the F button enabled on all actions and the armature is connected to the mesh. As I said, the animations import correctly when I export to FBX manually.
     
  4. pixoloco

    pixoloco

    Joined:
    Dec 22, 2011
    Posts:
    47
  5. aleksigron

    aleksigron

    Joined:
    Dec 16, 2012
    Posts:
    14
    Thanks for the reply and the file. Unity does in fact import all actions from that file. But I cannot find whats different from mine just now. I'll take a look at it again some other day and hopefully find what's the magic bit that's preventing it from working correctly.
     
  6. nipoco

    nipoco

    Joined:
    Sep 1, 2011
    Posts:
    2,008
    I suggest always to export the FBX, because this is the only way to have the full control about your file (i.e. animations and the right axis orientation).

    The problem with the Unity importer is, that it gets often broken with a new version of Blender. In your case it apparently does not import actions at all, because you use 2.66

    You can save different presets in Blender's FBX exporter. So you don't need to remember every single setting. Just choose the saved preset from the drop-down menu.
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Just so you know, Unity doesn't technically have any internal Blender importing. It opens Blender in the background and makes it export to FBX transparently.

    --Eric
     
  8. pixoloco

    pixoloco

    Joined:
    Dec 22, 2011
    Posts:
    47
    I use 2.66 and i don't have any problem with . Blend import since 2.55 when the fbx exporter of blender was messed up.
    Ctrl-s and alt-tab are my friends :D
     
  9. ennexs

    ennexs

    Joined:
    Mar 18, 2013
    Posts:
    2
    If you get it working, please tell us! I have exactly the same problem, I only get the default take (and a few older actions that I don't need right now), but not the actions that I do need. I will keep troubleshooting and will reply here if I find a solution.
     
  10. ennexs

    ennexs

    Joined:
    Mar 18, 2013
    Posts:
    2
    I found a solution! It was really quite simple, I just baked the animation in Blender to a new action (just press space and type Bake Action). After the baking was complete I clicked F and saved the file to my assets folder for the Unity project and after the import all the baked actions were there. Hopefully Unity's keyframe reduction on import got rid of the insane number of unwanted keys from the baking in Blender.

    But at least it works to import the .blend file to Unity with all the actions I want now.
     
  11. GrooGadgets

    GrooGadgets

    Joined:
    Apr 2, 2009
    Posts:
    71
    Hey guys,

    I'm having the same problem, I just can't get ANY actions to work in Unity! I have downloaded .blend files that work (like the anim.blend above) and they work fine but I just can't see what's wrong with my own .blend file.

    Can someone please download my .blend from the link below and either tell me what's wrong or repost the .blend file with the fix?

    https://www.dropbox.com/s/paoyekrv01djw3b/blob_test.blend

    Thanks in advance, I really hope i've just forgotten to flag a setting or something, it's driving me mad and stopping me from moving on with me game!

    Cheers,

    Simon
     
  12. pixoloco

    pixoloco

    Joined:
    Dec 22, 2011
    Posts:
    47
    It seems to me that you have animated the armature instead of the bone in pose mode. You should keep a clean armature with no rotation/scale/translate and animate only the bones.
     
  13. schuette

    schuette

    Joined:
    Jan 6, 2013
    Posts:
    14
    I'm fairly new to Unity and Blender. What I'm seeing is that animations (actions) that involve armatures export from Blender to Unity fine using "internal" automatic exporting, but that animations of objects that don't involve armatures are ignored and not exported.

    For example, an action which simply slides a cube a few units along the x axis is not exported.

    I don't find that distinction documented anywhere. Is this a feature, bug, or something I'm doing wrong?

    I'm using the latest versions as of today: Blender 2.68 and Unity 4.2.1f4, and tried this on both a MacBook Pro with OSX 10.6.8 and a Windows 8 machine.
     
    Last edited: Sep 21, 2013
  14. ActionDanNZ

    ActionDanNZ

    Joined:
    Nov 17, 2017
    Posts:
    2
    Four years on and I am new to unity and I am having the exact same problem. Schuette's question was not answered. I wonder if anyone can answer this now. Basically, it still seems to be that you need to be animating armatures in pose mode in order to have multiple actions load through to unity, otherwise if you animate just by moving an object around, that only ever comes through in the "default take" action. Any answers would be appreciated.
     
  15. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    Well, if it is me...I don't do any animation is Blender for Unity that isn't Armature poses or vertex skinning, as those are the only ones in my experience that seem to always work. For the other stuff, like simply moving a cube, Unity has an animator that uses the same keyframe type system you find in Blender, but it actually works.