Hi guys, i'm wondering if anyone has experienced any problems working with unity and importing their own vegetation models.
Specifically i'm talking about getting damn trees working with the wind zones.
Using various guides on the net, showing that one needs to import the models combined but having the trunk and leaves on separate materials (2) has turned up not working at all. Using the defined nature shaders on the model inside unity just doesnt work, for example - placing the trees by hand (cumbersome) results in a totally static tree i.e not working at all!
2nd way is to use the terrain editor to place the trees, they work - only the whole tree is affected by the wind zones then, but this also means the leaves are not affected at all
.
3rd way is to resort to the built-in tree creator, foregoing custom trunks and complete control (the editor is both incredibly counter-productive and confusing/imprecise). But the trees created here, both work with wind zones when placed manually AND using the terrain editor...
So my question is, has anyone come across a way in which "custom" models work with both trunk, leaves AND wind zones?
Replies
...but my understanding of how that stuff works is that the the wind zone is just a game object that creates some kind of an offset wave property, and the Unity vegetation just uses shaders that read this property and do vertex animation for the leaves.
What this means is that (1) you have to be using the Unity nature materials (or a custom shader that's been written to work in the same kind of way), and (2) you need to prepare your meshes for that, based on what the shaders do for their vertex animations. As far as I know, the leaf shaders are written to animate according to vertex position in the UVs. (i.e. the "base" of the leaf or shrub is at v=0, and gets no animation; the "tip" is at v=1 and gets full animation.)
That's just what I understood when I was checking them out before, but again, I could be wrong.
I downloaded the build in shaders from their site and used the HIDDEN NATURE SHADER for leafs and I got the wave .
But again hope t see a material editor like UDK and then using the Wind effect would be easy as we make our custom shader
also you need to put your models in a folder called : Ambient-Occlusion so shading will look fine
https://www.assetstore.unity3d.com/en/#!/content/21079
Alternatively you can also have a look at the Advanced Foliage Shaders.
However those are mainly built for grass and smaller plants such as fern or bushes, but come with some nice tree shaders too.
https://www.assetstore.unity3d.com/en/#!/content/3253