Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Blender 2.71 .blend to Unity broken

Discussion in 'Import Formats & External Tools' started by SememeS, Jul 1, 2014.

  1. SememeS

    SememeS

    Joined:
    Nov 27, 2012
    Posts:
    127
    Hello UT

    With the release of Blender 2.71 I cannot any longer import .blend files into Unity.
    Even importing a simple cube alone in a .blend results in "Blender has stopped working".

    Whether I drag the .blend directly in or place it before hand in the project folder the same "Blender has stopped working" happens.

    I know I can use alternative export options.

    Although, I hope this is still a planned implementation on UT's part.
     
    Last edited: Jul 1, 2014
  2. Zenchuck

    Zenchuck

    Joined:
    Jun 2, 2010
    Posts:
    282
    It has nothing to do with Unity. Unity built a wrapper around Blender's fbx export script. Blender made changes to the script that result in the breakage. Go to #blendercoders on IRC and let them know that you need Blender to work with Unity. This should not have happened IMHO.
     
  3. SememeS

    SememeS

    Joined:
    Nov 27, 2012
    Posts:
    127
    @Zenchuck Yes it does.

    Link to mont29's blog

    Blender does not support Unity's internal code which internally converts to .fbx. Blender's new .fbx export addon has been improved to support better .fbx exports. Unity will need to update their internal conversion to adapt to this newer version themselves. I was merely pointing out to UT that it doesn't work with the new version of Blender.

    I understand it is a convenience to be able to import .blend files directly, I'm just hoping UT plans on keeping to implement such a convenience.
     
  4. Zenchuck

    Zenchuck

    Joined:
    Jun 2, 2010
    Posts:
    282
    So what happens when Blender "improves" the code in the next update? and the next?

    If you open up the Blender export_fbx.py you can read in the comments that vertex color should not be supported - because no program uses them any more! I'm paraphrasing but the gist of the comment is that there is a real disconnect between whoever is responsible for the fbx export script and reality.

    What is supported in the new .fbx export script that wasn't exported in the previous version?
     
  5. SememeS

    SememeS

    Joined:
    Nov 27, 2012
    Posts:
    127
    That's up to UT to decide what they will do. Why are you asking me?

    FBX is proprietary so they have been implementing workarounds. In no way is Blender's FBX "official".

    I don't know why you are telling me all this. I'm not a programmer. I was merely leaving this finding here for the UT team so they know what's going on. I don't think this is important enough for a bug report.

    But if you have solutions to help the blender team you could go here and suggest/implement your ideas:
    https://developer.blender.org/diffu...n.py;702f793d0f9d0fa5cced3425ff1e628c10595fc6

    Aside from all this I hope UT does keep supporting their internal conversion of .blend files in the future.
     
  6. Zenchuck

    Zenchuck

    Joined:
    Jun 2, 2010
    Posts:
    282
    There is a recent history in Blender of just randomly breaking stuff - it would be really cool if the devs could build on top of existing layers - maybe with some allowance for other software (and users) to react to major changes.

    FBX is the main path for a lot of game development so should be treated with extra caution - not just a bunch of random changes - and forget about possible damage.

    I am also not a programmer. I paid a programmer to write a custom export script for Blender to support vertex Alpha.
     
  7. SememeS

    SememeS

    Joined:
    Nov 27, 2012
    Posts:
    127
    Unfortunately, as long as Autodesk keeps FBX under it's current terms we will be stuck with workarounds; which will always have the potential of problems.

    We can only ask of Blender what we are willing ourselves to put in. It is not a sold, closed source, proprietary software. It is open source software which depends on the users and companies that use it to adapt it themselves.

    I only hope that UT sees the value and potential of Blender in the upcoming future and keeps updating its internal conversion of .blend files to allow us the convenience of using .blend files directly in Unity.
     
  8. Zenchuck

    Zenchuck

    Joined:
    Jun 2, 2010
    Posts:
    282
    I am a proud Blender user. I always promote it as the best software I have ever used and recommend it for anyone interested in creating 3d art.

    ***edit - so it is apparently a bug introduced by Microsoft - so neither Blender or Unity are at fault. I am not clear on the details but you can read more about it here:

    http://connect.microsoft.com/VisualStudio/feedback/details/785119/



    Despite my minor frustrations - the big picture of Blender has always been and remains a positive one.
     
    Last edited: Jul 1, 2014
  9. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,562
    Also it should be noted that if you're using Blend Shapes the new FBX exporter in Blender doesn't support it. They have slated that feature for 2.72.
     
  10. Zenchuck

    Zenchuck

    Joined:
    Jun 2, 2010
    Posts:
    282
    Here is a fix for Blender 2.71 and a better explanation of the problem. Thanks to "Ignaramus" for tracking the bug and providing a fix. This was the same guy who took care of the export_fbx.py modification for me.

    https://developer.blender.org/T40907
     
  11. mont29

    mont29

    Joined:
    Feb 13, 2014
    Posts:
    1
    There may be another way around that issue, though, less intrusive - python can call processes with its own stdin/out/err, so a simple modification of Unity script to feature such fake streams might solve it, without having to replace whole py dll?

    Do not have that Unity script at hand (and don’t want to start my VM just for it), so can’t verify that, though…
     
  12. SememeS

    SememeS

    Joined:
    Nov 27, 2012
    Posts:
    127
    Ahh microsoft the deep pain in my loin..
     
  13. SememeS

    SememeS

    Joined:
    Nov 27, 2012
    Posts:
    127
    Well hopefully UT will find a better solution to this or send their scripts to mont29

    Thanks everyone.
     
  14. tri_ben

    tri_ben

    Joined:
    Apr 8, 2014
    Posts:
    1
    so.... for all the idiots out here, like me:

    can I get a version from graphicall and point unity to that blender version for the FBX export?
     
  15. SememeS

    SememeS

    Joined:
    Nov 27, 2012
    Posts:
    127
    Hello @tri_ben, no need to call yourself that. Not knowing and Questioning is not a bad thing, it's good.
    I'm not exactly sure what you are trying to achieve.

    For FBX exporting just export fbx from Blender normally.

    There are 2 fbx export modes: Binary & ASCII

    Binary has recently been updated with 2.71 although>
    As pointed above shapekeys(*Blenders morphs/blendshapes) will be supported in binary with 2.72 release.
    so if you need them you'll have to export as ASCII

    The issue we were discussing here was importing .blend files directly into Unity.
     
    Last edited: Jul 8, 2014
  16. JJDeveloper

    JJDeveloper

    Joined:
    Jul 6, 2014
    Posts:
    33
    I used to be able to import .blend into Unity, but this has stopped as of 3 days ago. It first stopped working when I tried to import a 4 million vert object. It previously worked on a 1.8 million vert object. Now it just doesn't work for anything.
     
  17. JJDeveloper

    JJDeveloper

    Joined:
    Jul 6, 2014
    Posts:
    33
    ok, I now created a simple cub in Blender, with no modification, just a cube. Imported it to Unity successfully. Not sure why Unity crashes for my under 1 million vert models when last week I was cruising with 1.8 million vert objects...
     
  18. Zenchuck

    Zenchuck

    Joined:
    Jun 2, 2010
    Posts:
    282
    What kind of game are you making? 1,000,000 vertex models are considered large for most real time applications.
     
  19. red2blue

    red2blue

    Joined:
    Feb 26, 2013
    Posts:
    200
    I had the same problem, when I updated to Blender 2.71. Like in the posts above stated, there is a problem with a python.dll. If you have a 64Bit system, you can try to replace the python34.dll with the one I attached. That should do it. Please make a copy of your old python34.dll in case something goes wrong. The python34.dll is in the Blender main folder like "C:\Program Files\Blender Foundation\Blender".

    Hope this helps.
     

    Attached Files:

    Freddy888 and Steinwolfe like this.
  20. JJDeveloper

    JJDeveloper

    Joined:
    Jul 6, 2014
    Posts:
    33
    Whoops, maybe forgot to mention I'm on a Mac. Do you have the zip for that?
    I was working with 2.71 with no problems, didn't change versions. Then, BAM, would not want to cooperate.

    I'm making a hybrid of a game, but the characters are very important to me.
     
  21. red2blue

    red2blue

    Joined:
    Feb 26, 2013
    Posts:
    200
    I am really sorry, but i am only failliar with Windows. Maybe someone else from the thread can help.
    Habe you tried to reinstall, vor change back to an earlier Version? I would save my user settings and compleatly remove Blender (Installation and folder) and try to installiert 2.71 vor roll back to 2.7 and See if this works.

    Have you maybe reacently installed something else which could cause the error?
    Maybe reinstallation helps.
    Good luck ;)
     
  22. JJDeveloper

    JJDeveloper

    Joined:
    Jul 6, 2014
    Posts:
    33
    I reinstalled Blender, but it seems like it's definitely Blender causing both Blender AND Unity to crash. I have heard that version 2.49 is the most stable release, but the Blender website's oldest available version is 2.5 :( Seems like some sort of runtime error, bc it was working for an entire week before it started crashing
     
  23. JJDeveloper

    JJDeveloper

    Joined:
    Jul 6, 2014
    Posts:
    33
    Alright, so here's an update:
    I've managed to export FBX, but only for a simple 6 sided cube and for a stick figure character.
    Also, my rigged stick figure import PERFECTLY into Unity form Blender.
    The problem? WHy is it that last week, 1.5 to 1.8 million vertices models imported slowly but flawlessly into Unity, and now-NOPE!
    Additional information: last week, I imported the mesh without the armature just to see how it would look. The problems began when I tried to import with the armature. However, just to make sure, I have deleted the armature after making a copy and tried to reimport just the mesh-and NOPE! it does not work at all, it just crashes Unity. Loose runaway script? An automatic update that went wrong? I have no idea, but this is a strange problem…


    I hope this helps, SememeS, but for both our sakes, we should continue to try to fix this problem on the large scale, bc who wants to forevermore only import stick figures into their games?
     
  24. SememeS

    SememeS

    Joined:
    Nov 27, 2012
    Posts:
    127
    I'm not sure what's happening for you on Mac. This does not seem related. This is unfortunate..

    I am also on Windows so I'm not sure what can be done on a Mac.

    For windows users replacing the python34.dll (make sure to pick right version 32bit / 64bit) fixes importing .blend files(for 2.71). I have no issues with FBX files though..
     
    Last edited: Jul 17, 2014
  25. JJDeveloper

    JJDeveloper

    Joined:
    Jul 6, 2014
    Posts:
    33
    does your fix work for super hi-poly models? If so, I may switch to Windows
     
  26. SememeS

    SememeS

    Joined:
    Nov 27, 2012
    Posts:
    127
    The fix by Ignaramus is only for importing .blend files directly into Unity.

    It won't change anything for model sizes. Don't use it unless you need/want to import .blend files. It won't change anything with fbx either.

    Test:
    > I just imported succesfully a 3.7 million triangle mesh(.fbx) into Unity no problem *(it took about 5min though)

    So I guess the problem you're having is something on Mac.
     
    Last edited: Jul 17, 2014
  27. red2blue

    red2blue

    Joined:
    Feb 26, 2013
    Posts:
    200
    I think going back to a that old version will not fix the problem, because you said, that everything was fine last week. But if you want to try an older version, here is the link to version 2.49b for Mac: http://download.blender.org/release/Blender2.49b/

    Have you maybe updated Unity? I have here an instruction how to install a FBX im- /exporter also for weighted and armatured Models. I found it on the web. Think it will also work for Mac version. Maybe this helps. You will need Blender 2.70+ for this.

    Like I said, the Instruction is NOT mine. I don't want any credits for it ;-)

    Importing FBX files into Blender with full armatures/weights

    Updated June 22nd, 2014

    I discovered a bug that would make the FBX importer crash if the meshes in the FBX did not have materials assigned. The importer now handles this more gracefully, adding a blank material in Blender to any meshes that do not have one. The blank material will be named “Generatedxxx” where xxx is a number starting from zero. This number will increment as more missing materials are encountered. Overwrite any old version with the newer version to update.

    Updated for Blender 2.70, April 2014
    While Blender has with rudimentary FBX support, it’s incomplete and doesn’t transfer armatures or weights into blender. However, 3rd parties have created a more full-featured plugin.

    To start you need to have Blender 2.70+ installed. The latest is always available here.

    After installing blender, you need to download two files for the FBX Import:

    Installing the Converters

    First, unzip the umconv20130303.zip file into your blender directory. This directory will usually be:

    C:\Program Files\Blender (for 64 bit blender) or C:\Program Files (x86)\Blender (for 32 bit blender)

    Make sure you unzip with create directories so the files inside are placed in a folder called ‘umconv’ Basically you want the structure to be:

    C:\Program Files\Blender\umconv\

    or

    C:\Program Files (x86)\Blender\umconv\

    with the executables in that directory.

    Installing the Plugin

    Now, Locate the io_scene_bos_fbx.zip that you downloaded and note it’s location, you’ll need to find it for the next step.

    Open Blender, and go to User preferences:



    On the Prefs panel, go to the Addons tab, and choose “Install from File” at the bottom:



    Navigate to the location of the io_scene_bos_fbx.zip you noted earlier, select it, and Press “Install from File…”

    The pane will then change to show the new plugin highlighted, but disabled. Click the checkbox on the right to enable the new plugin. Then press “Save User Settings” to save the changes. (Very important!)



    You can then close the settings pane.

    Importing the FBX

    Wish a fresh, clean, blender scene, go to File->Import and choose the BOS FBX importer.

    Navigate to the FBX file you want to import, select it, and click to begin the import.



    The model and armature will be imported. However, they have an incorrect rotation for use in SL. This rotation must be kept though, so all Transform matrices work correctly. The model will be correctly rotated by the exporter when the “Export for OpenSim” option is selected on the export settings pane.



    If the skeleton doesn’t appear as shown in this pic, a few more clicks are needed to clean up appearance.



    Hit ‘a’ to deselect everything. Then Right click on the armature bones only. On the right hand Editors pane, you can then go to the Armature section, and display, and change the bone type to “Stick”.



    The model is now ready to use. It has the full skeleton and full weighting groups as defined in the FBX file. It can be saved as a .blend file or exported to any other supported formats.
     
  28. Steinwolfe

    Steinwolfe

    Joined:
    Jul 5, 2014
    Posts:
    3
    This solved the issue for me! Thanks Red2blue!
    Using: Windows 7 64bit, Blender 2.71, Unity 4.5.2f1
     
  29. red2blue

    red2blue

    Joined:
    Feb 26, 2013
    Posts:
    200
    You are welcome! :)
     
  30. richardh

    richardh

    Joined:
    Mar 7, 2012
    Posts:
    226
    Erm, I have the same problem and am using 32bit with win7. is there a fix I could use please?

    I was using blender 2.49 with unity for ages and then it 'broke'. not I think it's either a win 7 issue or Unity.
     
  31. Freddy888

    Freddy888

    Joined:
    Sep 13, 2014
    Posts:
    164
    This worked for me too - thanks you very much :)
     
  32. kiugetski

    kiugetski

    Joined:
    Dec 24, 2012
    Posts:
    35
    TY SO MUCH
     
  33. red2blue

    red2blue

    Joined:
    Feb 26, 2013
    Posts:
    200
    very welcome!
     
  34. Ask a Question

    Ask a Question

    Joined:
    Jan 29, 2015
    Posts:
    7

    I know it's real old question, but this stuff makes me sick. Of course i can export to .fbx and Unity not return errors

    Blender 2.73, Unity 5.0.1p3 (831bf8db21f1) (Personal) .blend file and error screenshot https://www.dropbox.com/sh/hd6s06h0rz1fwlt/AAAnAk6PWFwYt1ROBwalE3Rqa?dl=0
     
  35. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    309
    Hi,

    This problem is still present, using blender 2.77 and Unity 5.3.4f1
    The solution using the python34.dll file provided in a previous post is not working anymore, since this new version of blender uses python35.dll which is not compatible with the 34 version.

    So does someone have a new idea to fix this issue ?
     
  36. red2blue

    red2blue

    Joined:
    Feb 26, 2013
    Posts:
    200
    Have you installed Blender, or are you just using the extracted zip file (mobile version)?

    I heard somewhere, that unity needs a installed version of blender to handle .blend files. But I could be wrong. It is just a guess, because I am working with Blender 2.77a and Unity 5.3.4p3 fine.

    Hope this helps in any way! :)
     
  37. Thomas-D

    Thomas-D

    Joined:
    Jan 2, 2013
    Posts:
    9
    Same issue here. Hadn't used Blender and Unity for a while at home. When I opened Unity yesterday I got the warning message that 'Blender could not convert the .blend file to FBX file.' Reinstalled Blender (2.77a) and Unity (5.3.4f1) and the problem persists (they're not in a zip file). Like Alesk said, placing the python34.dll in the folder does nothing as there's no file to replace. python35.dll is present however.
    Any ideas? I like my current workflow using .blend files, rather not switch to FBX. Thanks :)
     
  38. SkaceKachna

    SkaceKachna

    Joined:
    Apr 9, 2013
    Posts:
    1
    I don't know what is causing it, maybe 64bit version of blender?
    Anyway, google pyhton35.dll, download the first link and replace yours. It'll work then.
     
    Wanderer13, Thomas-D and Alverik like this.
  39. myBoy

    myBoy

    Joined:
    Jan 26, 2017
    Posts:
    2
    thx for share this blender DLL. Helped me a alot.:)
     
    red2blue likes this.
  40. DGOSTAD

    DGOSTAD

    Joined:
    Oct 17, 2017
    Posts:
    1
    Having this same issue with Blender 2.78 and Unity 2017.2 (64 bit) on Mac. For me it appears to only happen for high-poly models. Has anyone found a solution to this? Thanks!
     
  41. JimmyCushnie

    JimmyCushnie

    Joined:
    Jun 7, 2017
    Posts:
    184
    I got this issue upgrading from 2018.3 to the 2019.1 beta. Very annoying. I ended up exporting everything as an fbx, which sucks for iteration workflow.
     
  42. AndyKorth

    AndyKorth

    Joined:
    Oct 19, 2009
    Posts:
    25
unityunity