Choose between two or more colors in Materials

Hello :smiley:

I am making cartoon-Grass.
I already know how to make color variation for a material.

I am using Blender cycles and there is a function named: Mix Shader.

With this node you set a value to choose between (in this case) two different colored materials.

In UE4 I would like to have two colors (which I can change later in real time an an material instance).

And for example the Objekt position choose how much from which color the mesh get.

Here is a Picture which shows everything:

Is something like this possible in UE4?
Thanks, Seby :slight_smile:

Hello S3B3ST, you could use a LERP node for that.
it has two inputs, and an alpha control to mix between them.

( WTF Is? Lerp Nodes in Unreal Engine 4 - YouTube )

Also, take a look at the speedtree material node, it can also affect color variation.

Okay, thanks :smiley:
I addet one color to b and one to a.
In UE4 there is a bug, you cant use the object postion to set a value for those two colors.
BUT with “PerInstanceRandom” you can get the rondomness for your Material :smiley: