I know this might sound a bit stupid but please bear with me. I was pretty excited at the prospect of being able to write custom shaders when I first heard OSL is being included in blender. But since then my excitement has waned. Being able to share shaders across different REs is great. However, I can’t think of any scenario in which an ordinary artist might need to write a custom shader using OSL. I mean, is there anything that can’t be done with stock shaders + shader nodes + texture maps? Couple that with post pro/touch-ups and it becomes even less clear why a normal user should learn OSL!
I’d like to hear your thoughts on the benefits of learning OSL
On a side note, congratulations on the new release and thanks to the devs for their great work.
You’ll find that learning OSL may very well be worth it for things like very complex texture effects and other things that would be difficult to create with a standard node tree.
I haven’t gone through that thread thoroughly. But if you aren’t going to animate these textures I don’t see why you can’t simply paint most of them by hand. Most of them seem like simple tiled patterns.
OSL also allows the user to create a new type of socket called an integer socket, something which is only possible through the script node.
OSL allows for more complex logic, hiding or enabling effects behind an if statement is a lot easier than if you tried to hack your way into doing that with math nodes.
Okay these are valid points.
OSL gives you access to a special function that allows you to trace rays along an object, allowing you to create an AO-type effect for things like a dirtmap.
Can you provide an example. How is that different than using baked AO or rendered AO pass?
Creating textures as a function rather than a image allows for potentially unlimited detail.
On top of that, basically anything that can be expressed as an equation can be ported to OSL.
OSL seems to be the direction that the industry is headed. Having some knowledge of RSL and OSL under your belt could help ensure your place in the near future. Also, it’s never bad to know more things. If you really can’t think of a use for a dedicated shading language, then you aren’t thinking hard enough!
There are textures that are very hard, if not impossible with mapping, hence the usefulness of certain technologies like OSL, they allow You to go further then the basic tools.
In essence, your question can only be answered by You, do You need more advanced tools then the ones available!!!
Once volume and displacement are implemented osl will be much more useful. There are some shaders that are easier to write than uv unwrapping and making 2+ texture maps. Learning it does not mean you have to write all your shaders from scratch. When you learn osl, you will be able to take advantage of many of the shaders that have been written for the last 30 years,(and guess what…they look a lot better in cycles than the other renderers) I think learning renderman 3delight is the best way to learn osl, though some may prefer OpenGL or another language.
You get a much bigger return on invested time for learning python compared to OSL. Python is used extensively inside blender and elsewhere. It’s even useful for engineers like myself who work outside the field of cg. The same could not be said about OSL which is just a shading language.
I’m looking into this from a hobbyist’s pov. Securing a place in the industry is not a priority for me atm.
Procedural textures are only a limited subset of all textures needed in cgi. Procedural textures which can only be created through a shading language like OSL is an even more limited subset (considering we have texture nodes) which, IMHO, hardly justifies the need to learn OSL.
I can’t help but feel that to unleash the true power of OSL one would have to be well-versed in shading and rendering theory. Otherwise learning the language in and of itself (though apparently easy from the few example shaders I’ve seen) won’t be of much help as shading/texture nodes already offer a great deal of flexibility and customization with limitless possibilities. Although I must say I am really interested in the organizational aspect of it as I see OSL nodes can greatly reduce the complexity of node trees. Plus one can properly document what a shader does exactly with OSL nodes.
Anyway this is only my opinion so please correct me if I’m wrong.
Thanks for the link. I’ll check it out.
I guess I’ll just have to wait for more interesting examples of OSL being used in real-world applications. Hopefully some blender specific stuff will pop up soon.
OSL can be used for shaders, of course, but it can be used to improve workflows, by creating tools and containers, which is very useful by itself.
It seems You answered your own question, since as a hobbyist You do not need OSL, then no, OSL is not worth learning, at least not for You.
But for any type of studios, the more tools You have at your disposal, the better, and as Blender grows, it needs to offer more workflow tools, so implementing OSL, which is becoming a standard, makes sense!
Until OSL supports GPU rendering it’s not worth it IMO.
Sacrifing rendertimes (and we’re talking about big differences, 15x longer rendertimes) for some more control over shaders isn’t worth it to me.
People using GPU for rendering are in the VAST minority. It’s simply not feasible for large scale production rendering, and won’t be for the foreseeable future. OSL was created to solve problems in production rendering, which is all done on the CPU. Rendering 15x faster means nothing if even the most basic production scenes won’t fit in vRAM.
The people who develop and maintain OSL work for Sony. Until parallelizing code for the GPU is a trivial task (probably never), or a time when GPUs get 10x the memory they have now, we’re not going to see official GPU support for OSL. Limiting yourself to only features that will run on the GPU from now on will severely limit your abilities as an artist.
I agree, GPU rendering is way too limiting for any serious work besides the occasional still, and although I applaud the effort put by Brecht and the team in developing Cycles for GPU rendering, one must admit that using a rendering method that is limiting what can be done in a 3D application can only lead to poor, or at least not as good as it could be art, which is a bit of a nonsense to me!
In my opinion, that time would be better spent in making Cycles more optimized and faster on CPU, which would benefit to all, not just the few bent on using GPU rendering!
And as I pointed out earlier, OSL is obviously aimed at more advanced users who wants more advanced tools!
Osl is slower than standard cpu rendering in cycles.
Try a moderately complex scene like a car on a ground plane…
From memory in a test I did earlier in the week…
Gpu around 30 seconds
Cpu around 2:30
Osl around 16 minutes…
All were 1080p at 100 samples on the same shader network. … no script nodes involved.
That’s a huge time difference. It’d be interesting to see if it would be faster writing an osl shader rather than the moderately complex node based graph…
It’s worth noting that there is a significant change in look with Osl as a backend. I do get the feeling that textures are sampled differently filtered different and that lighting feels more accurate somehow.
I was mixing multiple glossy closures with different roughness values and colours and the osl result was much more what I expected. .
A work colleague found that the mike pan bmw scene with metallic paint never resolves nicely under osl as the noise texture stays crisp rather than the smootherlook in standard cycles.