Hello! This is literally my first time posting on a forum for technical questions. I’ve usually been able to solve my issues with Google, asking other more experienced colleagues, and spite.
I am an artist with some limited Unreal experience. I’ve used it for projects before, but have not often needed to delve into blueprints or shader nodes. I’m doing foliage research for my current project, and frankly, the only tree animation I’ve found that I actually like the look of is this gif by artkovski for Illustrated Nature. But it’s a Unity asset, so I’m working on translating it to Unreal. I’m 99% sure I’m not the first person to want to do this (if this is an already solved problem available somewhere, I have not yet found it and would love a link!)

I have a ton of questions, but I’m taking it one problem at a time. Right now, I’m focused on working out the UV animation on the leaves. This has been difficult to research, as almost every tutorial I can find for foliage in Unreal uses vertex animation, not UV (at least that I’ve found). I’ll be combining the two eventually, but I want to solve UV first.
I have this shader map from an 80 Level post, which I’ve been using combined with the little I have found in tutorials.
(Sorry, this is the highest resolution there is).
This is my current progress. I’m using a time node as a substitute for the global noise at the moment (a later problem to solve). Obviously there are things to tweak (the UV tiling being one), but it functions as expected.
I have so many questions! But I’m going to start with these:
-
How is he getting that distortion in the leaf texture? I’m rotating around a pivot point which is a start, but whatever he’s doing looks so nice.
-
How are all the leaves of the tree animating at an offset from each other? Presumably driven by a global value of some kind? Is that what the global noise portion of the shader map will solve? And if so, does anyone have recommendations for a tutorial to use for that aspect? I’ve given it an attempt based on the reference, pictured below. Unreal doesn’t seem to have the same ability to create reference nodes, but plugging it directly in gives me an error on the panner node. (Also, I would not be even a little bit surprised if I’ve translated wrong and am using some incorrect nodes.)
I assume a Material Parameter Collection will be the solution for at least some of this. That is yet another aspect I need to learn.
Does anyone have any insight they can share? (Apologies for the long post, I’m hoping more information is better for questions like these!)
Alright, this is my best attempt at recreating the logic, though it might not be perfect because it’s really hard to see some areas of the picture.
To answer your questions:
-
That’s achieved through adding a noise to the UVs- it’s called a distortion shader. Ben Cloward has a great youtube video breaking it down if interested. The only difference is, it looks like he’s using a controlled version of the distortion method to drive a rotation instead of just the traditional add.
-
It looks like he’s achieving this through the use of vertex colors. Individual leaves are pretty impossible to control- since you can’t rely on pixel or vertex data to reliably move an entire leaf. So, to get around this, usually you paint every leaf a different vertex color. These 0-1 values act as the perfect movement offset. Based on the movement of his leaves, it looks like he has painted the leaves very intentionally- like based off of their distance from the center- to drive leaf movement that appears in waves instead of completely random. You can also get a similar effect by just using a large world-aligned noise texture. You may see some slight distortion within the leaves, but this will achieve the same wave effect without all of the additional setup.
1 Like
Thank you so much!
And yes, I totally understand about the reference resolution. I was having trouble with it, too!
I will definitely look at that distortion shader - that looks like exactly what I need! Interesting that it doesn’t seem to be in the shader map, though. I would expect that to be related to the “wiggle” that he has in the UV animation portion. The distortion plus a subtle rotation around a corner pivot makes sense.
I do think he’s using a world noise type texture - the 80 Level article only mentions using vector colors for the branches/sway (I should have linked this in my first post: Stylized Nature: Vegetation, Animation, Shaders).
I replicated what you have here for the shader nodes - and I don’t get any errors, which is a great sign! But I’m also no longer getting any movement at all. The world noise section should now be driving it instead of the time node, so perhaps there’s something still off in there, or that I’m supposed to add to the level to make it work? I made sure to turn everything on in my material instance. Or should the time node still be there somewhere? (“playing” the level also didn’t make it go).
Interesting that the simplex noise doesn’t work down in the global noise portion - I just put a noise texture in for now.
I’m further than I was! Any progress I can get makes me happy!
EDIT: Following your distortion suggestion, I was able to find this post which helped me to get this result:

Getting there! I think if I did a vertex color to have the effect be stronger on one side than the other, and then perhaps add in the rotation, I might have that part solved! Then I just have to work out the global noise/wind part to drive the speed variation, and the branch sway… well, I guess I still have a ways to go, but nearly there with the part I was most stumped on at least!
You can animate via shaders into any loop you like using tools like pivot painter.
Google it, have a look.
Content samples should have a melting candle as an example.
I will take a look!
I’m using Maya, so I’ll have to see what equivalent tools there are, but it’s definitely giving me some alternative avenues to explore. Thank you!
Could have sworn it was originally made for Maya/autodesk.
But apparently its Max - regadless, you can easily find ports of it to just about anything.
Its a great concept to do some otherwise near impossible things.
Not that math is a bad thing, but if it needs complex and taylored movement it needs that exra level of art direction…
Ah, thanks for linking the 80 Level article, that helps a lot!
So, to break down what’s happening here:
He is using a world-aligned noise as an input to the time for a rotator node. Technically, he is using the world-aligned noise as an input into the UVs of another noise texture, and that is driving the time for the rotator node. Basically, this achieves the look of the rotation being sporadic but like a wave, since the noise texture passes through the leaves on the tree.
This should roughly be a simplified version of the leaf rotation effect:
The simplex noise won’t work for the world-aligned noise. That noise is procedurally calculated in UV space, but you specifically need a texture since it’s being moved to world-space.
The way that he is using the vertex color is different than I originally thought. He is painting a vertical gradient into the Alpha to give the top of the tree more movement than the bottom, and is painting all of the leaves and branch tips green to give them some extra wind contribution.
Aha! Amazing!
This gets me 90% of the way there! I just need to work on getting the look exactly the way I want, but that’s just fiddly bits. Thank you so much! You’re a treasure!
Here’s my results so far:

I think next is mostly just trying out different noise textures, and that distortion tutorial you linked also talked about how to make it less obvious that the texture is repeating, so I will try that out, too. And of course getting the branch sway in there, but one step at a time!
I will go ahead and mark your answer as the solution as it answers all the questions I had. Thank you for taking the time to explain everything, too. That really helps a lot!