Apply noise to control 'patchiness' to foliage

The foliage on my map can look a bit flat, due to the static materials being used.

I’d like to apply a noise texture to control the color desaturation based on object position. So that the grass would change it’s color base on it’s world position.

I’m not sure quite how one would achieve this in the material, although it clearly seems possible.

Here’s the basic nodes i’m trying to play around with, but am not having much luck:

I was hoping a more experience material dev could help give me some tips on how to achieve this.

Thanks in advance.

You’re pretty close. You just need to tile the noise. Try playing around with a setup like this:

c02e9ce6a171cafb31a0d9d1ed75f854371d5bee.jpeg

1d4968ce95024a1a04d24d53fa3924aef713719d.jpeg

Thanks so much for the tip @Nathaniel3W.

I’ll have a play using the example you posted.

Cheers

I have tried playing around with this, however i’m finding it very unpredictable and doesn’t seem to match up with the noise pattern.

To explain what I mean, here is an example noise texture I’m using (obviously just for demo purposes):

Here is my material:

Now I would expect the foliage to show a perfectly uniform grid of green circles surrounded by red. However the outcome is this:

I’m pretty confused by why this isn’t working. Any ideas or tips are welcome :slight_smile:

Sorry, I gotta get going, so I’ll explain this later…

898d1f2e5b136923a7b294428e02201a6770a096.jpeg
68d95c2828e193dec92e370d33ead568ff74c9b4.jpeg

Ugh. Hold on. I just wrote a really long response and I think it was all wrong. And the above material is totally unnecessarily complicated.

So first off, are you sure you changed the texture in the material you used?

Second, here’s what I just made…


4e530708619797d00ed0833858167cc498e4ccb8.jpeg

And I just tested this out…

And the result was really subtle, but if you looked closely you could see it. My example looked awful though because I didn’t have on normals or transmission color or specularity or anything. I think if you use that basic setup with a good tiling cloud texture, you should be able to get the look you want.

Thanks for the reply. I believe it’s the foliage clustering that’s causing the distortion of the grid of circles for me. As I change the clustering settings, it completely changes the pattern.

This is pretty disheartening as my foliage clustering settings have been fine-tuned for performance on my map.

I think that what happens it that all foliage in a single cluster use a single draw call, so they will all technically have the same coordinate.

May i ask what your foliage clustering settings you are using for the example you show above?

100 instances per cluster and 10,000 cluster radius. I’ve got 170,000 instances and 1700 clusters in the level.

the cluster size doesn’t have any impact in the world position, and yes they are still in the same drawcall but they will not have the same coordinate because this is the absolute world position you’re using

please post your updated material, as your old one will clearly not work (you need to scale the world position by a factor, like Nathaniel showed)