5
$\begingroup$

I have successfully created a highly customizable Cel/Toon shader for Blender Eevee. The shader has lots of features, including but not limited to: Multiple light sources support, tone shape manipulation, various specular options, rimlightning or hatching.

eevee cel shader | multiple lights | tone shape change | color textures | normal maps | B&W masks | specular | rimlight | hatching

One of the most important features (which I did not realize up until now) is that the shader reacts on shadows. One monkey head casts shadow on the other.

eevee shader has shadows

I would like to recreate this shader in Cycles with all of it's features. However I hit a brick wall right at the start. Using the Toon BSDF within Cycles is a simple enough solution, but I could not figure out how to include features like hatching in the shadows or tone shape change.

Cycles Toon BSDF

I believe creating a custom cel shader is the only option to get the similar effects. So I made the basic dot product between an incoming light vector and surface normal. Unfortunately, this shader no longer respects the shadows generated by other objects (no shadows on the lower monkey head). Also, the shader does not really respects the incoming light, but rather only the position of the light object. The light source could be replaced by an empty object which produces the same result.

dot product cycles cel shader render

dot product cycles cel shader nodes

I have scouted lots of websites and tested lots of alternatives to this node setup, but I could not get the shadows to show up. The only solution that worked for me is this old thread, with a link to OSL shader. While the shader does generate shadows, I don't know OSL, therefore I can't really customize the code.

Is there really a way to make a true toon shader material in Cycles?

So I guess my questions for today are:

  1. How to make a Cycles Cel/Toon shader, that generates shadows on other objects, without using Toon BSDF?
  2. How to make the Cycles Cel/Toon shader respect the incoming light? (it's direction, color and strenght)
  3. Are there any other difficulties in making the customizable Cel/Toon shader that I might run into?
$\endgroup$
6
  • 3
    $\begingroup$ I'm genuinely curious, this question is not intended to imply criticism, but why do you want to wrangle a fully-featured, high-computation, physically-based renderer into doing this? The Shader to RGB node seems the obvious route to NPR in Blender (Besides BEER). $\endgroup$ May 2 at 19:03
  • 3
    $\begingroup$ @RobinBetts It's fair. 1. Pure curiosity 2. Eevee shadows are just annoying to deal with (jagged lines and shadow artifacts) and I spend way too much time fiddling with lamp/render settings. 3. Cycles does some things just better (cartoony water) 4. I have a bad GPU and I'm running into performance issues with Eevee on large scenes. Cycles is more optimized and I'm willing to wait if it means I don't crash. $\endgroup$ May 2 at 19:48
  • 1
    $\begingroup$ Um, ahem! (spits out water), did you just say “I have a bad GPU, so I WANT to use Cycles instead of EEVEE?” $\endgroup$
    – TheLabCat
    May 2 at 23:14
  • $\begingroup$ Also, just to be sure, you have tried using the original node set up straight in cycles, right? $\endgroup$
    – TheLabCat
    May 2 at 23:15
  • 2
    $\begingroup$ In Eevee, the output of a shader is almost automatic, and it's possible to use ShaderToRGB. In Cycles, this is not the case, and the result of a shader is progressive, and only after multiple samples the color will be found. It's then difficult to use a ShaderToRGB in Cycles (and OSL won't help much either, thought you could try to use the PhongRamp Closure). The solution is to do this in the compositor, after the final color has been found. $\endgroup$
    – Secrop
    May 6 at 11:33
-1
$\begingroup$

bence bu görselleri elde etmek için eevee veya cycles yerine compositing kullanılabilir. bu şekilde render modun eevee veya cycles farketmek sızın istediğin gibi ve gölgeli bir şekilde oluşturabilirsin.


I think eevee or loop instead of compositing can be used to achieve this instead. This way you can create the way you want and in a shaded way, regardless of whether your render mode is eevee or the cycles.

translate by: translate.google.com

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.