Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
4
Question by Piranha771 · Oct 18, 2016 at 06:14 PM · unity 5blenderblender-exportingimporting assetsimporting problems

Wrong rotation / position / scale when exporting FBX from Blender

This is a Q/A, if you already know the problem skip to the answer :)

Let's say you have made a model in Blender.

Something beautiful like this:

alt text

You have finished it and export it to *.fbx format. But the import in Unity actually looks like this:

alt text

  • The Scale is wrong. (It's 100. If the cube was 1 unit in Blender, you want it 1 unit in Unity!)

  • There is some weird rotation on the X Axis. (-90° why?)

  • Even if you remove the X rotation it's completly wrong in place and rotation.

  • When you have multiple meshes in one model they are at the wrong places too

Wouldn't it be nice to have the model just as you have created and can see it in Blender? Who cares for the Axis names, if you stack 2 boxes above each other in Blender you want them to be the same way in Unity right?

inblender.png (41.8 kB)
inunity.png (72.6 kB)
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
9
Best Answer

Answer by Piranha771 · Oct 18, 2016 at 07:18 PM

The solution

I made a model postprocessor for Unity's importer. It's inspired by the blender importer from the wiki page.

You can get the code for it here: https://gist.github.com/piranha771/e97c773fc050bc6387d36a080c4dd132

Just paste it in your editor project.

It does all the things to wipe away the conversion problems with Blender. This is the result:

alt text

As you can see there is no translation, rotation or scaling on the object. It just works right away even when you use drag & drop.

When using the Blender FBX export you can use the default settings with one exception: The Small button next to the scale has to be activated. Thats it.

Even mutiple sub meshes are translated correctly:

alt text

I didn't test animations yet, but they should work.


newtool.png (163.9 kB)
newtool2.png (196.7 kB)
Comment
Add comment · Show 4 · 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 Piranha771 · Oct 18, 2016 at 07:40 PM 0
Share

Just in case you missed it: To get 1:1 Scaling in Unity you have to activate the marked button: http://puu.sh/rNtbg/782be1b622.png

avatar image ReleeSquirrel · Nov 21, 2016 at 11:11 PM 0
Share

Could you elaborate on where "in your editor project" would be? I'm not sure where to put your script.

Edit: On a larf I tried putting the file in my scripts folder. It worked. You just put the script somewhere in your assets and it just works. I don't get it. ^.^;;

avatar image Bunny83 ReleeSquirrel · Nov 22, 2016 at 12:26 AM 0
Share

You shouldn't put the script "just in your Asset folder" as it would prevent you from building your game. As this is an editor script it can't be included in your actual game.

Editor scripts should be placed in a folder named "editor". See special folder names for more details.

avatar image $$anonymous$$ · Apr 17, 2017 at 06:38 PM 0
Share

This is perfect, I can't believe this question and solution is not more pro$$anonymous$$ent. I guess not many artists/devs out there using Blender -> Unity.

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

6 People are following this question.

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

Related Questions

Blender animation import - different animation and offset location 1 Answer

Cannot properly import animations from Blender into Unity that have been updated. Please help a girl out! 1 Answer

Object mesh collider acting strange 0 Answers

Problem when importing .fbx file to Unity 1 Answer

Local Orientation reversed on transfer from blender to unity 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