A Color Ramp with inputs for Cycles

Perhaps you wanted to animate a color ramp, or wanted to vary a color ramp used for hair color based on texture, or whatever. You would need a color ramp node with color inputs. I don’t know if someone’s already done this, but I couldn’t find one. So I made one.

This one has four stops. It behaves like the default Cycles color ramp set to Linear. There is no support for alpha. If people find this useful I might make some with more stops and perhaps alpha support.

Happy ramping!

Attachments


color_ramps.blend (560 KB)

2 Likes

Looks nice.

Can you think of anyway to make the gradient in a radial pattern?

This would require hardcoding into Blender itself, but this gives me the opportunity to state that it would be cool if the color-ramp node has sockets on the bottom that are attached to the sliders themselves, then Cycles would have the functionality of being able to texture the position of every color stop and bring with it some interesting texturing possibilities.

Until then, this might very well do.

Sure. Just hook up the right mapping node…

Attachments


I hadn’t even considered using texture nodes as inputs to the color stops. Guess what - it already works!


Now I really am going to have to add alpha support to make this as useful as it could be…

@Daniel: Not really what I meant. A radial pattern looks like this.

Attachments


Ah, the mapping is what centers it, thanks!

this is fantastic
do you mind if i use this for my custom toon shader project that i wanna release for the public? probably very cheap on gumroad and free on github

Hi Daniel, (if you are still around!), just to say I love this node group, I found it years ago and have used it in many experiments. I never got around to say thank you, so better late that never - thank you for sharing.

Just to add, for anyone that comes across this thread, that this node group adds possibilities that have not been mentioned. For example you can use textures as inputs for the position value.

Go right ahead!

Wow! Glad people find it useful after all these years.

The thread has 4.5K views so I am sure a lot of people found it useful :slight_smile: