I need a really specific OSL Texture for the Procedural Planet I am making in Octane, but I didn´t find good resources to learn OSL on my own.
Do you have a tips where and how to start learning OSL because it seems there are not a lot of comprehensive and easy to understand videos or articles out there. Or maybe its just cause I am not good at coding. Anyways I would love to have good introduction to OSL somewhere.
Or maybe someone is so Corona-Quarantine-bored he/she wants to quickly type it out for me?
Is the book “Open Shading Language for Blender” still available? The sample chapter seems not to be around any more, so I fear that if I buy the book I will just get another dead link.
I have been fighting with OSL in Blender the past weeks and get absolutely nowhere. Cycles, CPU render, OSL active, enter simple compiling OSL code, gets black surface out whatever I do. Will the book help me? Do I really need an entire book to get a super simple shader to work?
The link to the sample chapter works for me. The book itself is on blendermarket, which has been one of the main sources for blender addons and resources for many years, I don’t think you have to worry about a dead link there.
You don’t need a book, there are many resources on the internet, but it is a good general introduction if the expense is small for you.
I just downloaded firstshader.osl from the github repository for the book’s sample code and it compiles for me.
If you post a script that isn’t working for you perhaps we can help.
Again, just black. If I build the shader sequence without any OSL, then it works fine.
Here I got another worry: It originally had a default output of 0.6 0.8 0.6, which was confirmed in the shading view. However, when I edited it to 0.4 0.8 0.4, and hit the double arrow update button, the values did not change!
“Render properties” are set to Cycles/Supported/CPU and with OSL checked. The shaders compile successfully.
Follow-up question: Did I miss something in the setup? The ones I mentioned are the ones I have found while searching, use Cycles, use CPU, activate OSL. Is there something more? Some trick/command to make Blender re-render after editing?
I am completely lost. We are doing the same thing, except that I have the default skybox (because I want to change as little as possible beyong the shader). My rendering is either black or is rendered as if my shader wasn’t there. No messages in the console more than “Info: OSL shader compilation succeeded”.
One thing looks odd with your result: The default input is red but the output is magenta. Isn’t the color RGB?
I am primarily using a Mac but I have tried this on Windows and Linux as well with the same result so it I am definitely doing something wrong.
PS: Found it! Of course it was one of these things that you don’t even think about when you have used Blender for a long time, but for me who have not used OSL before, it was not obvious that I had to hit Z and select “rendered” when everything rendered correctly as long as I didn’t involve OSL.
Well, that goes into my “how to” list. Thanks for your replies!