Have you ever been frustrated when exporting FBX files from Blender and importing them into Unity? Problems with rotation and scaling along the way? In this post I will provide you with some tips and tricks to get the Blender to Unity process working smoother.

But wait - why not Blender 2.8? Even though Blender 2.8 has been in development for a long time, much of it is a complete re-write and the current beta is not yet stable enough to work with for a decent workflow. Once a stable and reasonably bug-free version of 2.8 is available, I will publish an update. For now, however, I strongly recommend sticking to 2.79.

First of all, if you are impatient like me, here's a quick summary of the easiest way to get rotation and scaling right:

For a simple object

(Simple object = no hierarchy and no armature (bones) or animations)

  1. Go to File | Export | FBX (.fbx)
  2. Tick !EXPERIMENTAL! Apply Transform checkbox
  3. Click on Export FBX button

Watch this video (at 1:01) to see it in action

For multiple simple objects

  1. Select an object
  2. Move the the object to position 0,0,0 in your scene if it isn't there already
  3. Go to File | Export | FBX (.fbx)
  4. Tick Selected Objects checkbox
  5. Tick !EXPERIMENTAL! Apply Transform checkbox
  6. Click on Export FBX button
  7. Go to step 1 and repeat process until all objects are exported
If you want to accelerate this process, especially if you are making many objects, have a look at this post where I have made a Unity Batch FBX Export addon for Blender!

For rigged characters with armature and bones

  1. Select the armature (the mesh should already be a child of the armature)
  2. Rotate the armature to -90 degrees on the X axis
  3. Press Ctrl+A to and select Apply > Rotation
  4. Rotate the armature to 90 degrees on the X axis (do not apply rotation!)
  5. Select the child mesh of the armature containing your character (it should show a rotation of -90 degrees for the X axis)
  6. Press Ctrl+A and Apply Rotation (the X axis rotation should now be 0 for the child mesh object)
  7. Go to File | Export | FBX (.fbx)
  8. If you have nothing else in the scene other than the armature and mesh object you can skip this step, otherwise, select only the armature and the child mesh character object (use shift to select multiple) and tick "Selected Objects" in the FBX export window.
  9. Set Apply Scale dropdown to "FBX Units Scale"
  10. Click the Export FBX button

Watch this video (at 2:24) to see the export process for a rigged character with an armature.

This video highlights the problem and demonstrates the methods to solve the issue:

That's It.

If you follow the above steps for simple objects and rigged characters, you should end up with correctly rotated and scaled objects when they are imported into Unity with a lot less headache. You'll even gain some better sleep now!

Did you find this useful? Please head over to my Patreon page, you can download the .blender files that I created in the video above.

You can also watch timelapses of the modeling and animation process of the simple lowpoly objects as well as the animated rigged character.

Need More Help?

If you couldn't quite follow, or if you a more detailed story, not to worry, I'll fill in the blanks.

There are three main headaches in the workflow of exporting from Blender to Unity: Rotation, Scale, and Animations. I will go through the rotation and scale problem in the remaining part of this post - and I'll publish a separate post for the Animations problem.

Axis vs. Alignment

Unity works with the Y axis being up/down and Blender works with the Z axis as up/down. This creates a problem.

When you export a FBX file from Blender, regardless of which axis you specify in the blender FBX export settings, the object's transform will be rotated in Unity. At first, you may not consider this to be a problem because once imported you can drag the object into a scene and it looks correct. But when you look closer at the transform, you'll notice that the object is rotated automatically by Unity by -90 degrees around the X axis. Plus, the scale is incorrect which will also deal with.

Problem if exporting from Blender using default settings

Problems

  1. The object is rotated around the X axis by -89.98 degrees
  2. The object's Z axis (blue) is facing upwards (Unity's Y axis)
  3. The object's scale is 100

Number 1 (and consequently also number 2) causes a problem because if you try to move the object in it's forward vector, e.g.:

void Update() 
{
    transform.Translate(Vector3.forward * Time.deltaTime);
}

- this fish won't swim forward - it will float up like a dead fish along it's own blue axis.

Number 3, the scale is set to 100. Even though the object is 1 meter in size in the scene - just like the native Unity cube behind it in the picture, it has automatically been scaled up 100 times by Unity in the import process. This must also be fixed because you run into problems of hierarchical scaling if you parent and unparent objects to a scaled object.

Don't work around the problem

It's common that people work around this problem by making the object a child of a new GameObject and apply all game logic to the parent - but that is a dirty solution. You would then pollute the scene with potentially unnecessary GameObjects which impacts performance as well as adds complexity. And, you don't even eliminate the problem to begin with. If you are in the business of making and selling assets for Unity, it is an absolute no-no to have objects with incorrect rotation or scale, nor should you work around the problem with GameObject parenting. Don't do it.

Fix the problem instead

