we currently work on a project, where we want to use the Open Shading Language to reuse shaders and materials in other programs/renderers (who also support OSL like Arnold) For that it would be great to write a osl-file out of a cycles material.

I found a plugin who creates an xml file from your cycles material containing osl http://peter.cassetta.info/material-library/ but that's not platform independent. Is there any posibility to save all cycles nodes from a material as an osl-file, without the need of scripting shaders?

Cheers Martin


Currently this is not possible.

Gladly Blender is OpenSource and all OSL files for OSL supported nodes can be found in the git repo https://git.blender.org/gitweb/gitweb.cgi/blender.git/tree/HEAD:/intern/cycles/kernel/shaders

There are some nodes that are Cycles specific and will not be able to run correctly in other software packages as needed variables/context might not exists in those packages or named differently.

But it should be possible to create an overall function for your Material to simulate a Cycles material graph to a certain extend.

|improve this answer|||||

Your Answer

