Friday, April 12, 2013

Cautions for importing Blender FBX to Unity3D

I'm using Blender 2.64 for modeling but exporting them to Unity3D 4.x for makgin game.
There are few discrepancies for them.

1. By Default, the scale for FBX imported model is 0.01, weird!
So, you need to create a folder under "Assets\Editor" and place the following script.


  1. using UnityEngine;
  2. using UnityEditor;
  3.  
  4. class MeshPostprocessor : AssetPostprocessor {
  5.  
  6. void OnPreprocessModel () {
  7. (assetImporter as ModelImporter).globalScale = 1; /* whateverNumber */
  8. }
  9.  
  10. }

2. As exporting the model to FBX format, check the "Forward option" as "Z forward", as the setting is "-Z forward" in Blender while in Unity3D is "Z forward".

3. By default, meshes in Blender is 2x2 sized comparing to those in Unity3D, you need to scale down them by 0.5 for all dimemsions (i.e. x:y:z).

4. And texture images files cannot be FBX-exported to Unity3D automatically, you need to use a software called "FBX converter 2013" embedded those image textures into the FBX files before "asset-import" to Unity3D.