Assumptions:

  • You have modeled one or more objects in Blender as if 1 Blender unit = 1 Unity unit which both represent 1 meter.
    (If you haven't, rescale your object and use Ctrl+A to Apply Scale)
  • You have used Blender standard axes for Front/Back/Left/Right/Up/Down.
    (If you haven't, orient your object and use Ctrl+A to Apply Rotation)
  • You have positioned your object(s) at position 0,0,0 in your Blender scene.
    (If you haven't, position your object at 0,0,0 and use Ctrl+A to Apply Location)

Fixing the rotation problem "The Easy Way"

The good thing is for a large number of objects - at least all the simple ones - there is an easy fix. When you go to Go to File | Export | FBX (.fbx) you can simply tick the !EXPERIMENTAL! Apply Transform checkbox - and proceed by clicking the Export FBX button in the (upper right corner) to export the object and it should import fine in Unity.

Note: The feature is named !EXPERIMENTAL! for a good reason. It does not work for nested objects, objects with animations, and objects with armatures. Maybe there are also other problems that could arise when using this which is why I am also including an alternative method here to manually fixing the rotation problem.

Again, watch this video (at 1:01) to see it in action.

Fixing the rotation problem "The Manual Way"

If the experimental Apply Transform method does not work for you, for whatever reason, you can do this manually:

Animation showing manual rotation
  1. Select the object you wish to export
  2. Pres N if you don't see the transform input fiels
  3. Enter -90 for X Rotation and press Enter
  4. Press Ctrl + A (when mose is over viewport) and Apply > Rotation
  5. Enter 90 for X Rotation and press Enter (do not apply again!)

So what is happening and why does this work when you export the FBX file?

When you rotate the object -90 degrees around the X axis and then you 'apply' the rotation - Blender will consider the rotation to be the 'default rotation' of the object. So when you rotate the object in step 5 by 90 degrees around the X axis again, and when you don't apply the rotation, the object's default rotation is actually pointing in the wrong direction from Blender's point of view, but in the correct direction from Unity's point of view. If you were to apply the rotation before exporting, you will be back to where you started which is why it is important that the transform's rotation in Blender shows as X:90 at the same time as the object is correctly oriented in Blender's viewport. See the Blender Manual for more details about applying rotation to the transform if needed.

The scale still needs to be fixed - but that is much easier. A simple change of the Apply Scalings dropdown to FBX Units Scale:

So, if the first method (!EXPERIMENTAL! Apply Transform) didn't work - and you have manually changed the rotation, you can now:

  1. Manually change the rotation as just described above
  2. Go to File | Export | FBX (.fbx)
  3. Tick the Selected Objects if you are exporting a single object
  4. Change Apply Scalings to FBX Units Scale
  5. Click the Export FBX button in the (upper right corner) to export the object and it should import fine in Unity.

The object should now import fine into Unity with correct rotation and scale.

Watch this video (at 1:30) to see "The Manual Way" in action.

But... I have a character with animated armature?

But what about nested objects, such as an armature with a child character mesh? The same principle applies as "The Manual Way" described above, but with these slight modifications:

  1. Rotate the Armature as described in The Manual Way
  2. Apply the Rotation of the Character Child Mesh of the armature

Again, watch this video (at 2:24) to see the export process for a rigged character with an armature.

Is your character scale incorrect to begin with?

If you haven't got the correct scale of your animated character in Blender, you are in a world of pain my friend. I haven't found a way to resize the armature without breaking all the animations. You will need to rescale your armature, apply the armature scale, and recreate your animations. If you know of a way to solve this without redoing the animations - please let me know and I will update this post.

Let's Automate

I have created a Blender Addon that you can download and install. This automates the process of exporting simple objects as individual FBX files ready for import to Unity. The objects that are exported will all be in the correct rotation, scale, and they will be positioned at 0,0,0 regardless of where they are in your Blender scene at the time of export.

You can export hundreds of objects to individual FBX files in a matter of seconds.

Blender Batch FBX Export

You can allow the addon to use different methods to export your objects as FBX files:

  1. Rotated Copy - creates a temporary rotated copy of each object that is positioned at 0,0,0 - then exported and finally removed. The original copy is left as is so you can keep all objects in blender using blender axis and rotations.
  2. Apply Transform - uses the !EXPERIMENTAL! Apply Transform method to export objects. The original copy is left as is so you can keep all objects in blender using blender axis and rotations.
  3. As Is - exports the objects as is, if you have already applied the rotation fix to your objects (either manually or by using the provided "Fix Rotation (Selected Objcts)".

Finally, you can choose to export all (mesh) objects in the scene or your current selection.

To Round Things Off

Thanks for taking your time to read this post. The Blender to Unity rotation and scaling problem has plagued me for years and I never took the time to document the exact settings and behaviors, until now.

If you found this post useful, please share it with the social media icons at the top. Also feel free to link to this post from your web site as it would help it to gain more exposure.

I have a patreon page where you can support future post. As a Tutorial Tier patreon you can also download the .blend files that I created for this tutorial (the fish, stone, single tree, and animated character).