Search Unity

Blender Actions get lost, only one makes it to Unity

Discussion in 'Asset Importing & Exporting' started by NestorAlgieri, Oct 26, 2011.

  1. NestorAlgieri

    NestorAlgieri

    Joined:
    Sep 11, 2011
    Posts:
    299
    Hi All,

    This weekend I've bit the bullet and watch hours of blender tutorial on my right monitor while following the steps on the left monitor. I went from totally confused and overwhelmed to being able to do really fun stuff I've never dreamt that I could to! I don't feel like using another weekend learning from scratch another 3d program now that I'm some what capable with blender. I can make a simple mesh character rig it by parenting it to an armature, unwrap my model by adding a seam, UV map it by exporting a UV layout export png and drawing on it in GIMP, animate my character in the action editor. Everything is perfect! I'm very excited to put my characters in my game!

    The problem is importing to Unity, I read tonnes of thread on this forum but I must be too dumb to learn from it so I need to ask. I was able to do it by fbx export and drag and drop to unity asset folder. Here are the problem details:

    FBX export: Works fine, any number of actions I have, they will become animation clips in unity. BUT, when the animation runs, the position of the game object will snap to 0,0,0 ( i think) this happens as soon as I run an animation either from script, or checking the animate on start box, the object will change its position. Almost seems like the animation has a transform in it.

    Drag n Drop: didn't work at first, but I went to the sticky link for blender 2.5 support on this forum and downloaded the posted python script and then put the FBX export py script in unity, then it works perfectly. I much prefer this than manual export. There's no bug where when animation plays and the position goes to 0,0,0. But the problem is if I have 3 actions, only 1 action will make it to unity, so I have to put all my animations in 1 action and split it during import.. which sucks, cuzz I don't get to name the animations clips and it's hard to organize needing to keep track of which frame is which animation.

    I am using unity 3.4.1 + Blender 2.6.

    Any help will be much appreciated!!

    Nepoez
     
  2. TheCasual

    TheCasual

    Joined:
    Sep 30, 2010
    Posts:
    1,286
    The same thing happens with Max and animations. The object will snap to whatever locations it was animated at in your software, but if you add them as a child to a non moving , non animated object, they will stay stationary.
     
  3. NestorAlgieri

    NestorAlgieri

    Joined:
    Sep 11, 2011
    Posts:
    299
    OK the drag and drop option actually worked perfectly. I didn't actually save the action in blender properly, I had to press the F button for some reason.. kind of unintuitive and misleading if you ask me. Perhaps someone could explain what's with the F button in blender, why is it needed?

    Anyways, drag and drop works perfectly in blender 2.6 unity 3.4.1. export still an issue with location being snapped, but perhaps willc has answered it, but I'm not going to go with that option as it's more work anyways. thanks!
     
  4. w00dn

    w00dn

    Joined:
    Apr 28, 2010
    Posts:
    275
    Can you try it with the attached .blend file? It contains a simple model with an armature and two actions.
    If this works, it's most likely a problem with your blend file and I would suggest you post it here or send it to me via pm.

    Oh and the F button is blenders (strange) way of not deleting :p As you might have found out, you delete stuff by marking it as "unused". Once you save and reopen the file, the "unused" stuff is gone. By pressing the F button on animations, textures, materials, ..., it makes sure that it is not deleted. I always think of it as F for Fake user...

    But yes, it's unintuitive and i would very much more like a system where you go and delete stuff manually...
     

    Attached Files:

    Last edited: Oct 26, 2011
  5. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I am using Blender frequently, but since a few released actions are not anymore saved by default. Indeed you have to press F for each action. But somehow that is not always the case.
    Unfortunately I can confirm that I lost a few animations like that too.
     
  6. NestorAlgieri

    NestorAlgieri

    Joined:
    Sep 11, 2011
    Posts:
    299
    Thanks so much all! It's working perfectly now!
     
  7. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    360
    I can't believe this is still an issue with Unity 2019.2.. You have to delete the original blender file and drag n drop it in again.. You can't just update the file!
     
  8. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    360
    Low and behold, the very next update for Unity in 2019.2.1f1 potentially has a fix for this...

    Asset Import: Fixed an issue where Unity failed to refresh the animation list after the source .fbx Asset changed. (1139051, 1172117)

    And guess what... It doesn't work for Blender files (which are exported as fbx behind the scenes by Unity talking to Blender).. Adding or editing actions in the Blender file do not show in Unity when the file is saved in Blender and even "reimport" from the menu!
     
    Last edited: Aug 16, 2019
    akuno likes this.
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Be sure to file a separate new bug report for it because potential reports aren't your reports and can be easily missed. It's the only way to get Unity to fix it usually.
     
    Ziplock9000 likes this.
  10. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    360
    Yup I just did 10m ago :)
     
    akuno and hippocoder like this.
  11. zachlindblad

    zachlindblad

    Joined:
    Sep 29, 2016
    Posts:
    39
    Hey @Ziplock9000 could you post a link to the issue you created? Running into this problem too and just want to track it. Not having luck with the issue search, not sure if it's already fixed in a newer version and I should just update, or if I should start manually exporting my blender models to FBX as a work around.

    Also big thanks for posting about it, thought I was going crazy for a bit lol.