Adding subtle wind animation effects in Unreal Engine

- by

I’ve always been marvelling at all the little moving background items in video games. Most trees, grass, plants and such foliage appears to move subtly. How do they do that? Perhaps it’s a wind node? Surely that’ll eat up huge amounts of resources.

I just found a computationally cheaper trick to do this, namely by adding this effect to the plant’s material, thanks to a video by MetalGameStudios. It suggests that we can do this in two ways, both of which are described below. In either case, open the material of your object to proceed.

Sine and Panner Nodes

For the first option, add a Sine and Panner node to the setup, then connect both of them in sequence to the World Position Offset on our material.

On the Panner Node, we can set a value for X and Y speeds (left hand side, in the Details Panel). Anything between 0 and 1 works well, anything above 1 will look a tad crazy.

Simple Grass Wind Node

The other option presents us with a very similar, yet subtly different effect. We’ll add a Simple Grass Wind node to our material, whose output we’ll hook up to the World Offset Position input just like before. It’ll throw a warning when you drag the node in. That’s perfectly fine, UE4 is just saying that said node needs input values.

Let’s take care of this by dragging in three Constant nodes. Hook those up to the Wind Intensity, Wind Weight and Additional WPO respectively. Changes their values to anything between 0 and 1, with 0.5 being a good starting point. I can’t see the Additional WPO making a difference when left at 0.

While I did have great fun making the leaves on my Synty Farm move around, I couldn’t work out how to animate the vegetables. They appear to be part of the same mesh, yet the material appears to be setup elsewhere. That puzzle remains a mystery until a later date.



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

Leave a Comment