A procedural wind material for vegetation in UE4.
A procedural wind material for vegetation in UE4.
The material is designed for various vegetation types like trees (trunk and foliage), branches and bushes.
Features:
There are two material functions that compute the wind displacement:
The material functions are easy to use and only require the per-branch data:
Thus, the vegetation assets will require the branch data such as:
The foliage data can be stored in the textures (left is the edge attenuation, right is the branch attenuation):
NOTE. The trunk will have a branch weight of 0 and not use these.
Or in the vertex colors (red channel is the branch weight, green channel is the branch phase):
NOTE. In the above case the branch weight is inverted, i.e. 1.0 weight for trunk.
The global wind settings can be controled in the WindSettings material collection.
Global wind settings:
Material settings:
Based on:
Bug reports and pull requests are welcome on GitHub at https://github.com/tuxalin/vegetation-shader.
The code is available as open source under the terms of the MIT License.