OpenShadingLanguage | Advanced shading language for production GI renderers | Graphics library
kandi X-RAY | OpenShadingLanguage Summary
kandi X-RAY | OpenShadingLanguage Summary
Welcome to Open Shading Language!. Open Shading Language (OSL) is a small but rich language for programmable shading in advanced renderers and other applications, ideal for describing materials, lights, displacement, and pattern generation. OSL was originally developed by Sony Pictures Imageworks for use in its in- house renderer used for feature film animation and visual effects, released as open source so it could be used by other visual effects and animation studios and rendering software vendors. Now it's the de facto standard shading language for VFX and animated features, used across the industry in many commercial and studio- proprietary renderers. Because of this, the work on OSL received an Academy Award for Technical Achievement in 2017. OSL is robust and production-proven, and has been used in films as diverse as "The Amazing Spider-Man," "Hotel Transylvania," "Edge of Tomorrow", "Ant Man", "Finding Dory," and many more. OSL support is in most leading renderers used for high-end VFX and animation work. For a full list of films and products, see the filmography. The OSL code is distributed under the "New/3-clause BSD" license, and the documentation under the Creative Commons Attribution 4.0 International License. In short, you are free to use OSL in your own applications, whether they are free or commercial, open or proprietary, as well as to modify the OSL code and documentation as you desire, provided that you retain the original copyright notices as described in the license.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of OpenShadingLanguage
OpenShadingLanguage Key Features
OpenShadingLanguage Examples and Code Snippets
Community Discussions
Trending Discussions on OpenShadingLanguage
QUESTION
I'm doing research on BRDF description and implementation techniques, and OSL is one of the main languages to do so. I'm curious about the way one could implement a new BRDF using OSL, or if it's even possible to do so without messing around with its source code.
The OSL documentation gives a set of materials that are to be expected of any renderer. Blender, for examples, provides an an extended set of implemented materials ready to be used in OSL (these materials are actually already available as nodes in Cycles). I'm interested in creating new materials (BRDFs). According to this thread, OSL is not meant to be used like this, instead the users are supposed to make use of the already available material closures (BSDFs) to create new materials. The OP in that thread was trying to implement a BRDF but couldn't progress because he couldn't find a way to obtain certain vectors needed.
Finally, my question is: in order to create new materials (BRDFs) to be used in OSL, is it necessary to implement them first in C++ and recompile OSL, to finally make them usable? I wasn't able to find a definitive answer to this question.
...ANSWER
Answered 2019-Sep-28 at 10:02Starting from the Introduction in the OSL spec,
OSL’s surface and volume shaders compute an explicit symbolic description, called a ”closure”, of the way a surface or volume scatters light, in units of radiance.
In blender, the cycles nodes with a green output socket are the "closure" nodes, they provide the BRDF/BSDF calculations that give the appearance in the render. Cycles provides the type of closures that are available, OSL cannot implement new closure types.
So yes, you would have to alter blenders code to offer different closure types, but an OSL script can add plenty of customisation to a cycles node tree without you having to alter blenders code. The OSL script is compiled using LLVM's JIT compiler to run on the current CPU being used. So an OSL script does "inject" new code into the render engine, it is just limited in how it can alter the final result.
Note that an OSL script does not have to provide a closure output, it may output float or colour values which allows it to provide intermediate nodes within a node tree.
As example OSL scripts, the LGHexTiles.osl provides a complete node that can be used by itself as a material. While the MAscales.osl provides colour and float outputs that make only one node in the material.
And like many things, OSL scripts can be abused. Here you will find info about the old Amiga Juggler being implemented in an OSL script. Yes, a simple render engine, written in OSL. I'm pretty sure he continued to develop the raytracer further.
QUESTION
I am unable to compile OSL following their instructions here: https://github.com/imageworks/OpenShadingLanguage/blob/master/INSTALL.md
The error complains that is missing an environment variable OPENIMAGEIO_LIBRARY_DIRS. I tried building OpenImageIO myself or using vcpkg. So I've set all the other missing vars (e.g. OPENIMAGEIO_LIBRARIES) If I want to set that OPENIMAGEIO_LIBRARY_DIRS, where it should point at? Also why it says it did find the variable but it also say "found suitable version "2.1.0", minimum required is "1.8.5"" ?
Here is the error I get when building OSL (I am on Mac):
...ANSWER
Answered 2019-Jan-18 at 13:31The error message
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install OpenShadingLanguage
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page