Cycles OSL builds?


Has anyone tried compiling Blender/ Cycles with the new OSL scripting node?

Any builds around?


We are close to finishing the OSL work on that.
Lukas Tönne (Linux) and Jens Verwiebe (Mac OS) did a lot of great work to get static OSL libraries. This means that builds can be shared and all necessary parts are included.

Brecht said he will review the OSL Script node this week, so with a bit of luck we will have all needed OSL parts in Blender Trunk within 1-2 weeks.

But…don’t expect a build for Windows so soon…eh…it’s tricky there.


Ok, here is a Linux x64 bit build with the OSL script node.

It has been compiled on Ubuntu 12.04, x64. I have no idea if it works for you guys, or if it even starts. :stuck_out_tongue:

  • Please download it, extract it and start from the console.

  • If it starts, all is good. If not, please paste the error message.
    (It probably will only run on new distributions like Ubuntu 12.04 and you need some basics like python3.2…if you already compile Blender yourself, you should have all necessary things.)

  • Try to render. Change to Cycles, and switch the Shading System in the Render buttons from “GPU compatible” to “Open Shading Language”. Press F12. If that works and does not crash, you can have fun. :slight_smile:

  • Go to the shader nodes, Add-> OSL -> Script. Now you can open a .osl shader file or write one in Blender and select that inside the OSL Script node. Keep in mind that only files on the hard drive work, so if you create them inside the Blender text editor, save the .osl file to disk first. Press “Compile” in the node. Now you can use the shader like any other as well.

Sooo awesome to see this - doesn’t work for me but I was trying to hack it on fedora, where can we get the libs? Had no end of trouble compiling osl decided to wait a bit!

You mean, you would like the OSL libs? We will release them soon too, but we probably wait until the OSL script node is in trunk.
Too many loose ends still.
If you mean the libs to run the build, well just basic packages, which you also need for Blender compile. Check the Blender wiki:

Thank-you very much DingTo! :slight_smile:

I had looked at how to compile the build. But to be honest it seemed like a little too much, and I didn’t want to run the risk of messing with any of my libraries, and so on.

I have downloaded the Linux 64-bit build, and it runs perfectly fine here. No errors when starting with the console. I have tried rendering the cube with ‘Open Shading Language Compatible’ shading system and it works.

I will start testing out now. Granted I am new to OSL, but I believe it is quite a nice, and an easy shading language to get started with.

Would you like bugs to be reported to the normal bug tracker?

@DingTo yeah I meant the osl libs - I had a few problems building them, osl itself specifically. Looking forward to the osl script node, great work!

Hey, great it works for you! :slight_smile:
Please report all issues here for now, not into the official tracker yet.

If you want to get a head start with the osl shaders, take a look here:
Those are basically the shaders that are used for the nodes in Blender. You can download a few of them, load one into the OSL Script node and start modifying it.

Hi Thomas… running Mint 13. Downloaded and extracted, saved to my home folder, and renamed the app-containing folder (probably significant) to “blender_osl” because I’m a lazy typist - and slow. In terminal, I issued:

cd blender_osl

and got the following message in terminal:

connect failed: No such file or directory
FRS_set_context: context 0x0x54742f8 scene 0x0x5a39078

HTH… probably something stupid I did?

ETA: Oh, but after that it ran fine… everything is working with no errors that I can see.

Thanks DingTo, I’m currently looking through the shaders.

I think it may take a little while to fully get my head around this. Well at least to the point where I’m beyond making diffuse shaders and so on.

I have a question. Can I use this PDF ( when using OSL in Blender?

Tried it out over here and it works, thanks Dingto for the awesome build.

Yes sure, that’s the Language Specification. :slight_smile:

I am looking forward to some cool results :wink:

Thank you for your work, is there any way that we can get a link to a mac build. I don’t see anything on, but I saw that Jens was working on it, maybe you could point me in the correct direction. Thank you.

Working fine here, managed to compile the brick texture right in the OSL node :slight_smile:

Here is a quick demo file to give you something to play with:

It contains a simple scene setup already in OSL render mode (just enabled “Rendered” object mode in the viewport).
Two OSL scripts are included:

checker.osl: very simple checker texture
mandelbrot.osl: more complex shader function using the ubiquitous Mandelbrot set, to show something you cannot do with nodes alone (while loop)

Checker texture is initially selected in the script node for the monkey material.


  • When changing OSL files in the Blender text editor, make sure you save the OSL text, not just the .blend file (alt+s). Otherwise the OSL compiler will just use the old file version on your hdd. You can use an external text editor too of course.
  • When loading new .osl files via the file selector, make sure to disable the file type filter, otherwise you won’t see and .osl files.

EDIT: Sorry, just realized the text file paths will of course not work when loading on a different system :rolleyes: Just load the .osl text files again (with disabled file type filter), should be working fine then.

Ubuntu 12.04, work like a charme!!!

Hi there,

I’ve successfully compile blender with OSL support on macosx. I can switch to OSL in ‘Shading system’ but i don’t have access to the OSL Script node. Where can i find this node please ?

Moved from “General Forums > Blender and CG Discussions” to “Support > Technical Support”

You can get the OSL script node from either the codereview site or the branch:

Method 1: Download the patch from codereview

Apply this to your local working copy.

Method 2: Checkout with git (requires git client and basic git knowledge!)

git clone git:// -b cycles_osl

This will give you the full development history too.

Method 3: Download full source from git branch as an archive

Go to, click the “Download cycles_osl as tar.gz” on the right side. ( can be a bit pigheaded sometimes, just reload if the site complains).

After patching/download just build as usual. You will (for now) need the boost::python3 library, but if you already built OSL and followed our instructions for boost and OIIO this should already be there.

works fine on Mint 13! i can compile some nodes just fine, but the image texture node gives me this error:

/home/joel/Documents/osl_nodes/node_image_texture.txt:0: warning: Unable to find "/home/joel/Documents/shaders"0 . Parameter Vector : VECTOR , [0.0, 0.0, 0.0]
1 . Parameter filename : , None
2 . Parameter color_space : , None
3 . Parameter Color : RGBA , [0.0, 0.0, 0.0, 1.0]
4 . Parameter Alpha : VALUE , 1.0
Warning: filename: String type not supported
Warning: color_space: String type not supported

wassat all about?

P.S. - @DingTo should we post error messages, odd results and such here, or somewhere else?