Sponsored Adverts

Author Topic: [Unity] fixing Blender model rotation  (Read 4856 times)

0 Members and 1 Guest are viewing this topic.

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2187
[Unity] fixing Blender model rotation
« on: September 23, 2015, 01:35:32 PM »

Incorrect (fixing) model rotation in Unity
Both Blender and Unity use different global axes or orientation - in Blender "Z" is "Up", in Unity it's "Y". When Blender made models and meshes are imported this difference often means they're flipped on their back (rotated around what is Blenders "X" axis). To fix this, set the objects "Rotation" property ("N") value for "X" to "-90" (minus or negative ninety degrees) and then reset the mesh using "Apply" ("Ctrl+A"). Once done export as normal - when exporting there's no need to set the "Forward" or "Up" axis information as the FBX process derives that from the file itself, i.e. the actual orientation of the models in the Scene. The mesh can then be rotated back in Blender so it can continue to be used ("X" will then become positive 90).


Offline ratty redemption

  • VIP
  • Hero Member
  • *
  • Posts: 952
Re: [Unity] fixing Blender model rotation
« Reply #1 on: October 20, 2015, 11:14:26 PM »
i'm really glad we figured this out. i remember it was confusing the hell out of me at the time. and thankfully the fix is relatively quick and only needs to be done once for each object. your video demonstrates it perfectly, which is easier than imagining rotating around axis between the different editors.

i hope to see more tips like this on katsbits in the future.

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2187
Re: [Unity] fixing Blender model rotation
« Reply #2 on: October 21, 2015, 01:02:39 AM »
A lot of the explanations found seemed confusing and overly complicated when the solution is actually pretty simple. Obviously the need to do this is negated by using Unity's ability to import *.blend files natively now but it's still a useful tip. And yes, hopefully will be doing more of these short tips.

Offline ratty redemption

  • VIP
  • Hero Member
  • *
  • Posts: 952
Re: [Unity] fixing Blender model rotation
« Reply #3 on: October 21, 2015, 01:40:19 AM »
are the explanations you're referring to from other users who were also struggling with this? and not just what you and i were trying to figure out at the time?

*.blend files do have some advantages, like not having to manually export, as unity will detect when they are updated/saved. although i assume they aren't supported by most 3d modeling apps like the *.fbx format is? and *.blend files can become bloated with redundant data if we're not careful.

as i'm continuing to learn the basics of the c sharp scripting language that unity can use, there are several useful coding tips i intend to share in the near future. even today i stumbled across a very quick solution to a performance issue i'd be struggling with for the last week.

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2187
Re: [Unity] fixing Blender model rotation
« Reply #4 on: October 21, 2015, 02:01:38 AM »
Others explanations. And yes *.blend files are basically file dumps so it's going to contain a huge amount of useless information associated with the interface and all sorts of other stuff; this might be OK for relative small simple files but larger and more complex items are better exported to *.fbx or other supported format.

What importing *.blend files into Unity may be good for is WIP'ing content, items are loaded into a live environment so changes and modifications can be checked as they happen. Once the design and functionality has been nailed down it may then be best to export to FBX, again largely because the data needs to be fixed and localised (contain only the data that's needed).

Offline ratty redemption

  • VIP
  • Hero Member
  • *
  • Posts: 952
Re: [Unity] fixing Blender model rotation
« Reply #5 on: October 21, 2015, 10:20:58 AM »
understood and i agree.

Tags: unity blender rotation 
 

Sponsored Adverts
RSS Content is copyright © KatsBits™ 2017 unless otherwise stated. All Rights Reserved.
No part of this web site may be reproduced (except for personal use, or otherwise stated) without prior written permission from KatsBits.com. For more infomation on copyright click here.
Web design cpdtAdvertisePrivacy PolicyDMCA (about DMCA) Home Store Workshops Blog Jobs Support About Katsbits Contact Site Search KatsBits Help Site Map RSS feed Forum YouTube FaceBook LinkedIn Twitter IMVU