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. Dismiss Notice

Meters/Feet Scale Changes

Discussion in 'Editor & General Support' started by slippyd, Nov 22, 2006.

  1. slippyd

    slippyd

    Joined:
    Jun 11, 2005
    Posts:
    129
    Am I correct in assuming that in order to change my scale to have 1 unit = 1 foot, all I need to change is the gravity acceleration to that of ~25 ft/s^2 (I think)? Or are there other setting you need to set to get it to work correctly, like mass?

    Also, if the units equate in meters, what scale is mass in? Kilograms? Would this was this a very strange fraction of a pound if I changed the scale to be feet? Thanks.
     
  2. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    1 unit in unity equals 1 meter (3.28 ft) and as far as i know, mass is measured in kg (1 us pound = 0,454kg).
     
  3. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,741
    I believe the mass doesn't matter in the slightest what you measure it in, because it's all relative to everything else in your scene. You could make it grams, kilograms, pounds, whatever.
     
  4. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    Yes, i am wrong in that case! Mass IS just measured relativly...

    The docs say, the mass has to be between 0.1 and 10.0 for best effects.

    Sorry for the wrong info!
     
  5. Shannon

    Shannon

    Joined:
    Dec 20, 2007
    Posts:
    21
    I need to know for sure what the units are in Unity. I need to be able to measure the dimensions of objects s in meters after they have been imported into Unity. Does anyone know how to do this?

    http://www.shannonware.com/unity/workshop/Measurement_Studio_Web_Player.html

    Please see the above Measurement Studio for my WIP. I am modeling in Max 9. Units are set to meters. The floor is 20m x 20m x 1 m. The cube is 1m^3. The big line on the floor is the zero line, and the smaller lines are to be one meter apart.

    Once the file is running in your browser, use the “Adjustments” window to move the cube to a distance of 0 and a height of say 0.2. Look through the secondary camera at the cube. Now move the cube to a distance of say 0.34. The cube is more or less over the “1” line. This should not be. The cube distance in the “Adjustments” window should be 1 meter when the cube is over the 1m mark, right?

    FYI, the Transform coordinates of the cube match what appears in the "Adjustments" window. So when you set the cube height to be 1.0 for example, the Y value for the cube's position is 1; if you set the cube distance to be 1.25 for example, the Z value for the cube's position is 1.25 as well.

    Regarding the export, using the Autodesk FBX Exporter 2006.08, the Scale Working Units say “1 in will become 1.0… in; Scale Factor: 1.00…” I tried adjusting this (to scale factor 0.0254) but the results were not good.

    When bring up the Importing Assets dialog, the Mesh Scale Factor for both the floor and the cube are 0.01. I can change these, but I don’t know the size of the resulting mesh.

    Any suggestions?
     

    Attached Files:

  6. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    There was an editor script posted here in the forums that displays an object's "Unity world" dimensions. If you can't find it let me know and I'll dig it up for you.
     
  7. Shannon

    Shannon

    Joined:
    Dec 20, 2007
    Posts:
    21
    That's an awesome start. I'll do a search; even if I don't find it, I know how it has to be done. :0)
     
  8. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
  9. Shannon

    Shannon

    Joined:
    Dec 20, 2007
    Posts:
    21
    This worked out well, and I saw Unity extensibility in action too.

    I came up with some interesting readings as a result. In short, I can get close to a solution by setting the scale factor to 0.4 in the Autodesk FBX exporter. This works well for the 1x1x1 cube, but no so for the 20x20x1 box. I get the same measurements whether I use a parametric box or an editable poly box.

    With the 0.4 scale factor in Max exporter, models have a scale of 2.5 applied to the three axes in Unity. Using the reference script, the Print Selection Size function readout for the 20mx20mx1m floor box is: “Selected object’s size in world units: (19.7, 1.0, 19.7)”. This measurement is confirmed at run-time when the box distance setting does not match the box’s apparent position. To fix the world size discrepancy, I can set the floor’s scale to be (2.54, 2.54, 2.5).

    Why be so precise you say? The commercial application that I have for Unity requires accurate real world-to-virtual world conversion, in the context of a virtual reality scenario. If necessary, I will measure and adjust every object that I import, but this somehow does not seem consistent with the rest of Unity’s elegance.

    Any comments?
     

    Attached Files:

  10. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    This is what I've been doing...
     
  11. Michael Barber

    Michael Barber

    Joined:
    Dec 29, 2007
    Posts:
    2
    32 ft/s^2
     
  12. Xavier78

    Xavier78

    Joined:
    Oct 13, 2013
    Posts:
    40
    Not to bring back a long dead thread, but is there any new version of this script. I am working in VR, and have absolutely no sense of scale.