Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

imported fbx automatically rotates 90deg

Discussion in 'World Building' started by ton33, Nov 3, 2020.

  1. ton33

    ton33

    Joined:
    Sep 3, 2018
    Posts:
    4
    Hello,
    Iam importing a tree that is a fbx asset i bought off turbosquid,when i import the asset in unity and drag and drop it into the scene the tree is standing correctly.When i add it as a tree brush in the terrain tools all the trees created using the brush are rotated 90deg on the x plane laying down on the terrain.I see when the model is imported it automatically set its x rotation to -90 in the inspector panel but i cant change any values in the panel since it is disabled.

    I've exported the fbx through 3ds max changing rotation values on all axis the rotation values would change in unitys inspection panel but the tree would still show up -90deg rotated in the scene.I've tried switching the fbx exporter parameter Z is up,and Y is up either one doesnt do anything in unity.

    I dont know were exactly to start looking or what to do any input is appreciated.
     
  2. JamesArndt

    JamesArndt

    Unity Technologies

    Joined:
    Dec 1, 2009
    Posts:
    2,912
    In 3ds Max you must go into Edit Pivot mode and rotate the pivot itself around the X axis until the Y axis is up and the Z axis is forward. By default Max sets the pivot to Z up and Y forward and this is why you'll see Unity do the -90 X rotation to compensate. Do not reset xforms after you do this as it will reset the pivot adjustment you've just made. Y up FBX export matches Unity's coordinate system.
     
  3. ton33

    ton33

    Joined:
    Sep 3, 2018
    Posts:
    4
    Hi I rotated the pivot using "Edit Working Pivot" or "Affect Pivot Only" command i couldnt find Edit Pivot Mode it moved the y axis pointing up in 3ds max.When i import to unity it now shows the tree asset thumbnail as the tree being upright in the correct position but now when i try to paint the tree on terrain the tree model isnt added to the scene.I checked underneath the terrain to make sure they werent reversed,also the inspector shows the tree models rotation as 0,0,0.I dont know this is a tough one.
     
  4. JamesArndt

    JamesArndt

    Unity Technologies

    Joined:
    Dec 1, 2009
    Posts:
    2,912
    Yeah I'd say make sure your tree in 3ds Max is at the origin, with the base of the trunk sitting at the origin. I would reset the Xforms on the tree first. Use the "Affect Pivot Only" mode and set the pivot snapped to origin with the pivot rotated to be Y-up and Z-forward. Using this button seen in the image below (ignore the axis direction, it's 3ds Max default).

    If Unity is showing your tree with (0,0,0) rotation when dragged into a scene, that means you've corrected the axis rotation problem. Now it sounds like your issue might be something else with the pivot location being too high or too low or maybe it's an issue of scale? I'm not sure, but maybe check your FBX export settings and ensure the scale matches.

     
    ton33 likes this.
  5. ton33

    ton33

    Joined:
    Sep 3, 2018
    Posts:
    4
    Ya still new to unity i had to create a tree as prefab now everything works perfect thanks