Announcement

Collapse
No announcement yet.

Complex Gradient Materials?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    Click image for larger version

Name:	button_grad_test.png
Views:	15
Size:	3.8 KB
ID:	1602403

    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?

    #2
    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.

    Comment


      #3
      There's a function called "Lerp Multi Float 3"

      Benjamin Hale put it to good use here: https://twitter.com/BenjaminHale7/st...69643032842240

      Comment


        #4
        If you want more control...
        Click image for larger version  Name:	M_DoubleGradient.PNG Views:	2 Size:	255.1 KB ID:	1602758

        Comment


          #5
          Originally posted by wickerman123 View Post
          There's a function called "Lerp Multi Float 3"

          Benjamin Hale put it to good use here: https://twitter.com/BenjaminHale7/st...69643032842240
          Originally posted by Mars007 View Post
          If you want more control...
          Click image for larger version Name:	M_DoubleGradient.PNG Views:	2 Size:	255.1 KB ID:	1602758
          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.

          Comment


            #6
            here's another way. probably a bit cheaper than lerps. makes a good laser material too.
            YT Channel: https://www.youtube.com/channel/UCoc...KYPSK6g7vZ5CNg

            Comment

            Working...
            X