Open Shading Language

Advanced shading language for production GI renderers

Table of contents

Introduction

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 developed by Sony Pictures Imageworks for use in its in-house renderer used for feature film animation and visual effects. The language specification was developed with input by other visual effects and animation studios who also wish to use it.

OSL is robust and production-proven, and was the exclusive shading system for big VFX films such as "Men in Black 3: and "The Amazing Spider-Man," animated features such as "Hotel Transylvania", and several other films currently in production.

OSL is distributed under the "New BSD" license (see the "LICENSE" file that comes with the distribution). In short, you are free to use it in your own applications, whether they are free or commercial, open or proprietary, as well as to modify the OSL code as you desire, provided that you retain the original copyright notices as described in the license.

How OSL is different

OSL has syntax similar to C, as well as other shading languages. However, it is specifically designed for advanced rendering algorithms and has features such as radiance closures, BSDFs, and deferred ray tracing as first-class concepts.

OSL has several unique characteristics not found in other shading languages (certainly not all together). Here are some things you will find are different in OSL compared to other languages:

What OSL consists of

The OSL open source distribution consists of the following components:

Building OSL

Please see the "INSTALL" file in the OSL distribution for instructions for building the OSL source code.

Current state of the project and road map

At Sony Pictures Imageworks, we are exclusively using OSL in our proprietary renderer, "Arnold." Completed productions that used 100% OSL for their shading include Men in Black 3, The Amazing Spider-Man, and Hotel Transylvania, and other unreleased shows that are still in production. Our shader-writing team works entirely in OSL, all productions use OSL, and we've even removed all the code from the renderer that allows people to write the old-style "C" shaders. At the time we removed the old shader facility, the OSL shaders were consistently outperforming their equivalent old compiled C shaders in the old system.

In the longer term, there are a number of projects we hope to get to leading to a 2.x or 3.x cut of the language and library. Among our long-term goals:

We (the renderer development team at Sony Pictures Imageworks) probably can't do these all right away (in fact, probably can't do ALL of them in any time range). But we hope that as an open source project, other users and developers will step up to help us explore more future development avenues for OSL than we would be able to do alone.

Contacts

OSL home page at SPI

OSL GitHub page

Read or subscribe to the OSL development mail list

Email the lead architect: lg AT imageworks DOT com

Most recent PDF of the OSL language specification

Sony Pictures Imageworks main open source page

If you want to contribute code back to the project, you'll need to sign a Contributor License Agreement.

Credits

The main developers of OSL are (in order of joining the project):

We cannot possibly express sufficient gratitude to the managers at Sony Pictures Imageworks who allowed this project to proceed, supported it wholeheartedly, and permitted us to release the source, especially Rob Bredow, Brian Keeney, Barbara Ford, and Rene Limberger.

Huge thanks also go to the crack shading team at SPI, and the brave lookdev TDs and CG supes willing to use OSL on their shows. They served as our guinea pigs, inspiration, testers, and a fantastic source of feedback. Thank you, and we hope we've been responsive to your needs.

OSL was not developed in isolation. We owe a debt to the individuals and studios who patiently read early drafts of the language specification and gave us very helpful feedback and additional ideas. (I hope to mention them by name after we get permission of the people and studios involved.)

The OSL implementation incorporates or depends upon several other open source packages:

OpenImageIO (c) Larry Gritz, et al

Boost - various authors

IlmBase (c) Industrial Light & Magic

LLVM Compiler Infrastructure