I asked before if What is the Default unit in unity. Someone said
1 meter = 1 unit in unity but i ran across this in the wiki:
Setting Unit in Maya
In Maya, you can set your unit size to the same as Unity units by clicking on on Window => Settings/Preferences => Preferences then clicking on Settings => Working Units => Linear and changing it to “centimeter”. From now, centimeter is the unit we work on in Maya.
That says to me the 1 centimeter = 1 unit in unity.
There is no “default unit” in Unity. Just choose what you want units to represent and stick to that. If you have gravity in your game, you need to set it up to match the unit representation you have decided on (if you want it to be realistic). The gravity per default is set to be like earth gravity as measured in meters per second, but if you use centimeters for your units, you can just multiply the gravity by 100.
I just did a test. I have been using meters with unity iPhone so far and so far when I import my character if I set the scale factor to 1 the character is 100 times larger than the unity cube with scale 1,1,1. I have to set either the characters scale factor to .01 or set the xyz scale to .01 to get it to be relative with the unity cube.
Now I just set maya to centimeters scaled my character down froze transforms and exported with centimeters and now on import both scale factor and xyz scales are at 1 and everything is the same in relative size. So it seems to me centimeters is unities units.
Now I know you can use whatever units you want in unity, but my question I have posed before is given this scaling in the engine when dealing with meters is there any kind of performance hit because the engine has to maintain geometry scale other than 1?
No, whatever scaling issues happen when you import things into Unity is a by-product of the import process only. It does not mean that Unity itself has a specific default unit.
If you don’t treat Unity units as meters, then there are many settings and defaults besides gravity you may need to change - anything involving distance or speed, e.g. the Physics Manager has sleep velocity, min penetration, Quality Settings has shadow distance, cameras have near and far planes, lights have ranges…
In that sense, I consider meters as the “default” unit in Unity.
Those settings you mention are not only dependent on whether you use meters or something else, but also on the scale of your subject matter in the first place. For example, you probably want to adjust those settings differently depending on whether you are creating a game about ants or about huge space ships, even though you might use meters as units in both cases.
I’ll add that I’ve experienced physics performance issues and skeletal animation problems if the object’s scale transform is not 1,1,1.
You can use the FBX Import settings to scale objects on import (keeping your transform at 1,1,1) but that can affect skeletal animation as well. I’m not surprised as it’s often not good to scale bones except for length.
I did some tests because I wanted to know how big, and what direction to model characters in before I started rigging them.
I got the best results by setting my Maya working units to centimeters, Y-up, and having characters face the +Z direction. With these settings, characters are about 3 or 4 cm high in Maya.
Setting Maya working units to Meters brought in the character to almost the size of the whole level.
I tested this next to Lerpz and the platformer tutorial. I did not convert to FBX first, or adjust any values in Unity’s FBX conversion settings.
Yeah That is the same method I use. Assuming they used Maya to create Lerpz. If you create a box 2 units high in Maya while set to centimeters export it to unity. Import settings scale factor to 1 and the objects XYZ scales are also 1 then place it next to Lerpz it will be the same size, you’ll also notice that Lerpz’s scale factor and XYZ scale is also 1to1. IF you do this with meters your scale factor will need to be .01, which is fine, but I like everything to 1 to 1. In the big picture it doesn’t matter what scale you use as long as you stay consistent with it. I also use the Yup and forward +Z.
I think the default is meters but check the Inspector on your ‘asset’ and make SURE the Scale Factor is 1. ( NOT ‘0.01’ )
By increasing the scale factor from its default .01 setting to 1.0 you are getting a Meter import instead of the Centimeter. DO THIS BEFORE you drag the Asset into your Hierarchy and you should get what you are looking for.
What’s actually going on is that the default import settings scale models by 0.01. You can change this to whatever you want. The instructions are incorrect insofar as they aren’t chaining anything to “Unity units”, it’s just matching up the output scale to be as the Unity importer expects it to be… which is subtly but importantly different.
Aside from that, as others have said, there’s no real “default unit”. However, the physics system’s default settings assume that 1 unit = 1 meter. It can of course be tweaked if you so desire, though.
Hi, me and my friends are making a game in Unity but we are noobs in some features, we are working in a platformer game with logic puzzles in that the character live in an ethereal world like a fantastic world, every size of every plants or enemies are realistic, i mean they sizes are like a human. What “Pixel per Unit” did you recomend me? We are using puppet2d so i want to know if having 100 pixels per unit affect in some way the rigging or bones or skinning or something important in the animation or the process of making it
I’m still little lost (noob to Unity 5) you said 1 unit = 1 meter, right, but if you want you can change it. I’ve been all over Unity, well almost, and I can’t find where to change it at.
You don’t “change” it. A unit is a meter if you treat it like a meter. It’s a centimeter or an inch or a solar unit if you treat it like one of those instead.
By default gravity is set up to be (0, -9.8, 0), which you may recognise as approximate real-world gravity in meters per second squared. So if you’re not treating a unit as if it’s a meter and you’re using gravity then you’ll probably want to update that accordingly.
Not quite. What units are the camera clipping planes measured in? It can’t read your mind and adopt whatever scale you are using - there’s a unit for that measurement. What is it?
Sorry for resurrecting an ancient topic; it seemed better than starting a new post.