Search Unity

Blender to Unity FBX not importing animations

Discussion in 'General Graphics' started by Viva-La-Baz, Feb 2, 2020.

  1. Viva-La-Baz

    Viva-La-Baz

    Joined:
    Jun 21, 2014
    Posts:
    50
    So my animations are not importing into unity properly, they are there i just cannot see them under the animation tab in the import settings.

    This is the model tab, Notice the animations are present in the project view.
    1.PNG

    This is the Rig tab set up as a Humanoid
    2.PNG

    And this is the animation tab with no way of editing the animations length or loop.
    3.PNG

    Is this a Unity issue or a Blender issue, Ive been attempting to fix this for hours but everything Im finding online isnt working.
    I use to primarily model and animate in 3DS max and not once did i ever have a problem importing an FBX into unity from it.
    Recently switched to Blender and its nothing but problems for me with FBXs.
    Im using the latest version of Unity (2019.3.0f6)


    EDIT: I imported my file in to an older version of unity (2019.3.0f3) and not a single problem.
    4.PNG
     
    Last edited: Feb 2, 2020
  2. SwatMessiah

    SwatMessiah

    Joined:
    Apr 3, 2017
    Posts:
    2
    I have problems too when i import a FBX with Animations (from Blender 2.81)... in Unity Version 2019.3.0f3, 2019.3.0f5 it works fine
    and now im trying it on 2019.3.0f6 and i get so much errors

    Old Unity Versions (2019.3.0f5)
    upload_2020-2-3_12-45-15.png


    Normal FBX (just Model) works fine.. but
    FBX with Animations i get a lot of errors
    upload_2020-2-3_12-45-31.png
     
    SgerbwdGwyn likes this.
  3. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    Yes we too get issues on the latest version. Not sure how this crept into the final release version, but I recommend submitting a bug report and posting back here with the case ID.
     
  4. SwatMessiah

    SwatMessiah

    Joined:
    Apr 3, 2017
    Posts:
    2
    MadeFromPolygons likes this.
  5. Viva-La-Baz

    Viva-La-Baz

    Joined:
    Jun 21, 2014
    Posts:
    50
    Yeah this still doesn't work in 3.1f1.
    https://ibb.co/kX1b9YY

    So the animation window is there when using an animatioin from Mixamo, but its not there when using a animation i made in Blender.
     
    Last edited: Feb 15, 2020
  6. SgerbwdGwyn

    SgerbwdGwyn

    Joined:
    Dec 2, 2013
    Posts:
    25
    Aye this is still completely broken, even in the newest alpha.
    I can't regress my project far enough without it breaking - I currently cannot alter any new FBX asset's animations.
     
  7. Kamosa

    Kamosa

    Joined:
    Oct 26, 2018
    Posts:
    1
    This is an issue for me as well, in 2019.3.0f6. My previous FBX animations show just fine, but a new one I finished today has the same problems, as well as continuous console errors about the window not showing.
     
  8. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    Still broken and unusable in 2019.3.
     
  9. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    Agreed, just came across this. To get around it we have had to import our model into maya and then export out as FBX, defeating the point of using blender altogether :(
     
  10. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    I switched to 2019.2. (in unity hub, change project version, kill library folder, when project loads, "upgrade" packages to verified versions. In my case upgraded package was timeline)

    Also copy-pasting material parameters from blender to unity by hand is not fun.
     
    MadeFromPolygons likes this.
  11. sxa

    sxa

    Joined:
    Aug 8, 2014
    Posts:
    741
    Looking at Blender Market, Ive found at least two Blender addons which seem to have enhanced FBX export (Better FBX Import/Export and Auto-Rig Pro), so that's a potential option...
     
  12. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    I would prefer to get rid of fbx entirely and use something else.

    It doesn't make sense to use fbx in blender in the first place - I mean it is proprietary format, and blender apparently uses solution that is based on a great deal of reversenginnering, given that autodesk sdk is not compatible with it.
     
  13. Chrisasan

    Chrisasan

    Joined:
    Mar 27, 2015
    Posts:
    270
    They should use the glb 2.0 format.
     
  14. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,160
    I think you mean glTF 2.0 and it simply is not mature enough to support at this time.
     
  15. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    I'm not sure about that. The spec is quite thorough and should support most things a game needs.
    https://github.com/KhronosGroup/glTF/tree/master/specification/2.0

    All things considered, game geometry and characters aren't so complex that they would need a very sophisticated file format. Adhering to some commonly used format makes sense though.
     
  16. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    Agreed. Been using it in some HoloLens applications and while the format is great in terms of file size, it comes with a host of issues right now. It just doesnt work 100% of the time. Its also not very good at materials yet. Most of the official exporters will sometimes work, and sometimes produce something that is missing materials or pieces of geometry or other important bits.

    You can view these issues upon export by simply viewing the exported GLTF model in a compatible model viewer. Microsoft were the ones that suggested using GLTF to us for HoloLens but as far as I am aware, even they are not using it extensively due to some of the issues that still need to be ironed out.

    I think once its mature it will replace FBX entirely however. Once its mature.
     
  17. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    It is possible that fault lies with exporter tools rather than format itself.

    For example, I'm fairly certain that some part of Blender --> Fbx --> Unity toolchain does not support pbr parameters, while GLTF should have them:
    https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#metallic-roughness-material

    The only issue with the format is that it is treid to hard to be opengl specific and coordinate system seems to be fixed:
    https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#coordinate-system-and-units
     
  18. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Just came across this thread. I've written a Blender To Unity FBX Exporter add-on that works perfectly with static hierarchies, but I haven't tested it with animations or armatures. Here's the link:

    https://github.com/EdyJ/blender-to-unity-fbx-exporter

    Could someone try if it works with animations? If so, maybe there's some difference when importing them in Unity. Otherwise, I'd appreciate having a simple repro scene so I could investigate the problem.
     
  19. davidheeren

    davidheeren

    Joined:
    Sep 10, 2022
    Posts:
    3

    The fbx for unity does not work with animations. It only does non animated models
     
  20. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    Just to be clear FBX importer in Unity does of course support animations in FBX. So i guess you wanted to state that above linked "Blender to unity FBX exporter" does not export animations ( i don't know, i did'nt check )

    Honestly i'm no sure why this github repo exists ... even without Better FBX ( a commecrial blender plugin ) , i assume the vanilla blender FBX exporter works good enough for animation and supports the required axis/unity conversions on export - or is that not the case ?
     
    zombiegorilla likes this.
  21. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    This thread is 3 years old... I don't know what was true back then but yes, you can export animations with fbx from blender to unity without any special plugins today in 2023.
     
  22. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    Dont necro threads. What we were talking about in here is not what you are refering to. This issue was resolved years ago.
     
  23. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    Yea, that plugin appears to separate from the builtin exporter and redundant.
    It does. We have use it in a production environment for years.

    I am going to leave this open for a couple of days just in case we are missing something that this provides. (but moving it to general graphics)
     
  24. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Yes, the vanilla Blender FBX exporter works with animations that import correctly in Unity. That's not an issue.

    However, when you're animating something from scripting (i.e. rotate some child object n degrees around its local X axis) we always encounter that the model imported in Unity has 90 degrees rotations already applied in the hierarchy. So the objects rotates around the wrong axis.

    Again, this is not an issue with animations, as imported animations are aware of that somehow and the animation just plays as expected. But for vehicles where you have a hierarchical tree of pieces you have to rotate from scripting, the vanilla FBX exporter never worked out of the box. Not even the "Bake Axis Conversion" option in the Unity FBX imported works correctly in these cases.

    This is the reason I ended up making the Blender To Unity FBX exporter. It guarantees that if you don't have any rotation in some object in your Blender hierarchy, then that object is imported in Unity with zero rotation as well.

    It now has been tested and works with animations as well. It might have some issues with rare corner-case situations, such as instanced collections, but it works perfectly in most common cases. Feel free to open an issue on GitHub if you experience any issues.
     
    Last edited: Nov 3, 2023
    kdgalla and zombiegorilla like this.