Setup #
The Etherion Designs wind system works by animating a world-space wind texture across the entire level.
This world-space texture map is a greyscale image, which is animated inside of a foliage’s material.
The speed, direction & intensity of the wind map is determined by a blueprint placed in the level.
The downside of this method is that the scaling of wind is not automatic – and so the wind map must be manually selected in the material instance based on the plant meshes size. However, it is worth the sacrifice due to the performance benefits.
The wind controller blueprint is called BP_Etherion_WindController.
It is located at Content / FoliagePhysics / Blueprints / Environment /
Ensure that one of these blueprints is in your level if you with to apply wind to your foliage.
Then, adjust the settings in the details panel to control the behavior of the wind.
Next, you’ll need to ensure that each custom mesh has a UV map aligned vertically – so that a vertical gradient texture works correctly with it. This is required for wind masking, to avoid the roots of a plant from moving around with the wind.
Our meshes at Etherion Designs utilize UV Channel 2 and UV Channel 3 for our gradient maps.
(note: these channel names are as listed in unreal engine. They are technically the 3rd and 4th uv channels)
Material Setup #
Setting up wind inside your foliage material is very easy.
Add MF_Etherion_GrassWind to your material.
It is located in Content / FoliagePhysics / Materials / MaterialFunctions
In your material, you must ensure that your vertical gradient is applied at the TreeWind_Mask input node.
If you do not create nodes for this, it will automatically apply a vertical gradient to UV Channel 0. This is not ideal for most meshes.
Here are the details of MF_Etherion_GrassWind
- Wind_Bendiness controls the intensity of the wind.
If you leave this blank, it will create a variable in any material instance parented from this material, called Wind_Bendiness.
You can edit this value in the material instance. - TreeWind_Mask – The mask applied to the wind
- Bend as a Whole? or Per-Vertex – By default, this is set to true, as you’ll want your plants bending as a whole.
If you place a FALSE boolean here, it will move each vertex independently of each other, which may cause stretching.
It is useful in some cases, but only if you want stylized effects. - Speed Multiplier Override simply replaces the speed value set by BP_Etherion_WindController. Leave it blank if you dont wish to override it.
- Scale Multiplier Override simply replaces the scale value set by BP_Etherion_WindController. Leave it blank if you dont wish to override it.
Once you have applied the wind fuction to your Material, please modify the values of any material instance you create from it.
IMPORTANT!!!!
You’ll notice the WindMap texture variable is editable in the Material instance.
Each foliage material should be assigned a specific wind map, according to the intended size of the mesh in the world.
Select from one of these maps provided.
They are located in:
Content \ FoliagePhysics \ Textures \ General