Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Can I use my own modesl as Trees with Unity Terrain?

Discussion in 'Editor & General Support' started by rickw, Oct 4, 2013.

  1. rickw

    rickw

    Joined:
    Jul 7, 2013
    Posts:
    15
    So, I create a new project, add a terrain.

    Next I import a 3d model (created in blender) and create a game object called tree. I create a prefab from this.

    Then I follow these instructions (http://docs.unity3d.com/Documentation/Components/terrain-Trees.html)
    To summise I add a tree in the trees inspector and try to paint on the terrain.

    I can see the blue brush on the terrain, but trees do not appear!

    Nothing happens!

    Any ideas what I'm doing wrong?
     
    Last edited: Oct 4, 2013
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,204
    Did you follow all of the instructions?
    Are they perhaps scaled wrong (i.e, too small to see)?
     
  3. rickw

    rickw

    Joined:
    Jul 7, 2013
    Posts:
    15
    If I drag the prefab onto the terrain I can see it so I suspect the scale is ok? What sort of value should it be?
    I missed the docs you quoted, so I'll try that now..

    Cheers for your help
     
  4. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,204
    If you can see it when you drag it on the screen, then the scale is OK. I'm suspecting it's something with the shaders.
     
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    You can always use the old style "tree soft occlusion shaders" which – however – do neither give you nice bending nor advanced lighting such as bark and leafs casting and receiving real time shadows, bump mapping or translucency.

    But in case you want to import custom made trees and still benefit from advanced bending and lighting functions such as offered by the tree creator shaders you may give the custom tree importer script a try. It lets you import manually modeled trees from 3d Apps like Maya, 3ds Max, Modo or Blender and adjusts them to be compatible with unity's advanced tree creator shaders and directional and radial wind zones on the fly:

    https://www.assetstore.unity3d.com/en/#!/content/21079