Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Drew 1 · Jul 08, 2011 at 02:11 PM · distanceunits

How do you change measurement units in unity?

I know that Unity uses meters by default, but I want to be able to change that. I have had multiple scaling issues while making my building in 3ds max, and I want to have access to the units settings for unity to double check that it is right now. I know that similar questions have been asked before, but they only tell how to change gravity. I need to change DISTANCE and MEASUREMENT units. Gravity is working just fine for me right now.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by DaveA · Jul 08, 2011 at 02:18 PM

You could make a converter class which multiplies everything by the conversion factor, but it sounds like this is an issue for importing 3ds models. I would look into a post-processor on the model importer, see http://unity3d.com/support/documentation/ScriptReference/AssetPostprocessor.OnPostprocessModel.html Basically after the model loads you could wrap it in a transform which applies the scale, or crawl its hierarchy to apply the scales, or modify the meshes, etc.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
3

Answer by Xavier78 · Aug 25, 2019 at 10:44 PM

Now with VR they have actual meaning. They are everything for VR!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
2

Answer by Joshua · Jul 08, 2011 at 02:20 PM

Units of distance and scale are meaningless and relative to nothing. Call them meters, inches or lightyears, it affects nothing.

The only thing that it does affect if force and velocity calculations by the physics engine. But since you control this all you have to do is take it into account. The only hardcoded place where you need to adjust the force is under gravity settings, because all the other physics settings are done through code by you yourself.

So to change the units of measurements, pick a word for how you call them (mine are Joshuas, plane that is 9 square Joshua). Now decide what the scale of this unit is compared to meters (mine are 1! :p) and divide the gravity by that. From there on it's just a matter of imputting the right force and velocity variables.

So the reason all you can find on changing measurements is changing gravity is because changing measurements is useless, as they are meaningless units. They are just used by the physics engine, so change how it uses them.

Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Drew 1 · Jul 08, 2011 at 02:38 PM 0
Share

hm... Well that's kind of frustrating. I'm making a mall that you can walk through and I'm trying to make it close to the actual dimensions of the real building. And now I have to make the texture for the parking lot in photoshop. so will i just have to guess on the dimensions for that texture?

avatar image Joshua · Jul 08, 2011 at 02:43 PM 0
Share

All relative scale will always stay correct of course, as long as the object's scale is 1,1,1. So this doesn't affect the dimensions of your texture in any way, they are deter$$anonymous$$ed by the dimensions of your model. A two by one floor will remain a two by one floor.

You just have to 'forget' the meaning of distance, and do everything by scale. Which is fine, because that's also how you're supposed to model and texture (although I have no experience with that).

avatar image Drew 1 · Jul 08, 2011 at 02:46 PM 1
Share

wow... i now accept that once you begin 3d design in general, you must ignore half of what you have learned about everything. I think it's that way for most new concepts though.

avatar image DaveA · Jul 08, 2011 at 04:34 PM 0
Share

True that. And for textures, things like 'dots per inch' are also meaningless. For models though, since many other modeling programs DO have units, it's nice to keep them consistent. So if you make something in Sketchup and something else in $$anonymous$$ax, you need to worry about your 'arbitrary' units.

avatar image Joshua · Jul 08, 2011 at 04:38 PM 0
Share

That's true, they are relative to eachother, so they do have meaning in that sense. I'm guessing this can be fixed by figuring a good import scale per modeling tool you use. But I have no experience modeling, so I don't really know. But for fixing this doing what $$anonymous$$A suggested in his answer seems like a good solution.

Show more comments
avatar image
2

Answer by Cnotey · Dec 03, 2011 at 07:56 AM

I have been struggling with this as well. The consensus is that they are "units" and not meters. But as an architect I strongly disagree with this school of thought. Units are relative to your daily life, just as language is. How are you supposed to reference a word if you don't know the language?

Measurement units are all about reference and your point of view.

So for all of you out there struggling with this, the answer is simple. If you are using 3DS Max or Maya, simply just build whatever you are building as if each unit was 1 foot. Then, right before you export it, scale your entire scene up * 0.3048.

This will make it come into unity at the correct scale, and also allow you to model at a relative scale.

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image syclamoth · Dec 03, 2011 at 08:02 AM 1
Share

$$anonymous$$easurement units are dimensionless, always. Unity doesn't make any judgements about how long you want your things to be, but the physics engine does assume metres (for gravity) by default. Other than that, nowhere in Unity does it presume to tell you how you should be interpreting the size and length data it presents you with. From an architecture point of view, well of course for architecture you need things that relate to the real world, but nothing in Unity explicitly links to anything outside of it.

avatar image Eric5h5 · Dec 03, 2011 at 08:20 AM 0
Share

Right, Unity is a general 3D engine, you're not going to be dealing with human-sized buildings all the time. It doesn't make any sense for units to be anything other than arbitrary, otherwise the engine is placing too many restrictions on you.

avatar image Cnotey · Dec 03, 2011 at 08:45 AM 0
Share

The documents say otherwise.

Physics

As I said before, the entire reason for measurement units is for reference. If I want to draw a soda can in unity, I know from personal point of reference that it is approximately 5" tall. So of course, naturally I want to draw it in Unity to scale. Why not just make everything to relative scale?

This has everything to do with Unity! If I want to make a scale version of an $$anonymous$$14 rifle, I know the real work reference dimensions, and it's easy to model it as such. So that is the reason to model everything to scale. So from a point of reference, they are all scaled equally to each other.

avatar image syclamoth · Dec 03, 2011 at 08:48 AM 0
Share

You can arbitrarily scale everything in unity. So long as everything has the correct scale in relation to everything else, there's no problem. The 'gravity' value in Physics is the only place where it defines how long the unit is, and only in situations where the gravity should be the same as on earth. This value can be changed to anything you like, in any direction you like- so it hardly creates any kind of limitation at all.

Also, don't post comments as answers. It's basically the wrong thing to do.

avatar image Eric5h5 · Dec 03, 2011 at 06:32 PM 0
Share

No, the docs don't say otherwise.

Why not just make everything to relative scale?

Like I said, Unity is a general 3D engine, and you're not going to be dealing with human-sized scales all the time. A space game, for example, dealing with interplanetary distances (or even interstellar distances). Units are units, nothing more. They are what you say they are.

avatar image
0

Answer by BionicWombatGames · 17 hours ago

Units and scale have meaning in physics (2011) and VR (2019), and now with URP and HDRP units and scale have actual meaning when dealing with lighting and light falloff, too. If your scene is way too large you will need to crank values of your light intensity to astronomical values. That may in and of itself not be a problem, but then directional lights don't have light falloff and so will use intensity values that are calibrated for standard scale. So if your room is too big, a point light may need intensity of 1000+ to equal what's being output by an intensity 1 directional light.

Using correct scale also allows artists and coders using marketplace assets to minimize overhead when importing/exporting, so we don't end up with one model that's the size of the moon and another which is as small as a toenail.

Given the importance of scale in modern rendering pipelines, and the de facto (but unwritten) standard that Unity uses of 1 unit = 1 meter, Unity should prioritize supporting standard units and scale within the program, and should allow the user to input custom scale factors to ensure that all projects are able to work in meaningful and accurate units.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I play different audio depending on the distance? 0 Answers

How to calculate distance in meters? 1 Answer

Get distance between 2 gameObjects? 2 Answers

Specify detail density and detail distance PER grass texture? 0 Answers

Platform does not move accurate. Transform translate not accurate. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges