Search Unity

Blender FBX import has no bounds

Discussion in 'Editor & General Support' started by Thomas.Amundsen, Aug 9, 2014.

  1. Thomas.Amundsen

    Thomas.Amundsen

    Joined:
    Jun 1, 2014
    Posts:
    10
    Hi,

    I am trying to import an FBX file that was exported from Blender. The FBX mesh represents a tile on my gameboard. I created a Prefab of this mesh and keep a reference to it to calculate the size of my board:

    Code (csharp):
    1.  
    2.         hexWidth = Hex.renderer.bounds.size.x;
    3.         hexHeight = Hex.renderer.bounds.size.z;
    4.  
    The thing is that these values are always 0. Am I doing something wrong when exporting from Blender? Or am I missing a step in importing into Unity?
     
  2. Thomas.Amundsen

    Thomas.Amundsen

    Joined:
    Jun 1, 2014
    Posts:
    10
  3. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Test the import settings by dragging the object into a scene, you can also do a Debug.Log output of the bounds size in the console to check the values.

    Check that you have applied the scale to the object in blender, and the import scale settings on the asset.

    You could also double check the import pipeline using the a default cube.
     
  4. Thomas.Amundsen

    Thomas.Amundsen

    Joined:
    Jun 1, 2014
    Posts:
    10
    >Test the import settings by dragging the object into a scene, you can also do a Debug.Log output of the bounds size in the console to check the values.

    I can drag the cube in just fine, but the bounds size is always zero.

    >Check that you have applied the scale to the object in blender, and the import scale settings on the asset.

    I'm not 100% on this, but the scale is (1,1,1) in blender and the scale factor on the import settings in Unity is 0.01. That should be standard stuff and none of it is 0.
     
  5. Thomas.Amundsen

    Thomas.Amundsen

    Joined:
    Jun 1, 2014
    Posts:
    10
    By the way, the renderer bounds are non-zero when I export a COLLADA file from Blender. But I'd really like to use FBX.
     
  6. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    OK I've recreated the problem you have, try changing the changing the import scale to 1.