Change Hue from a texture a few times in an animation

I want to change Hue from a texture a few times in an animation. Is this possible? I would like to do that , let’s say, each 50 frames: From frame 0 to 50 the hue=1.1, from frame 51 to 100 the hue =1.2 , etc

If possible, How could I do that?

1 Like

Yep- just take your (Image?) Texture, plug it into a Separate HSV node, and then plug each output into the respective input of a Combine HSV node.

Then, you’re going to need some nodes between the two hue sockets. It sounds like you want a stepped function, off the top of my head you’ll want a Math node set to Add. Hue goes in slot 1. In slot 2, you want a driver- something like this:


Should work…

EDIT: I charted it in Wolfram Alpha and yeah, that’s exactly what you need:


Here’s the simplest way you can do that:

Typing “#frame” into a field is a shortcut to driving it from the frame count.

The map range node has built in stepped interpolation. Here, I’m saying to map frames 0-500 to 0-1, in steps of 0.1 (1/10 steps). I’m then plugging that into my hue/sat node, to modify the hue of my object while retaining its value and saturation. Note that the base hue of my object is mapped to a hue value of 0.5, which occurs at frame 250.

This isn’t exactly like yours, because I’m not mapping hue to 1.1 (which is 0.1) at frame 0, but at frame 50 instead, and my transitions occur at multiples of 50-- my hue changes between frames 49 and 50, not between frames 50 and 51. (But we could just subtract 1 from the frame value node, with a math node, if we wanted that.)

If we want to bias the hue, we have to be careful, because while hue is a cyclic quality that wraps around, Blender doesn’t know that, and if we send a hue of 1.1 or 1.2 or 100, those will all be clamped to a hue of 1.0, the highest change Blender understands. If we need to send arbitrary values, we could modulo math. If we want to start at hue 0.5 (which is base hue), the simplest thing to do is just to adjust the hue twice to compensate:

Since my original hue was setting the hue to 0.0-- the default, minus 0.5-- I’m compensating by setting the hue to 1.0-- the default, plus 0.5-- immediately before.


Great point about the modulo, I definitely should have mentioned that in my answer :slight_smile: I keep forgetting to use the Map Range node, I learned Blender and got my nodes figured out before we had a Map Range node, and I always just default to math nodes instead

Yeah, it took me quite a while to stop using my own homebrewed version as well :slight_smile:

A bit late but thank you so much