8
$\begingroup$

I don't understand what is wrong with this shader

shader simple_material(
    color Diffuse_Color = color(0.6, 0.8, 0.6),
    float Noise_Factor = 0.1,
    normal Normal = N,
    output closure color BSDF = diffuse_toon(normalize(Normal),1.1,0.0)
    )
{
   color material_color = Diffuse_Color * mix(1.0, noise(P * 10.0), Noise_Factor);
   BSDF = material_color * diffuse_toon(normalize(Normal),1.1,0.0);
}

enter image description here

What I'm doing wrong and why the output is black ?

I checked and re-checked everything but still I don't think there is something obviously wrong with this .

$\endgroup$
7
$\begingroup$

It seems that you missed one of the following settings:

enter image description here

  • Diffuse color of you OSL input node
  • Tick Open Shading Language in the render settings
  • Set Render device to CPU (GPU can't handle script nodes)
$\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.