Could someone of you please tell what you can use OSL for? apart from crazy patterns
Right now you have the hability to create your custom textures, program how different shaders should be mixed, create complex mapping projections, probe the scene with ray casting, use matrices, loops, and other functions that SVM doesn’t have, or are a mess to recreate.
You can also send to and receive messages from the pipeline, comunicate with other scripts, read xml files, analyze closures and modify them, etc, etc… Though most people won’t even need this stuff.
@Secrop: “send to and receive messages from the pipeline, comunicate with other scripts” Would you mind sharing some doc links on this, please?
Cycles still doesn’t have the code for messaging, or writing/reading point clouds, and some other OSL stuff… but OSL has this interface, and at least with Arnold, it’s working.
you may want to check the testsuite from OSL to see some examples of it.
Thanks for the link; while i doubt i’ll be soon into Arnold this git seems like a vast array of interesting things by itself.
but passing strings from one shader to another is already possible in Cycles. You can pass more complex information, using xml syntax… For example, you can have a shader with lot’s of parameters, and instead of exposing them in just one enormous node interface, you can rip some parameters into smaller and more context related nodes and then add them to alter the original defaults from the ‘main’ shader.
What would be cool with something like this if it was an universal standard for shaders, so that you onle needed 1 library of shaders for all 3D Packages