Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 superflyninja · May 27, 2015 at 02:57 PM · blenderscalefloat3d modelprecision

Question on scale of imported 3D models

Hi all, This has to be a an utter noob issue. But I cant find answers on it, so apologies in advance.

I created three cubes in blender. I set the size of each in the inspector. Nothing fancy, one cube was 2,2,2 another 2,1.5,2 etc. So I import to unity and the scale factor is 1. Fine The scale of the cubes in unity(in the inspector) matches the scale that was set in Blender. I made a script that will place (this is simplified) two cubes in a row. Works fine with standard unity cubes. Not so with the blender cubes. There is overlap. Long story short, it appears in order to place the cubes edge to edge I must use a distance of the unity object size added to the mesh size(on a given axis). So two issues. If i print out the size of the mesh on that axis, its not exactly right. for example the size of the x axis for the cube in Blender was set to exactly two. But printing out the size in unity and the size is 2.000000001 which could lead to issues.....Ill need the cubes precisely edge to edge. How do I fix this?

What way is this normally handled in unity? Is it just a case of using the inspector values for the model and doubling those rather than getting the mesh values? (which appear to match, apart from the tiny fractional difference)

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by mikelortega · May 27, 2015 at 03:16 PM

Unity works with float precision. It means 2 may be represented as 2.000000001 Take into account floats give you from 6 to 9 significant decimal digits precision. With this in mind, think about alternatives to place your cubes.

If you have a big overlap it cannot be precision, it must be something else.

Comment
Add comment · Show 10 · 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 superflyninja · May 27, 2015 at 03:19 PM 0
Share

But just to confirm, if a cube measures 2x2x2 in blender,if I import that into unity at scale factor 1, then the gameobject of the cube sets itself to scale 2,2,2 also. So to space the cubes pretty evenly I need jsut double the unity gameobject(inspector) measurements?

avatar image mikelortega · May 27, 2015 at 03:25 PM 0
Share

Have you reseted the cube's transform in Blender? $$anonymous$$ake sure it really measures 2,2,2. Or is it 1,1,1 with x2 scale transform?

avatar image superflyninja · May 27, 2015 at 03:43 PM 0
Share

in Blender it measures, 2,2,2. and scale factor in unity is 1. so then I drag a cube into the scene and in the inspector it measures 2,2,2. But the effective distance between two cubes edge to edge is 4

avatar image mikelortega · May 27, 2015 at 03:53 PM 0
Share

Can you share a screenshot or your scene? I cannot figure out what's going on there.

avatar image superflyninja · May 27, 2015 at 03:55 PM 0
Share

Ill upload later on thanks :D

Show more comments

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

20 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Rigging a non-humanoid 3D model from Blender 0 Answers

Blender to Unity animation, "Invalid avatar Rig Configuration, Missing or invalid transform: Required human bone for 'RightUpperLeg' not found" 0 Answers

Vector3 constructor precision 1 Answer

Max scale in unity3d 2 Answers

Blender to Unity question. 2 Answers


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