For instance we have a grass patch placed all over an area, and we’d want to apply some sort of color/luminance variation on them. Not per grass or patch but for example the way we make variation into landscape surface using a macro texture. We can change intensity, scale etc. of the applied variation easily.
If this is what you mean it applies the variation to a single (bush in my case) and the same bush with the same look is everywhere. Not quite what I meant up there.
Absolute world position -> Mask (R G) ->Subtract by landscape position(x,y) ->Divide by landscape size multiplied by scale -> hook into UV slot on your color map and then just multiply/overlay/lerp it into your foliage texture.
The images I posted of my vegetation are result of doing some small change to the graph Sitrec posted.
First of all what that graph is doing is it takes the color information from landscape and blends it to the foliage that’s painted on it but I did some slight changes to fit it for my need.
For the node that says Landscape Location (X,Y) I wrote the size of my landscape 4033 for X and 4033 for Y.
And for the node that says Landscape Size * Scale it’s just the amount of tiling of that base color you see it’s connected to.
Here’s my graph I hope it helps you and if it still doesn’t work for you we would be happy to troubleshoot it for you if you post a screenshot.
Sitrec is a nice vegetation guy he’d probably get to answer you since I’m leaving now.
I have been testing out UE4 for a couple of weeks now and been sneaking around on the forum.
At the moment I am trying to get color variation in my grass that I have painted with the foliage tool.
I have bought a pack of grass and have painted some patches of grass for a test. But I really dont undestand all of these nodes in this material and not sure how I make all of them.
Could anyone be so nice to explain whats going on in that node tree?
And some quick questions for a couple of the nodes -
The node that contains the landscape coordinates. What does this do and how do I make it?
Does it automatically find where the grass is painted? I could find much info about this.
Texture UV sample that is gray.
Should it only be a gray bitmap in this? Or am I missing something here.
These might be some really stupid questions, but all of this is kinda new to me.
The texture sample that is grey looks that way because it is scaled up enormously and you are only seeing a very small part of it in the sample window. It’s probably something like a PS cloud filter.
The absolute world position node samples the XYZ world space of a pixel. The mask (R,G) is discarding the Z information from that result leaving only an X and Y world coordinate that is used to modify the UV coords of a texture sample. This has the effect of creating a planar projection that can be applied to horizontal (and semi horizontal) surfaces and the texture will seamlessly tile regardless of object uvs and Z rotation.
Dividing is what determines the extents of your macro texture. In this example the value 5,000 means that every 5000 world units the texture will repeat itself in X and Y (UV)
The blend overlay node is used to add contrast and variation to the 2d texture sample of the grass. For an explanation of what happens with overlay mode see this link:
The subsurface connection is simply to help with the backlighting of the mesh.