Book: Open Shading Language for Blender

My new book

Open Shading Language for Blender
a Practical Primer

ISBN: 9781301681471

Is available on Smashwords.

Learn how to program Blender's scripted shader nodes in Open Shading Language to get the most out of Blender's Cycles rendering engine. Using practical examples and clear illustrations this book will take you from simple patterns all the way to complex materials in small and gentle steps.

Scripted shader nodes in Blender's Cycles rendering engine give you unlimited possibilities when it comes to creating materials far surpassing any built-in nodes. Scripted shaders are programmed in Open Shading Language and this book will get you up to speed quickly with this easy to learn yet powerful programming language. Each section introduces new concepts while focusing on real shaders, keeping the learning curve gentle even for people with little programming experience. In each section we will present a ready to use shader that is analyzed in detail. The concepts are illustrated with images and diagrams and for each shader and example node setup is presented that shows how the shader could be used in Blender's node editor. The source code for the examples and ready to use .blend files are freely available so you can experiment with the shader before delving into the code.

You can download a sample here (ePub):
Open Shading Language for Blender Sample.epub

Table of contents

  • Intro
  • What are OSL shaders good for?
  • Reading hints
  • Code availability
  • A very simple shader
  • Data types
  • Control structures
  • Points, vectors and normals
  • Mapping vectors
  • Patterns
  • Polka dots
  • Leopard shader
  • Diamondplate
  • Symmetry operations
  • Victorian era cast iron covers
  • Ripples
  • Concrete shader
  • Citrus peel
  • Ceiling plaster
  • A mountain shader
  • Lots of pretty pictures
  • Hedge shader
  • Grid displays
  • Debugging OSL code
  • The OSL preprocessor
  • Additional information