• 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 pbcMark · Oct 09, 2011 at 07:46 PM · rotationimportblenderfbx

Stopping the 270 degree FBX default rotation on import

I want to know if it is possible to prevent automatic rotation of FBX objects during importation to Unity, and how to do it if possible.

Explaining:

When importing an FBX format object from Blender 2.59, I notice that a 270 degree rotation is automatically applied on the x-axis. This is apparently performed in order to compensate for the z-axis-up characteristic of Blender, which conflicts with the y-axis-up characteristic of Unity.

The Unity documentation advises the user to correct the rotation of objects to a y-axis-up orientation in their modeling software. I have done this, rotating objects so that the y-axis is now up and then "baking" this into the objects by using Blender's "Apply > Rotation" command.

However, upon import to Unity, the 270 degree rotation along the x-axis is still applied, though it is unwanted. (I understand why - how would Unity know which way I want the model to point?)

I have read posts which seem to be saying that using the 270 degree rotation from Unity will cause problems with scripting and animations. If this is true (and the documentation suggests it might be), then is there a way to stop Unity from rotating FBX objects 270 degrees? If I've already applied the rotation fix for y-up in Blender, I don't need it applied again in Unity.

Looking at the import settings, I see rotation error values for animations, but nothing addressing the automatic 270 degree rotation.

Comment
PatHightree
benhumphreys
Necronomicron

People who like this

3 Show 1
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 · Oct 09, 2011 at 10:44 PM 0
Share

There's an option for this in the fbx export settings in Blender. It includes all kinds of axis rotations, just pick the one that you need!

6 Replies

· Add your reply
  • Sort: 
avatar image

Answer by Owen-Reynolds · Oct 10, 2011 at 02:05 AM

FBX export doesn't rotate the model -- if the model faces +z with +y up, it will look fine in Unity -- but there are some things to watch for:

If you rotate in ObjectMode in Blender (the one where you can select different objects,) then you are really changing the Blender Transform, but not changing the "real" model. It's very easy to do this by mistake. To check, select Object->TransformProperties. Should see all 1's for scale and 0's for rotation.

To really rotate the model, go to EditMode, select all verts, and rotate them.

The export rotation settings in Max aren't helpful for us -- they change the transform after export. But, the ones in Blender really do work -- they change the verts (well, in 2.49 they do.) Blender FBX-export comes with RotX90 checked (which sort-of flips modeller z-up to Unity y-up.) Be sure to uncheck that if you model everything Unity-oriented.

Comment
IgorAherne

People who like this

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

Answer by pbcMark · Oct 10, 2011 at 04:49 AM

Thanks all.

