Question about toon shading in EEVEE

Hello,
I’ve been looking for resources over the internet and weirdly I couldn’t find an answer for my simple problem.
Basically, I have a textured character for which I want to control the lit color and the darkened color (light and shadow). There are only 2 colors, and I have no idea how to achieve something as simple as that, anyone has an idea?
I’m stuck at detecting the light source and detecting which area should use the lit color and which should use the darkened color.
Thanks!

White diffuse BSDF->shader to RGB->color ramp->output will give two colors.

If you have a texture, you want more than two colors, so try …color ramp->mixRGB/multiply->output, to multiply your lightmap provided by the diffuse BSDF and modulated by the color ramp with your texture.

1 Like

Hello bandages, thanks for the reply.
As explained, I have 2 textures: one is the lit colors, the other is the shadow colors.
Your explanation doesn’t cover this specifcs, or you’re assuming I know more than I actually do :slight_smile:

After some tweaks I managed to make it work, thanks!
But the viewport textures are slightly brighter than the image textures (I’ve check with photoshop).
Is there a way to obtain the exact same values as the texture?

Depending on your nodes and possibly lighting, you shouldn’t expect the same brightness as your texture.

But if you plug your texture input directly into your output, you should expect the same brightness, and if you don’t get it, you may have color settings for your image texture node set incorrectly. Look for a color space dropdown on the image texture node and try out sRGB and try out non-color (or linear, there are actually a bunch that are all the same thing, kinda silly) and see if either improves what you’re seeing.

1 Like

I’ve found the problem, you were close: in color management (render properties tab), “view transform” was set as “filmic”. I changed it to standard and it was more accurate.

Yup, that makes sense too.