4
$\begingroup$

When exporting models from Blender into Unity one must take into account the handedness of both programs.

Blender considers Z vector as the UP vector, but Unity considers the Y vector as the UP.

Now, if you want a model who is facing up in Blender (along Z) to be facing up in Unity (along Y) when imported, people recommend this simple fix:

  • model your 3D model in Blender along the Y axis and apply the necessary rotation onto the model.

enter image description here

Now when working in Blender if you want to use Z as the UP vector, you simply transform your model by a positive 90 degree rotation around X (but don't apply the rotation).

enter image description here

I export my model using Blenders built-in FBX exporter with the default settings (UP = Y axis and FORWARD = -Z axis).

When imported into Unity, my model is facing upwards as expected along the Y axis. enter image description here

But, what I don't understand is why my model is also rotated 180 degrees around the Y axis?

In the first image from Blender you can see that my cup handle pointed along the x axis aka right, but now is facing left (-X direction).

$\endgroup$
  • $\begingroup$ My team recently stopped exporting FBX from Blender to Unity because of scaling issues with nested objects. Instead we use .blend files in Unity. You'll notice that when you use .blend instead of FBX, the Scale Factor will be 1 as expected. A big part of the decision was because Blender cannot keep up with changes in the FBX format. Blender rolls their own binary interpreter since they cannot incorporate the closed-source FBX SDK into their distribution. The !EXPERIMENTAL! Apply Transform function worked for orientation in some simple cases but development on that has ceased AFAIK. $\endgroup$ – sbsmith Mar 30 '17 at 20:36
  • $\begingroup$ If you go the .blend route and want to get the nice "export selected" functionality for .blend, see this question blender.stackexchange.com/questions/71031/… $\endgroup$ – sbsmith Mar 30 '17 at 20:38
  • 1
    $\begingroup$ Oh, and we fix the rotation by using a custom import tool for our .blend files. It creates prefabs where the meshes are nested and re-oriented inside empty GameObjects. $\endgroup$ – sbsmith Mar 30 '17 at 20:40
3
$\begingroup$

I had the exact same problem before, and i fixed it by doing the following:

  1. Choose to export with FBX
  2. Check "!EXPERIMENTAL! Apply Transform"
  3. Import to Unity
  4. See that the model is on the correct rotation.

FBX Export

$\endgroup$
1
$\begingroup$

Just export to FBX using the defeault settings of -Z Forward and Y up.

enter image description here

$\endgroup$
  • $\begingroup$ I don't have Unity, so I can't test this, but in the screenshot from Unity in the question it looks like it uses Z forward and Y up. $\endgroup$ – Duane Dibbley Sep 17 '16 at 16:02
  • $\begingroup$ The question has been edited beyond recognition now so the point is moot. $\endgroup$ – Xtremity Sep 17 '16 at 20:04
1
$\begingroup$

What worked for me to import into Unity is this setting:

enter image description here

Orientation in Blender:

enter image description here

Orientation in Unity: (The right direction)

enter image description here

Models: https://free3d.com/3d-model/simple-game-ready-cars-set-92718.html

$\endgroup$
0
$\begingroup$

You can also put -90 on the x axis (in blender-render), then press CTRL+A and then put 90 on the x axis (all of this inside blender) and then just export it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.