2

I know I asked something like this before, but this is more centered on the glossiness. How can I add glossiness on a material that has a toon|diffuse shader on it? Do I have to combine the toon|diffuse and the toon|glossy shaders? But how? The add shader doesn't seem to do a good job, because it masses up the colors brightness or something on the colors. Basically, how to combine the toon|diffuse and toon|glossy shader effectively?

Vladimir
  • 4,695
  • 14
  • 48
  • 68

1 Answers1

2

A BSDF shader requires three parameters: normal, size and smooth.

If the mix-shader doesn't produce the results you want you can still write your own shader using OSL.

shader Toon(
float diffuse_Fac = .5,
float glossy_Fac = .5,
color diffuse_color = .8,
color glossy_color = .8,
float diffuse_size = .5, 
float glossy_size = .5, 
float diffuse_smooth = 0, 
float glossy_smooth = 0, 
normal diffuse_normal = N,
normal glossy_normal = N,
output closure color BSDF = background()
)

{
BSDF = diffuse_Fac * diffuse_color * diffuse_toon(diffuse_normal, diffuse_size, diffuse_smooth)
     + glossy_Fac * glossy_color * glossy_toon(glossy_normal, glossy_size, glossy_smooth);
}

This one was adapted from this BA Thread where you also find pointers on this topic.

You only need to enable OSL in the render settings (this implies that it can't any longer be process by the GPU) and add a Script Node as shown in the image.

enter image description here

You could also try specular_toon() I wonder why this is not accessible from the Add Menu.

stacker
  • 38,549
  • 31
  • 141
  • 243