1
$\begingroup$

I am trying to do my first OSL shader script. No matter what I do, even when using all the examples, when I add a node for my shader none of the parameters show up as node inputs/outputs as I have read they should.

What am I doing wrong, why don't they show up? (Blender 2.8)

shader noise(
    float Time = 1.0,
    point Point = P,
    output float Cell = 0.0,
    output color Perlin = 0.8,
    output color UPerlin = 0.8,
    output color Simplex = 0.8,
    output color USimplex = 0.8)
{

enter image description here

$\endgroup$
2
$\begingroup$

Blender has a few oddities, including:

  1. Script need to be reloaded/refreshed when changed/loading via the little double-arrow button in the node block next to the filename. Use that when/if loading/changing.
  2. If there are ANY errors or oddities in your script (at least in Blender 2.8) - this will result in your node not changing to reflect the current script it's pointing at. i.e. It won't give you an error, but when changing the node block from one script to another - it simply wont change. (Button above can help your diagnose errors)
  3. FYI - If not shades to not actually work - make sure you are not using GPU rendering. OSL works with CPU rendering, only. In addition - make sure "open shading language" is checked below the CPU option (in the Scene property under "Render Engine").

enter image description here

| improve this answer | |
$\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.