Search Unity

Blender could not convert the .blend file to .fbx file

Discussion in 'Asset Importing & Exporting' started by Holyaj, Nov 28, 2014.

  1. Holyaj

    Holyaj

    Joined:
    Mar 5, 2014
    Posts:
    5
    So i have finally gotten a 3d model to use and it was for blender. I figured out that I can drag the .blend file into the unity assets for my game and it will convert the .blend into the correct file that Unity can render it for. It tells me this every time I try to put this .blend file into unity and I don't know why. Everything I have found about this are for older versions of both unity and blender.

    So a little help would be greatly appreciated.
     
    stillasleep07 likes this.
  2. christinanorwood

    christinanorwood

    Joined:
    Aug 9, 2013
    Posts:
    402
    I think you need to be in Object mode in Blender for the fbx converter to work. Is you Blender file in Edit mode?
     
    lukicamukica likes this.
  3. Holyaj

    Holyaj

    Joined:
    Mar 5, 2014
    Posts:
    5
    Well that's just it though, i am not using blender at all. I am just dragging the .blend file into unity from the folder its in.
     
  4. christinanorwood

    christinanorwood

    Joined:
    Aug 9, 2013
    Posts:
    402
    Perhaps you could install Blender (it's free), open it, save the file and close again. This should give you a file with a cube. Save that into your Unity assets directory and see if the cube is available to you. If it is than the Blender fbx exporter is working correctly.
     
  5. Holyaj

    Holyaj

    Joined:
    Mar 5, 2014
    Posts:
    5
    I will give that a try.
     
  6. Holyaj

    Holyaj

    Joined:
    Mar 5, 2014
    Posts:
    5
    Yeah, it still didn't work. So I don't know what I should do.
     
  7. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    Well, I can confirm you would have to have Blender installed if you are directly using .blend files. Unity internally uses .fbx files. When it opens up files from applications like Blender, max, maya(not fbx files), it actually behind the scenes opens up the application(sort of) and exports to fbx for importing into Unity. So if you don't have Blender installed you won't be able to directly use .blend files.

    The other thing special was mentioned above. In Blender, if the object is in edit mode, the export will fail, regardless of whether Blender is open or not at the time. You have to make sure to be in object mode for things to work right.
     
  8. christinanorwood

    christinanorwood

    Joined:
    Aug 9, 2013
    Posts:
    402
    I just tried it myself. If I saved a blender file to the Assets directory the export to fbx failed. However if I used the file menu to export as fbx it worked correctly. I suggest you use the File->Export->AutodeskFBX with your Blender file instead of just saving the .blend in the Assets directory. Not sure why that is not working.

    Here's a video on exporting from Blender to Unity.
     
    Last edited: Nov 28, 2014
  9. Holyaj

    Holyaj

    Joined:
    Mar 5, 2014
    Posts:
    5
    This did work, but there is a bunch of extra stuff with the model, so I guess I need to break out how to use blender and figure out how to get rid of the excess so I can just get the model itself without all of the extra stuff that I don't know how to see. Ty for the help. :D

    And I did have Blender installed but as I said above I did figure it out. Ty for the help :D
     
  10. jtsmith1287

    jtsmith1287

    Joined:
    Aug 3, 2014
    Posts:
    787
    If I remember correctly, you used to (v2.69 ish) be able to save the .blend directly into unity's Assets directory and regardless of anything else Unity would handle the conversion. Now the only way it seems to work is by manually exporting. This isn't a fix. It's a workaround. In fact, I was experiencing crashes, not just "it isn't working", when putting blend files inside unity asset directories. I also heard that Blender was blaming Unity and Unity was blaming Blender. As far as I know, no fix is en route. I hope I'm wrong. The auto-export thing is a pretty massive workflow time saver.
     
  11. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    As I remember and understood it, it wasn't Blender or Unity. Microsoft changed how something was handled by the MSVC 11.0 compiler that broke the way the python interpreter compiled with it handled file descriptors when there wasn't an stdout. So neither the Blender or Unity code handling it changed, it just didn't work anymore for versions compiled w/ the new compiler (after 2.70 it looks like). This has links to downloads to patched python dlls you can use to replace the ones that come with Blender that should make it work again.

    https://developer.blender.org/T40907
     
    SememeS likes this.
  12. SememeS

    SememeS

    Joined:
    Nov 27, 2012
    Posts:
    127
    ^ This. It's neither Blender or Unity...It's Microsoft. lol.

    Here's an earlier thread on this issue :

    http://forum.unity3d.com/threads/blender-2-71-blend-to-unity-broken.254632/


    Personally I suggest just exporting the conventional ways(.fbx .dae .obj ..etc), but if you really need to have .blend files in Unity then you'll have to use the replacement python dll by Ignaramus. There are two versions (32-bit and 64-bit)




    .
     
  13. jtsmith1287

    jtsmith1287

    Joined:
    Aug 3, 2014
    Posts:
    787
    I guess I don't understand. If it's Microsoft then why does switching to blender 2.69 (which uses the same version of Python as 2.7+ if I remember correctly) bring back this functionality?
     
  14. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    Because the DLL included w/ 2.69 was compiled with an older version of the compiler that didn't have this bug. You could probably compile it yourself w/ the old compiler and have it work fine. It might require some patching if they've made any changes that aren't supported by the old compiler. Or just download the python DLL that was made available. If no other changes were made you might be able to use the DLL from 2.69. Looks like it's Python 3.4 by the filename (python34.dll).
     
    SememeS likes this.
  15. lubwn

    lubwn

    Joined:
    Mar 22, 2017
    Posts:
    8
    Ran into the very same problem today. Actually running Unity as administrator helped to solve this issue. Just in case anybody will wonder in future.
     
    playhard719 likes this.
  16. NOandMORENO

    NOandMORENO

    Joined:
    Feb 22, 2022
    Posts:
    1
    I ran into that issue with blender 3.0. It is a pain due to my exporting as fbx, unity still thinks it's .blend and I can't figure it out!