Search Unity

My Trees are on their sides - Que?

Discussion in 'Editor & General Support' started by jinda2001, Sep 28, 2010.

  1. jinda2001

    jinda2001

    Joined:
    Sep 7, 2010
    Posts:
    37
    Hey All,
    I'm importing an Oak tree I made in max as a FBX file.
    (used the "Y" axis up converter in the exporter)

    In Unity if I drag the tree into the scene as prefab - all is well, tree is vertical.
    But, when I load it in as a terrain tree it seems to be ok (preview image etc)
    but when I paint trees to the terrain the trees are all on their sides.
    very frustrating............
    I tried exporting it out on its side to see if I could "realign them as a workaround" - didnt work
    in fact here the prefab was on its side AND the tree"brush" was also on its side.
    Has anyone encountered this?
    Am I missing something simple?
    thanks for any help.
    J.
     
  2. jinda2001

    jinda2001

    Joined:
    Sep 7, 2010
    Posts:
    37
    I also noticed one other detail
    the trees have a x rotation of 270 degrees on them that the "included asset trees" do not.
    I think this is probably from the fbx importer converting the "y axis up" yes/no?
     
  3. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Yes, rotate the trees -90 in X in Max and reimport.
     
  4. jinda2001

    jinda2001

    Joined:
    Sep 7, 2010
    Posts:
    37
    Tried that and it did not work................
    tried both Y axis up in the importer
    and z axis up in the importer
    same result (orientation is different in the prefab vs treebrush.)
    is it possible that Unity has gone buggy?
     
  5. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    You need to actually rotate the tree in Max -90 in X... changing the import/export settings will not help.
     
  6. van-Zyl

    van-Zyl

    Joined:
    May 7, 2016
    Posts:
    1
    Good Day, I have this problem now too, I did export my trees on -90 on X (Manually rotated it -90 before export) modeled in Blender. It still lies on its side? Any suggestions would be great.

    Thanks.
     
  7. DouglasPotesta

    DouglasPotesta

    Joined:
    Nov 6, 2014
    Posts:
    109
    Try doing the rotation in edit poly modifier, or using the reset x form after rotating the tree -90
     
  8. unity_lK74RNpv9IQPbw

    unity_lK74RNpv9IQPbw

    Joined:
    Feb 11, 2020
    Posts:
    1
    I have this problem too and tried all suggestion with no result... any other ideas?
     
  9. oleekconder

    oleekconder

    Joined:
    Jul 7, 2017
    Posts:
    1
    No, unity STILL doesn't know, how rotate trees. SHAME ON YOU. Fix this already, be a men, unity people.
     
  10. athagualpa

    athagualpa

    Joined:
    Nov 24, 2022
    Posts:
    1
    Hola buenas tardes, el problema se resuelve exportando en blender el FBX seleccionado con el punto de pivote en la base del mismo en el centro;
    APPLY SCALINGS : ALL LOCAL
    FORWARD: Y FORWARD
    UP: Z UP
     
  11. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    Same problem. I rotated it many ways in 3ds max, but Unity keeps adding an additional rotation! Imagine if you could set a rotation in the terrain tree settings.... :rolleyes::rolleyes::rolleyes:
     
  12. RollingBoonecm

    RollingBoonecm

    Joined:
    May 18, 2023
    Posts:
    1
    It has only been 33 minutes, but I was able to get it right. So,
    Update:
    1. Find your tree model.
    2. Open it in your preferred 3D editor. (I am using Blender)
    3. Export it as "exampleName_LOD0.fbx" (replacing exampleName with your name for it).
    It should be in you're Unity project folder, but it will be easier to find in the assets folder
    4. Now un-subdivide your tree (reduce number of vertices).
    In Blender you open the Modifiers panel and add the "Decimate" modifer. Choose your ratio (It should lower your face count considerably, but not more than 1/3 of the original face count).
    5. Export it as "exampleName_LOD1.fbx"

    Repeat steps 4 through 5, replacing "LOD1" with "LOD2".

    Now enter Unity, and
    1. Make a new prefab and call it anything you want.
    2. Click on "Add Component" and find "LOD group".
    3. Now add all your tree meshes to the middle of the prefab scene (preferably in the same exact location).
    4. In the LOD group panel to the side, you should see the dropdowns that say "LOD 0", "LOD 1", and "LOD 2"
    5. Open the "LOD 0" dropdown and click on the + button. Then, click on the bullseye next to the text "None (Renderer)" and select (under "scene") your tree with the corresponding LOD ending.
    Repeat step 5 with both LOD dropdowns.

    Change the slider above the dropdowns to tell Unity how far you want the camera to be before it downscales.

    You should be able to exit the prefab editor now.

    Now, when you are adding a tree to your terrain painter, select the prefab and use it to paint the landscape.

    Hope this helps!
    Let me know if you find any problems, and I'll look into it ;)