How can I make a material that constantly changes colours?

Hi!

I am curious to know how to create a material that goes through different colours? The general set up I currently have is pictured below:

As you can see from the images, it is currently set to Purple but, I would like to know if there is a what to take the material that I currently have and be able to make it slowly change through the colour spectrum? (No/absolute basic Blueprints if possible please).

Thanks All!

Mitchel.

1 Like

In this article there is the one called Material Instance Dynamic, this allows you to set up lerps that are changed by a scalar parameter that you then change in blueprints the example included there is this

http://docs.unrealengine.com/portals/0/images/Engine/Rendering/Materials/MaterialInstances/ConstructionScriptForMID.png

And then here is how I usually set up the material

1 Like

You can take the time as Hue from HSV and convert it to RGB
There is HSV to RGB material node for it

You don’t need any blueprints to do this, if you send time (by that i mean any value that increases over time) to shaders you can animate pretty much anything in shader by adding time to any value saving CPU performance. UE4 sends time to material and oyu can access it via “Time” node, you don’t need to know what value it outputs, you know it rising over time. Then you can use nodes like Sin or Frac node, any node any calculation that outputs any pattern regardless of how big input value will start to repeat that pattern is to repeat it over time. And you can control speed of animation by multiplying or dividing time.

Color change through color spectrum, is called hue shift, if you hue shift a rainbow spectrum it will offset the colors, if you look on spectrum circle it will spin. UE4 provides node just for that called Hue Shift, plug any saturated color (or whatever you want to hue shift, it needs saturation as hue is not visible in either white and black color) as a texture and plug time as a huge shift percentage and you should be covered. Remember to shift only part that you want to shift or else entire material will become rainbowish

1 Like

Ahh okay I see, I’m not too great at Blueprint work but, I’ll be sure to try that out too :slight_smile:

I think I kinda get what you’re saying, I don’t suppose you could provide an example? I’m struggling to put together the pieces that you guys have suggested

I’m pretty new to UE, but here is what I pieced together from answers given by .


I plugged the result of the lerp into emissive color of the main material node (I think it’s called the root node, idk it’s brown :wink:

2 Likes