• 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
Question by Harrier · Jul 17, 2016 at 08:33 PM · rotationimportblenderfix.blend

FixBlenderImportRotation wiki scipt x mirror issue

Hello, i found this cool editor script to fix blender's rotation at import. But soon i noticed it is mirroring x axis which is also cause of flipped normals (he is fixing them at line 63).

So i put x*-1 in this line:

  vertices[index] = new Vector3(vertices[index].x *-1, vertices[index].z , vertices[index].y );

And commented out code that is flipping normals.

It works, but i'm not sure if i'm doing it right and i don't know why is rotation at line 31 needed. Shouldn't be swapping axis sufficient?

Thanks for your answers

Comment

People who like this

0 Show 0
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

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Harrier · Jul 18, 2016 at 06:24 PM

Partially figured out, unity front is z+ and blender front is y-, code posted in question rotated front to back.

Solution:

 vertices[index] = new Vector3(vertices[index].x , vertices[index].z , -vertices[index].y );

But still i have no idea why rotation is needed.

Comment

People who like this

0 Show 1 · 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 meat5000 ♦ · Aug 14, 2016 at 07:38 AM 0
Share

Its not just one axis pointing a different way but a left-hand vs a right-hand system.

https://www.evl.uic.edu/ralph/508S98/coordinates.html

avatar image

Answer by meat5000 · Jul 18, 2016 at 11:29 AM

This always worked for me:

http://forum.unity3d.com/threads/blender-unity-rotation-fix.181870/

Remember to apply loc, rot, scale and you could also try the Built-in rotation fix, that was probably derived from Mirgars fix.

Comment

People who like this

0 Show 1 · 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 Harrier · Jul 18, 2016 at 12:32 PM 0
Share

Does this solution cause issues with LookAt?

Quote from FixBlenderImportRotation wiki:

Instead of all the objects in the object to be rotated by x-90 degrees, the mesh data is properly rotated, meaning transform.forward is the real forward axis, and lookAt actually works!

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Import Blender Model - Assigning Materials 3 Answers

Stopping the 270 degree FBX default rotation on import 6 Answers

How do I import .blend files properly? 0 Answers

Blender > Unity - help with unwanted bone twisting/rotation? 0 Answers

Blender imported model textures has wrong rotations and repeats 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