Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

scale Maya to unity

Discussion in 'Editor & General Support' started by SirFency, May 26, 2011.

  1. SirFency

    SirFency

    Joined:
    Apr 2, 2010
    Posts:
    91
    So Im not sure why this is happening but every object I save as a Maya scene file then open in unity I have to scale down .01 to be the correct size. I have tried changing the scene settings from meters to centimeters and even other scale settings as well with zero change. I'm wondering if the fbx exporter is setting the scale during the auto conversion process. Its pretty annoying to have to set the scale on each object. Is there something I have to be sure I'm setting up for this conversion process to be correct other than the Maya preferences since I have already tried this?
     
  2. Sammer

    Sammer

    Joined:
    May 1, 2009
    Posts:
    49
  3. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You need to set up maya's units so 1 meter = 1 unit in maya, then when importing into unity, set fbx scale to 1.0.

    This will mean you'll need to rescale stuff in maya, but after this step, everything is sane. After all if its wrong size in maya, that means you have modelled it the wrong size.
     
  4. artician

    artician

    Joined:
    Nov 27, 2009
    Posts:
    343
    I used to fight this same thing in Max. Eventually I just gave up and let the stupid importer have it's way with a scale of 0.01. It's damn annoying, but for some reason it refuses to scale things correctly even if you make sure to have your working units properly set up. No matter what (it seems, from my experience) you will still have to manually set the 0.01 scale to 1.0 for every model you import in unity. Hope that helps. ;)
     
    Last edited: May 27, 2011
  5. SirFency

    SirFency

    Joined:
    Apr 2, 2010
    Posts:
    91
    I'm an expert Maya user and I know I have the units and the proper size all set up correctly in Maya. It must be happening during the export process. I will play with the export settings some more but I'm thinking maybe I can have a programmer write a script that will just put the scale on all my objects in the project directory for me. Its just a shame if thats what I would have to do because at this day in age scale should not be an issue.
     
  6. PhilG

    PhilG

    Joined:
    Nov 9, 2009
    Posts:
    30
    There is no "proper" setup, just appropriate settings for your required output.
    Scale your models so that 1 unit = 1 metre in maya, check your FBX export preset unit settings so that scale factor is 1.0 and file units converted to centimetres (for some strange reason), and then change fbx import settings from .01 to 1 in unity.
     
    Last edited: Jun 2, 2011
    vfxjex and juliencollee like this.
  7. SirFency

    SirFency

    Joined:
    Apr 2, 2010
    Posts:
    91
    Thanks I'll give that a go tonight. By "proper" I meant that I have the units set to meter and I build to scale so no matter what units I'm in I build to real life scale.
     
  8. SirFency

    SirFency

    Joined:
    Apr 2, 2010
    Posts:
    91
    OK,so here is what I have found after messing with this a while. No matter what settings I had in maya and in the fbx exporter the cube always came in the wrong scale if I relied on Unity to convert the native file format. If I manually exported the cube to FBX using different settings I got different results. So In Maya if you model to real life scale and you want to avoid changing the scale manually in Unity to .01 scale size then do the following. It does not matter what units you have Maya set to. I tested in centimeters and meters and the results are only dependent on the settings in the FBX exporter. Simply set the scale factor to automatic it should set itself to a factor of 1.0 if not then uncheck automatic and pick a conversion size that puts you to a factor of 1.0 then manually export to FBX. If I let Unity do it it fails every time so I will just have to export myself.
     
  9. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    menu Windows->Settings/Preferences, Settings on the left panel, Working Units Linear meter.
    menu File -> Export Selection, click the box for extra options, click Edit preset.
    Edit export preset panel ->Units (right side), uncheck Automatic, set to centimeters.
    Works in Unity 5.3
     
  10. cyberpunk

    cyberpunk

    Joined:
    Mar 20, 2013
    Posts:
    226
    Sorry to necro this old thread, but you are a genius, Ippokratis. Your fix worked.

    This was driving me mad. I'm using Maya LT 2016 and Unity 5.4. Kind of sad that 5 years later such a simple thing has not been solved. But the fix is easy enough so I can be happy.
     
    Last edited: Mar 17, 2016
  11. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi there,
    Another nice to have feature is to set the grid in Maya so it corresponds to Unity's grid. Joe Ferfecki's Mel script works well : http://pastebin.com/yMEvjYWj
     
    TheVulcan likes this.
  12. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    [Edit]
    If you use meters as measuring unit in Maya, many problems occur with camera near and far planes. Mess.

    The following workflow works :
    - leave measuring units as cm
    (if you changed it to meters, go to menu Windows->Settings/Preferences, Settings on the left panel, Working Units Linear : cm )
    - menu File -> Export Selection, click the box for extra options, click Edit preset.
    Edit export preset panel ->Units (right side), uncheck Automatic, set to meters.
    - the objects in unity look small at first, but they are scaled at 0.01. Modify their scale at 1 and it works.
     
    Last edited: Nov 10, 2016
  13. vfxjex

    vfxjex

    Joined:
    Jun 3, 2013
    Posts:
    93
    Thanks this works for me.