I know that Blender’s Z axis is different to Unity’s but I can’t find a way to correct the FBX export. I’ve read something about a checkbox called “Rotate X90” which is meant to correct the problem, but I can’t find the button on Blender 2.58. I’ve tried mucking about with the Forward and Up directions on the export but this is only changing the orientation of the model, and not it’s relation to the axis.
My model imports fine, aside from the incorrect axis. Not sure if this is even a problem, but I’m thinking it might come back to bite me later once animation comes into it.
Any suggestions on how I might fix this, or whether it’s even an issue to be concerned about?
From the tests I’ve run using Blender 2.58 and the latest free version of Unity just ignore the difference and let the most recent Blender-Unity.py off this forum convert directly from the .blend file. I’ve had multiple animations work perfectly on a rigged character in Unity with all the axes corrected automatically.
This is the file I use at the moment with Blender 2.58. Download it and replace the current version within your Unity installation directory. If you use windows its:
…(Local Drives)>Unity>Editor>Data>Tools
Paste that file into that folder and then just add your .blend files into your projects Assets folder and they will automatically import as a .FBX
Remember to back up the old .py file. Hope that helps.
Just in case, and when you always use the newest graphicall version, the fbx settings in blender can be found in the export dialogue.
I`ve already moaned about the object orientation at exporting to fbx too, but without luck. The blender devs are happy with the current settings as the default export settings. Maybe when more people complain …
Unity can actually read a .blend file without having a hissy fit now. Something is not quite right - my models are absolutely huge when I drop them into Unity! (they are the right size when I export the fbx manually from Blender)
It doesn’t solve the problem with the axis though; my models still have X rotated 90 degrees to what it should be. Atleast It doesn’t sound like this has caused you any trouble.
Too bad we can’t have an option in Blender to set which direction is Z and which is Y! Yes, maybe we all need to complain more
Horror, have a closer look at my posted screenshot. I have set the red arrow for good reason. You can define the direction of the exported mesh. Just change the Forward directon -Z to Z. Or was it Y? Humm, trapped again …
Point is, you can change the forward direction, which defines the directon in which the FBX gets imported. It just doesn`t fit to Unity anymore by default
I tried mucking around with that, but it only changes the angle that the model is facing when imported; the orientation of the axis rotates with the model. This has only caused my character to face backwards.
Right now, my Unity object containing the individual meshes has the correct orientation (Z to the front, Y to the top, X to the side), but if I click the individual mesh elements within the object group the orientation is different (Z to the top, Y to the back, X to the side). The only other way I could think to correct this is to rotate the model 90 degrees onto its back in blender, export, and then rotate it back 90 degrees in Unity. And I’m not doing that
Blender is Z up, Unity is Y up. This is the nature of the beast for ANY set of 3D programs, some choose Y, some Z, some offer both as “options”.
I believe it works like this, but I’m open to correction:
Max is Z up.
Maya is Y up but you can switch it.
Blender is Z up.
Softimage is Y up.
C4D is Y up.
Lightwave is Y up.
Most CAD software is Z up.
Then there’s left handed vs. right handed…and some programs may choose to rotate in their FBX export as default…
Which one is right?
That said, using the FBX link that Robert-Glen provided should work just fine. The axes of the object will of course be reversed with the axes of the “world”, since Z will be aligned to Y and the positive Y on the object will point opposite to positive Z in Unity, but this is NOT a problem as long as you maintain the same coordinates in Blender itself for all your objects and animations. Obviously if you model something sideways in Blender it will now be sideways in Unity and therefore not match up with rotation of your other objects, or Unity world. Essentially it’s just a difference between “local” and world coordinates. This happens in all software going to Unity, and within the software itself. You can see this in Blender where the object has it’s own coordinate system that can be rotated in relation to the world coordinates. This is simply how you keep track of specific rotations of objects in 3D space in relation to a world standard, no big deal.
Thanks for the explanation, I’ll be sure to keep my models consistent. These kind of things make me paranoid, so I thought it’d be best to just throw the question out there
Ok bottom line. How do you fix thing IF you want to DRAG and DROP blend files into your project folder. Files that you have already created. I hope its not a matter of going back and redoing all the animations on those files
Right now if I drag and drop a human character blend file It imports fine but is facing away from the monitor int he scene view. Where it was facing toward me/the monitor in blender.
It’s been an ongoing problem with unitys art pipeline for years. Check out the wishlist page, over 420 votes to have this fixed. Ranked 19th after stuff like Linux version, Shader Editor, better 2D etc. So should be quite a high priority to come up with some solution, even if it’s just a toggle to set a default import setting to transpose the coordinates from right handed to left handed for those apps that have non compatible orientation.
You can vote to have this fixed on the Unity Feedback Page at:
After a LOT of playing around I have found a way to fix object orientation without messing around with export settings in Blender. It seems that the problem lies within the local object axis.
Steps to solve problem:
Select object in Blender and rotate on X-axis by -90 degrees (don’t panic! we’ll fix it for Blender and Unity)
From “Object” menu select “Apply > Rotation”
According to Blender the object is no longer rotated. Rotate object by 90 degrees and presto!
Orientations are now correct in both Blender and Unity with rotation (0,0,0) in Unity and (90,0,0) in Blender!
numberkruncher: This works because you have an unapplied rotation in Blender, so the rotation (as it is unapplied) does not get passed back to Unity on import. I’m unclear if this will cause any knock-on issues because this is a bit of a hack. I’ll experiment with this to see if there are any drawbacks, but one should be aware that there is an unapplied change in Blender… just… hanging around… looking for trouble.
Hi all, I am having a similar problem. Everytime I import this car model into Unity the x rotation is -90 but I need it to be 0. I have tried the export fbx settings in 3dsmax but I cant seem to get it to work.
Can anyone please help? In Unity I would like all the rotations to be 0,0,0 when imported.
Please!!!
The REAL problem with the axis rotation is that when you try to script anything using Unity coords and a Blender file (native blend format or FBX with axis adjustment) you end up with huge problem. You cant use the standard x,z ground plane because it will not transform your object correctly. So you have to have TWO sets of code. One set of code for Blender and FBX and another set for anything made in Unity or another software that uses the same axis system as Unity.
If anyone has a good idea about how to fix this please share. I very much like Blender as my production tool but have not found a good way around this problem. Maybe always parent Blender/FBX to an empty in a prefab? But then it gets complex when you want to do anything animation wise with the model itself in script? Don’t know if that will cause problems yet.
One of the possible solution is to make the model a child of an empty object. You can then manipulate the empty object itself instead of the model. Is this a good solution or not? What do you think?
I’m working with a model that consists of several objects in Blender and when I imported them into Unity and created a script, I began ripping my hair out trying to figure out how to get the two silly coordinate systems to cooperate when the forward vector of a blender object is really the right vector of that object in Unity. I needed to develop a solution that rotated the objects in relation to each other. I eventually abandoned the idea of using an armature to maintain the relationships between objects and just parented each object to each other without using any bones whatsoever and I still ran into difficulties with the coordinate systems. At some point I will want to incorporate animations into the model and I guess I’ll get to it whenever I decide I need to take more abuse. My solution was to use Quaternions to perform the rotations and a hack that rotates an object so that its pseudo forward vector faced the real forward position it was supposed to have. This is extremely obnoxious, is there really no decent solution to work with these coordinate system differences?
I tried Robert-Glen’s solution for the Unity importer, but it doesn’t seem to work with the versions I’m running: Blender 2.62 and Unity 3.4.2f3.