Search Unity

Blender > Unity Rotation Fix

Discussion in 'Asset Importing & Exporting' started by Mirgar, May 11, 2013.

  1. Evgeno

    Evgeno

    Joined:
    Sep 8, 2014
    Posts:
    57

    Attached Files:

  2. Mirgar

    Mirgar

    Joined:
    Aug 6, 2012
    Posts:
    22
    I took a look over the addon since Blender properly entered version 2.8 already. I fixed a couple issues with origin point of objects not staying in their place while at it too and moved the panel to more appropriate place for this version. It's on the right sidebar now, in Misc tab if you can't find it. Let me know if you find any issues.
     
    Bezoro and Vincent454 like this.
  3. Cataire

    Cataire

    Joined:
    Dec 2, 2019
    Posts:
    1
    Just pitchin' in to say thank you, an add-on of this kind is a time-saver :)
     
  4. bosonnn

    bosonnn

    Joined:
    Jul 3, 2020
    Posts:
    4
    Hi, it seems that with the release of Blender 2.83, the fix no longer works like it used to. It now sets the X rotation to -90 instead of 90 which leaves it with a rotation of -180 in Unity. A coworker did a fresh install of 2.83 and it's the same problem there. Is this something you're aware of?
     
    FlightOfOne likes this.
  5. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,512
  6. ttw1993

    ttw1993

    Joined:
    Jul 19, 2017
    Posts:
    11
    Is it possible to develop plugins that use blend files directly in the project. Because directly using the blend file can speed up the workflow. thanks
     
  7. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    314
    thats allready possible. but you would need to research which blender release works with which unityrelease
     
  8. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,512
    Also, blend files are not supported in Unity Cloud Build (as require Blender installed). You have to convert them to FBX if you need to build the project in the cloud.
     
  9. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    Thank you for making this! I am trying to install this on blender and it says it installed. However, I can't find it. I see all others including the other script I installed from this forum. Any ideas? I am on 2.83.1
     
  10. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    Figured it out!
    I had to set the blender version to 2.83.1 (not sure why this is though). and it showed up. It works like a dream. @Edy Thanks again for creating this, much, much appreciated!

    upload_2020-7-11_10-40-51.png
     
    Vincent454, Edy and Stexe like this.
  11. Evgeno

    Evgeno

    Joined:
    Sep 8, 2014
    Posts:
    57
    In version 2.83, something went wrong. Therefore keep a fix
     

    Attached Files:

  12. kkembioo

    kkembioo

    Joined:
    Apr 24, 2021
    Posts:
    1
    I love you so much thank you.
     
    Vincent454 and FlightOfOne like this.
  13. raydentek

    raydentek

    Joined:
    Jul 27, 2016
    Posts:
    103
    Thanks @Edy The tool you wrote really does solve issue this beautifully
     
    Vincent454 and Edy like this.
  14. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668

    I had to reinstall Blender and I tried but this does not seem to work anymore, maybe something with the blender version.

    Edy's tool still works. I use both of these tools as I am finding that sometimes it is better to import the blender file instead of fbx so I can easily edit stuff later. Unfortunately, Edy's can only export, doesn't apply changes to blend files.

    If anyone has any ideas please do share, thank you!
     
  15. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    Important to note that with Edys export tool, I had to click on the fbx asset in unity and tick the Bake Axis Conversion box, to achieve a correct orientation AND a unity rotation of 0,0,0.
     
    Last edited: Sep 2, 2021
  16. sankalp32O5

    sankalp32O5

    Joined:
    Apr 10, 2022
    Posts:
    3
    Hey i'm trying to make some custom trees for unity terrain tools before yousing youre addon my trees were laying flat but after using your addon my trees are getting painted underneath the terrain any idea why this is happning Screenshot 2022-07-19 123713.png Screenshot 2022-07-19 123810.png
     
  17. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,512
    All I can see in the pictures is that your tree in Blender is rotated -90 degrees in the X axis. You should apply the rotation in Blender (ctrl-A) so the model doesn't contain any unnecessary rotations.
     
  18. sankalp32O5

    sankalp32O5

    Joined:
    Apr 10, 2022
    Posts:
    3
    That Worked thanks :) :)
     
    Edy likes this.
  19. Mirgar

    Mirgar

    Joined:
    Aug 6, 2012
    Posts:
    22
    The way my addon works is by rotating the object 90d on X axis, applying the rotation and rotating the object -90d back so it looks like nothing has changed in Blender but when you export it, Unity importer reads the rotation properly. The problem is that Blender and Unity use different coordinate systems and that's why it needs such tricks.

    However, I wrote this addon years ago and much has changed since then so such weirdness can happen. I haven't been keeping up with unity development in some time so the addon went on unmaintained. What I noticed is that nowdays, Blender's FBX exporter got a lot better and has options to export objects into unity without need of my addon, so if you use FBX, you may want to try that. Otherwise, I would suggest you try manually doing what my addon does as described above but rotating it by different amount, applying rotation and rotating it back. For example, if you rotate it the other way around, 90d, apply and -90d, it could have desired effect. I cannot provide additional support since I no longer work with Unity nor maintain the addon.