Use image as a color ramp

Hey, I’ve been trying to apply a toon shader to this model, the only problem being that this setup is only compatible with flat colors

(ignore the fact that she is pink, its temporary)

The thing is that i have my very own texture that I wanna use

And since this toon shader relies on a color ramp, is there a way to input the image as one of the colors? If no, then is there another way to recreate that shading effect but keep the texture?

thanks!

you can use black and white color in the colorramp as the factor for the mix color node, where you can mix two different colors or textures

where can i add it to my project?

Or use a Math Node set to “Greater Than” as the factor of the Mix Color Node.

here is a simple way to do it. hope it helps. (responded to wrong message ups)

You can do that too, but then you have no soft gradient between the different colors since the greater than node only outputs 0 or 1. But if you dont need a soft gradient, this(“greater than”) is also a way to do it.

You can append the node group from the file.

I made a slightly different version that you can chain to get more stops if you want here it is

color_ramp_with_Inputs.blend (214.4 KB)

I have this file in my assets folder and the node group marked as asset.

One restriction is to keep the stops in order (lowest to highest) if not it does not work like the normal colour ramp.

PS
With these node groups you can animate the textures, the position inputs etc.
Also you can use gradients or textures for the position inputs. They are fun to play with.

Color ramp with inputs is pretty cool and amazing, but I think this is an XY problem to begin with. Or at least I would have no idea how to combine the images shown into something that would use cell shading and those textures. Might the idea be to simply use a texture, but then cell shade it?

Something like this?

I can see use-cases for npr

For example different textures (could be images) for shadow intensity.

Or similar to Selim Kesici’s example (adding more stops.

But yea maybe the NPR guys have different methods to get the same results.