Complex Gradient Materials?

Is it possible to create a complex gradient within the material editor? I have been searching but so far all I have found was a simple two color-gradient using a linear gradient, two 3Vectors, along with sqrt, lerp, and power.

What I am looking for is something like this which I created in Photoshop. I don’t want to make a texture as I want the material to be able to be used for any size of button.


So, here is what I am trying to do. I want to create a context menu which will have options depending on where the right click happens and what actor happens to be under it. Based on this I will populate the menu items dynamically. I want a texture for the button images which won’t get stretched to all hell and back and if sized down, won’t look crushed. I figured the best way to deal with it would be a material but I cannot figure out how to achieve what I have added above in the material editor.

Is this possible or is this one of the limitations of the material editor?

I just tried using the image on the button directly and I was surprised to find that it works pretty well, no crushing or anything. I would still like to know if this type of gradient is possible somehow in the material editor. I have tried combining several 3vectors, sqrts, and lerps but the additional sequences of nodes just alter the color of the originating set of nodes and do not add the color to the gradient.

There’s a function called “Lerp Multi Float 3”

Benjamin Hale put it to good use here:

If you want more control…

Hello, thanks for the replies! I will take a look at both methods, they both look interesting and I will spend some time messing around with them to see which works best for my use case.

Thank you for sharing.

here’s another way. probably a bit cheaper than lerps. makes a good laser material too.