I want to make a rainbow gradient, where the hue changes, and the saturation and value stay the same.
I’m coming from vvvv, where I can easily set up something like the image below:
My first instinct in TouchDesigner would be to enter an array as the HSV Adjust TOP’s “Hue Offset” parameter. Is this possible somehow? My solution didn’t work:
I was able to get further with a Texture3D TOP + a Pattern CHOP, which I could probably use somehow, but it’s not as elegant as vvvv’s spreads.
The RGB solution below is more like what I have in mind, but I would prefer working with HSV/HSB/HSL. I could probably find a Python function and implement it in TD, but I’d rather do something like this:
you will want to use a RampTOP with chosen colors.
if you need to modify colors you can alter the ramp_keys DAT docked to it (purple arrow on the bottom right of the RampTOP) which stored the values.
You can change from RGB to HSV by clicking the little colored square on the left of the ramp, but for modifying the colors from the ramp_keys DAT you’ll have to deal with RGB or a custom solution
I’m unsure about the Ramp TOP for my needs. It would be great if I could provide an array of numbers to its Hue parameter, or manipulate the position points.
In the first post’s vvvv screenshot, I can go from a full rainbow to a subtle red to yellow gradient, just by changing the input and width parameters. I can also get a low-res gradient by changing the spread count parameter.
i see.
you can of course start from a table of values but again dealing with RGB…
Though you could start with a HSV table and add a HSVtoRGB TOP after the ChopTo