How to create a material that mixes two colors like a gradient

How to do this guys? Like gradient:

What i have:

What i Want:

Could you not use a multiply node in some capacity here with a grayscale texture… maybe?? (I’m new to UE.)

LERP between the colors. The alpha is whatever math you use to make the gradient.

You will still have to come up with a black/white mask to tell the shader where to apply one color or the other, that doesn’t just come out by itself.

You can use this to create an object mask, just be sure to pick a channel in the component-mask for whatever axis you want to use. This is only an example you can use whatever logic/maths you want to ultimately drive that alpha/mask. As well, this technique of using a mask to mix/LERP things is pretty much ‘the trick’ to making advanced materials work:

3 Likes