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. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

Scale issue?

Discussion in 'Unity 5 Pre-order Beta' started by kurylo3d, Dec 24, 2014.

  1. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    I just noticed something odd. I freeze transforms in maya... and the scale is correct in there.. xyz 1 - 1 - 1.

    In unity i import the model at a scale factor of 1.


    When i drag the model itself into the scene.. its 0.01 - 0.01 - 0.01 .

    Can this hurt performance at all if everything has scale transforms on it from the get go. Also why isnt it 1 - 1 -1? It looks like its sized correctly according to the unity grid compared to mayas grid.. 1 grid unit = a meter. Its just odd that the scales are applied to it like that from dragging in the imported mesh into the scene..

    Is this a bug? Is it even an issue?
     
  2. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    If it looks right it isn't an issue.
    Maybe you saved a scale of 1 unit = 1cm and unity responds by importing with 0.01 scale.
     
  3. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    nope.. its definently in meters... and what worries me is that in previous versions of unity like unity 3 ... scaling hurt performance. Espeacially if u have things in a hierarchy.. like it scaled everything below it...
     
    Last edited: Dec 25, 2014
  4. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,435
    That is very odd... VERY ODD. Are you using meters in Maya? I've never had this issue when I use the proper scale
     
  5. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    yes using meters in maya and importing into unity at a scale factor of 1
     
  6. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    units set to automatic as well inside maya fbx export properties.
     
  7. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,435
    Don't use automatic... you need to DEFINITIVELY set the export to meters... The default import scale in Unity is .01
     
  8. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    I tried doing what u said and exporting with meters as my export setting. Still comes in the correct size in unity, but in the x y z scale the number value is still actually 0.01, 0.01, 0.01 .. So basically no difference from automatic setting.
     
    KRGraphics likes this.
  9. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Another thing .. probably for a seperate topic, but i am doing a simple sliding door animation... and when i hit play.. the door jumps a mile away... all transforms are frozen.. so i have no idea why this is happening.. does not happen if there is no animation applied to it.
     
  10. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,435
    That is very strange... trying changing the units to cm in maya... and then export.
     
  11. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    that worked. Thanks. Odd that i need to do that though.
     
  12. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,435
    Nothing odd about that. Just have to be mindful about when you model and your approach. In this case, your model was too large.

    Use locators to mark areas (i think in Maya you can change the locator shape) for size and measurement. If you can't find an exact size, use an average height based on the average size of a man (6 feet). Common sense also helps here. Having a model that is too large causes issues for physics. I think PhysX is locked to -9.81m/s.

    Everything I create is based on real world size and since Unity uses meters (another reason I have not switched to UE4), I model everything around that. Such as I type in the foot/inch of the object, Modo will automatically set it to meters.
     
  13. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    no actually i didnt touch the models size... its still exactly the same in maya and unity. And its still in meters... i just exported it as cm... Wether i export in cm or m.. its still technically the same size... lol.. which is odd. I model everything around real world meter units.
     
    KRGraphics likes this.
  14. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,435
    In this case, just leave it at cm unless there is a MEL script that will set your scene to Unity scale.
     
  15. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    its whatever.. i left it in meters in maya.. and its in unity as meters scale wise.. so its all good.. its just u have to set the exporter to cm in order for it to come in as 1, 1 ,1 ... u cant export it as meters or auto or else its .01 (same size mind u... just with transforms. Unity either way you continue to import as a scale of 1.
     
    DanSuperGP likes this.
  16. DanSuperGP

    DanSuperGP

    Joined:
    Apr 7, 2013
    Posts:
    408
    I just want to make sure that I have this correct...
    In maya you set the Preferences... settings...working units... linear to Meters.
    In the FBX exporter you set Advanced ... Units... to Automatic off and File Units converted to Centimeters.

    With those settings your models from Maya will come in at 1.0 in the import settings, and 1.0 scale when brought into a scene, and the animations will all be set up correctly?
     
  17. DanSuperGP

    DanSuperGP

    Joined:
    Apr 7, 2013
    Posts:
    408
    OMG, it actually works correctly.

    I can't tell you how long that has been a pain in my ass. Like 7 years...
     
    kurylo3d likes this.
  18. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,435
    Glad you figured that out.
     
  19. DanSuperGP

    DanSuperGP

    Joined:
    Apr 7, 2013
    Posts:
    408
    The part I didn't know was turning off automatic scaling and setting the scale to CM in the fbx exporter. So counterintuitive to have to set it to meters in Maya, and centimeters in the exporter.

    Seriously, these settings should be posted in the Unity docs for importing from Maya. I can't be the only person with these problems over the years.