- Home /
Why does this Blender file not import correctly in Unity?
If someone doesn't mind following these steps and reporting your results, and especially an answer on how to fix the issue, I would very much appreciate it. Could be a bug in Unity, or at least something they could add better support for if the issue is with Blender.
Go here and download this ZIP file (just contains 1 blend file): http://www.blendswap.com/blends/characters/jhow/
Unzip the download and save the blend file anywhere.
In Unity select Assests->Import, and select the blend file.
At this point I get an Asset added to my Unity project, but it only has an Avatar object under it, and nothing else. If I drag/drop the model to my scene, I only get the XYZ cube thing used to move models around, but no model at all. Trying to set any rig options doesn't work of course, because Unity sees no mesh, bones, etc.
The blend file itself works and looks great when you open in Blender. The bone setup appears to be Unity-friendly, other than the names of the bones... but from what I understand, Unity should still let you work with the model, just the auto-bone-mapping feature might not work.
I do get an error in Blender if I try to export to FBX, but I know the FBX export in Blender isn't top-notch, so I don't think that is a sign that the blend file really is invalid/corrupt. I also tried export to OBJ format and also 3DS from Blender, but no matter what format I try to import to Unity, it is still just an empty model. Actually the 3DS format was weird, it had a model, but no textures or anything, and wasn't even the correct model -- maybe 3DS files have some "default" model or something, or maybe Blender is just really bad about exporting to other formats (which is why I love the fact that Unity can read blend files directly -- usually).
Edit: While waiting for this to be approved by a moderator, I found this:
http://docs.unity3d.com/Documentation/Manual/HOWTO-ImportObjectBlender.html
So now I understand that Unity uses the Blender FBX export. So obviously since Blender gives errors when I try to export to FBX, it will not work in Unity. I will try to figure out the errors in the Blender->FBX export log, there were probably 30, but please answer if you already know the issue or can help, thanks.
This is the warning I get when I export to FBX. It does create an FBX file that is 922KB, but when I import either the .blend file or the .fbx file to Unity, it doesn't import anything as stated above.

Also, incase not obvious, here is what Unity looks like after I import the .blend file and also the .fbx. Just "empty" assets, only the avatar object under each, nothing else. No errors or anything in Unity that I can see or find saying "import failed" or anything like that.

Usually export to fbx is perfectly fine for me. Have you fiddled around with the fbx export settings? I had trouble with importing/exporting with blender (animations not com$$anonymous$$g through, bones going crazy, etc) but no real errors. After changing some of the import settings, it was fine. What version of blender do you have?
What errors? I've never had issues with blender exports in 2.x, though 3.x's fbx exporter seems to be made of fail and uneditable to boot.
In your asset's import settings, is your size set to 0.01 (the default)? That makes things very tiny.
I'm installing everything on $$anonymous$$ac so I can check now. This was my home PC which I can't get more info until tonight. I doubt it was a scale issue though, because I should still see some objects under the asset in the tree view, not just the avatar object (for most models I import I have at least 1 mesh, and also the 3D object model under the parent item/asset unity created, in the tree view). Unity is installing on $$anonymous$$ac now, so hopefully more info with solid details and screen shots also...
Blender version 2.65a is what I'm using, but I don't know what version the .blend file was created in. I did try opening in my version and resaving though, and same results.
You know, you can accept the answer yourself. You don't need a moderator to do it :)
Answer by shopguy · Jan 17, 2013 at 08:46 PM
I guess the "answer" to my question is "because not all .blend files are supported by Unity"... and the reason is because "not all .blend files export correctly to FBX in Blender (and Unity uses the Blender export)".
The issue with this model was that 2 of the "Vertex Groups" (used for rigging) had non-ASCII characters in the name. I think the words are latin because they appeared as cabe?a and pesco?o, where the ? were actually what looked like a c with a funky foot. I think they are actually supposed to be a z with a tick over them, from my limited understanding of latin languages. Anyway, that's off-topic :)
I just changed those funky characters to z's and saved the .blend file. Now Unity is able to import using the .blend file directly (my method of choice) and I can also export from Blender as FBX without any errors/warnings. In Unity the model looks good now, has all animations and bones. Only 2 minor issues are the bones didn't auto-map correctly, so I'll need to do some hand mapping (or rename them in Blender and make a Unity friendly layout), but that's easy enough. Also the mats are not auto-mapped to the objects, but also easy enough to resolve (something to do with paths I imagine, although that's weird since everything is inside a single .blend file in my case, but I've seen answers here of how to resolve that).
One of the issues is caused by some non-ASCII/international characters in the "Vertex Groups" names. Not sure if I can just rename those, but I'll try.
You can rename them, but you will probably have to rename the bones as well.
Yah, in the end I ended up having to just delete all the vertex info and recreate using the "parent with automatic weights"... at least I didn't have to do a full rerig, and I learned a lot, but in the end would have been faster just doing a rerig -- but now I know what to look for if I have issues down the line.
Hahahaha its not latin,its Portuguese! Im From Brazil and the "Funky" signs that you saw are called cedilhas.$$anonymous$$an,how funny...The words you saw with ? $$anonymous$$eans Head and Neck.ASCII dont recognize this because they are only in portuguese.:D
Your answer