I have found that applying a +90 rotation on the x-axis in object mode in Blender, followed by use of the Apply > Rotation command, orients my models correctly for export. Then, I have found that selecting the "Selected Objects" checkbox under Export FBX in the export screen and setting Y to forward and Z to up (that's positive Y and positive Z) works. I get the model in Unity with the correct side facing up, no rotations applied in the inspector, and axes aligned in the proper directions.

One thing to be careful of is the notation -Y forward (Blender) which is WRONG (at least for exporting to Unity). It must be set to positive Y forward, NOT negative Y forward.

(BTW, this Qato thing doesn't work.)

Comment
Veehmot
ikelaiah
Clonkex
Necronomicron

People who like this

4 Show 6 · 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 · Oct 10, 2011 at 04:50 AM 0
Share

Nah, it's definitely Unity that's wrong. Seriously, y up? z up is the only thing that makes sense.

Also, it does, it's just that new users need to have their posts checked by a moderator before they can be seen by the rest of the site- and sometimes that take hours. Sorry.

avatar image Owen-Reynolds · Oct 10, 2011 at 02:28 PM 0
Share

Graphics cards, web browsers, unity GUIText (and high school) think that Y is up. "Clearly" x/y are on the screen and Z is the 3rd dimension. The funny thing is, real 3D math thinks Z is up, which is why modelling programs use Z-up.

avatar image pbcMark · Oct 12, 2011 at 12:24 AM 0
Share

"Also, it does, it's just that new users need to have their posts checked by a moderator before they can be seen by the rest of the site- and sometimes that take hours. Sorry."

I was referring to the non-functional login system.

avatar image dtoliaferro · Nov 06, 2011 at 12:44 AM 0
Share

Thanks a lot for this workaround!

Edit: Actually I still have to model "up" as if Z in Blender was forward. I hope 3.5 fixes this problem.

avatar image whyunoworkunity · Nov 06, 2012 at 09:14 PM 1
Share

Z forward makes sense from a 3D graphics programming perspective. In view space, y is the vertical span of your screen, x the horizontal, and z is the logical extension of depth. In all 3D applications including 3D modelling packages (where z is up), rendering to the screen includes the step of converting your scene into the view space coordinate system, where z is forward. So practically, z forward makes more sense than z up.

Show more comments
avatar image

Answer by MonkeyZero · Jan 17, 2013 at 05:51 AM

Huh, I've been Banging my head on the Keyboard for weeks now trying to get blender to export the meshes the correct way.

I figured out, rather quickly on my own, how to set up blender's building environment so that the object are built to unity scale at a 1:1 ratio in the metric measurements.

Honestly either Unity should Give the user control as to how to handle the X,Y,Z Orientation issues or blender needs a script that handles this.

Now, It's was a week or so ago when I last gave this issue a go, but I think I tried this and it seems to get a sort of strange issue where the model was 0,0,0 Rotation but the side the rifle i was building breach was on was on the opposing side. Totally the wrong direction, and not even scaling -1 in blender fixed this issue.

@Owen Reynolds: You can rotate in object mode then hit CTRL+A to apply the "Rotation and Location" back down to Zero. this is in face actually committing the Orientation of the model

Anyways, Maybe I did do this wrong and so I'll give it one more go and see if this works out. thanks you very much in advance.

Comment

People who like this

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

Answer by Benproductions1 · Nov 02, 2013 at 10:36 PM

Hello,

If you want Unity to correct for the difference in axis's you can write a AssetPostprocessor that does it for you. Thankfully I've already written one and released it on the wiki:

http://wiki.unity3d.com/index.php/FixBlenderImportRotation

This means you can just import your blender models as normal, without having to do any modifications in either blender or Unity.

Hope this helps,
Benproductions1

Comment
robertbu
virgiliu
IgorAherne

People who like this

3 Show 2 · 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 boddole · Feb 27, 2014 at 02:45 AM 0
Share

@Benproductions1: Thank you for the effort however, in Unity 4.3, my Blender models are coming in backwards and the objects Z rotation in Blender is not being changed to Y rotation in Unity.

avatar image Benproductions1 · Feb 27, 2014 at 08:28 AM 1
Share

If your models z value is in the wrong direction you can simply change the rotation in that script to rotate -90 degrees instead of 90.

avatar image

Answer by mighty_marcos · Feb 28, 2014 at 06:18 PM

I've discovered a great workaround for 3dsmax. Simply add a dummy to your scene, the object will still import with a 270 degree rotation, but when instanced, there will be NO -90 rotation applied to it.

A dummy comes in as a transform, with tiny overhead. It could be another mesh for that matter, but a dummy will do.

And no parenting involved, just select your mesh, your dummy and export selected.

Hope this helps everyone.

Comment
theANMATOR2b
ditzel
IgorAherne

People who like this

3 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 Carl201010 · Apr 04, 2016 at 03:33 PM 0
Share

Oh, well that worked - cheers! Although it seems suspiciously like witchcraft...

  • 1
  • 2
  • ›

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

14 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

Related Questions

Blender import, messed up rotation, how do you fix it? 1 Answer

FBX import from blender rotation slightly off 2 Answers

texture not applied, despite many attempts 2 Answers

Blender import missing faces please help!! 6 Answers

Objects from Blender (FBX Exported) are scaled wrong. 4 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