Search Unity

Imported trees not working with wind?

Discussion in 'Editor & General Support' started by Carst, Dec 21, 2013.

  1. Carst

    Carst

    Joined:
    Dec 21, 2013
    Posts:
    2
    Are imported trees, made in a 3rd party program not working with Windzones?

    I've made sure everything is set up correctly according to the documentation. The unity tree creator trees work just fine. Just any trees I make in maya/max/blender isn't moving with the wind. The shaders are set up correctly, and I'm using one mesh, two materials. I don't see any difference between my meshes and the tree creators. The shader should be the determining factor, since it's what moves the leaves vertices right?

    Any help is greatly appreciated :)

    -Carst
     
  2. Deleted User

    Deleted User

    Guest

    Have you used the terrain editor and created a wind zone?
     
  3. fairchild670

    fairchild670

    Joined:
    Dec 3, 2012
    Posts:
    69
  4. Carst

    Carst

    Joined:
    Dec 21, 2013
    Posts:
    2
    I found out what the problem was. You CAN use custom trees, but they must be painted with the tree brush before wind will effect them, you must also use vertex painting to assign which part of the tree is going to be effected by the wind. Also, you must use a shader which is written to use the vertex data, like the Nature/Tree Soft Occlusion Leaves shader, which is necessary for the leaves to move.

    Hope that helps someone :)
     
    _protagonist likes this.
  5. malkiman

    malkiman

    Joined:
    Sep 28, 2017
    Posts:
    1
    Incredibly late to this conversation but if anybody is still out there, this is just the problem I'm working on atm (getting the leaves on my custom tree to move, and not just the whole tree/trunk). How am I supposed to paint the vertex in order to get the leaves to be affected by wind aswell? Thanks for pointing me in the right direction anyway :) I'll try some stuff and see if it works if nobody answers!
     
    mani3307 likes this.
  6. metekavruk

    metekavruk

    Joined:
    Sep 18, 2015
    Posts:
    2

    Hi, did you resolve the problem? I painted vertex but the result is the same...
     
  7. LoboMontana

    LoboMontana

    Joined:
    Dec 19, 2017
    Posts:
    5
    2018 and no results to this problem just yet.

    Okay so in the book of the dead, all to 90% of the assets were used from Megascans which all are their own LOD mesh and yet the Unity Team were able to use a wind system to create nature wind. Why can't that system simply be a part of Unity?

    I'm kinda bummed at the moment that my world will have no nature wind especially if most of my 3d models will come from Megascans. UNITY, HELP US!
     
    laffans likes this.
  8. Pharazone

    Pharazone

    Joined:
    Aug 6, 2018
    Posts:
    9
    Same problems……
     
    AhmadMcreator likes this.
  9. membantu

    membantu

    Joined:
    Oct 18, 2015
    Posts:
    3
    im bored of things like that... seems like ppl dont want us to know how to get things done like that...
     
    Ruslank100, AhmadMcreator and laffans like this.
  10. Ofng0

    Ofng0

    Joined:
    Apr 3, 2018
    Posts:
    2
    Same issue!!! Bump...
     
    AhmadMcreator likes this.
  11. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    279
    bump
     
    AhmadMcreator likes this.
  12. muzboz

    muzboz

    Joined:
    Aug 8, 2012
    Posts:
    110
    I too wish that it was easier (or at least properly explained somewhere in the documentation) how to work with custom trees in Unity.

    It seems more complex and mysterious than it should be!

    There should at least be a step-by-step tutorial somewhere of how to make a completely custom tree in Maya, for example, (that works with the wind).

    At least then, one could see how to do it, even if they need to convert some of the techniques to something else (Blender, etc).
     
    Ruslank100 and AhmadMcreator like this.
  13. kampiria

    kampiria

    Joined:
    Jul 5, 2013
    Posts:
    1
    Bump again because while the wind does work with my trees,
    the moment I put on a LOD group the wind stops working.

    So all my trees are currently the exact same angle and I really dont want to create multiple instances of the same object just to have angle variation so I'm searching the net for anything that can help.
     
  14. RodatGHG

    RodatGHG

    Joined:
    Jan 23, 2014
    Posts:
    9
    Bump - there are folk out here looking for answers to this
     
  15. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,260
    Essentially trees created externally are no different from other 3D models. For imported meshes, there's no telling which parts of the mesh represents branches and leaves, or which branch is connected to another and their rotation.

    The tree creator/speedtree shaders expect all this information baked into the mesh (this is spread across the vertex color and UV2/3 attributes). You can find an insightful breakdown here: https://connect.unity.com/p/deconstructing-unity-trees-for-wind-zone-dynamics

    This difficult to add in 3D modeling software since it would require some form of scripting, or a painstaking amount of painting. Not sure what the process was behind the assets in Book of the Dead, but I suspect the former.

    Tree Creator and SpeedTree are procedural modelers, so all this information is already available to them, making it straightforward to bake this data into the mesh. Additionally, this is also what the elusive "Tree" component is for, it stores a part of this data, and passes it to the shader. Without this, wind animation with individual moving branch isn't possible.

    The only solution is to use a procedural modeling tool like Tree Creator, SpeedTree, MTree or Broccoli. An alternative for hand-built model is to use the Custom Tree Importer asset.

    Hope that clarifies some things :)
     
  16. CGCowboy

    CGCowboy

    Joined:
    Mar 7, 2018
    Posts:
    17
    I have my trees moving in the wind in the editor but they are not effected by the wind after doing a build (Windows).

    I see the wind settings in the tree shader so I'm wondering if the shader settings aren't translating during Build.

    Anyone see this before?
     
  17. Rensoburro_Taki

    Rensoburro_Taki

    Joined:
    Sep 2, 2011
    Posts:
    274
    btw, have the same problem. Can see the win in action on the viewports, however, when making a build = nothing! Did you find out more meanwhile?
     
  18. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    197
    for me, wind zone on speed tree hdrp trees painted on terrain does nothing.
     
  19. apcpablozomb

    apcpablozomb

    Joined:
    Jul 28, 2021
    Posts:
    1
    I am using the trees from the Conifer asset, add a WindZone object and then add the wind script to that object de wind. Sorry for my bad english.
    upload_2021-7-28_18-38-58.png
     

    Attached Files:

    sxnblast2 and jumisko like this.
  20. Ssj-Umair

    Ssj-Umair

    Joined:
    Feb 27, 2021
    Posts:
    1
    Thanks For the Help It's Working Perfect........!
     
    jumisko likes this.
  21. silenttomb98

    silenttomb98

    Joined:
    Aug 23, 2020
    Posts:
    1
    so that worked but it only did it for the tree trunks for some reason, is there a way to do it with the leaves too?