It looks like you're using an ad blocker! I really need the income to keep this site running.
If you enjoy BlenderNation and you think it’s a valuable resource to the Blender community, please take a moment to read how you can support BlenderNation.

Simple OSL Ambient Occlusion


Here's a great demonstration of the power of the Open Shading Language node! In 60 lines of code, Youpi wrote an Ambient Occlusion Shader.

Youpi writes:

Just because I need one, and also because the AO node in Blender is a little too light, I've made today an Ambient Occlusion Shader with OSL.

It works exactely like a standard Ambient Occlusion, as you could find it in many software.


About Author

Bart Veldhuizen

I have a LONG history with Blender – I wrote some of the earliest Blender tutorials, worked for Not a Number and helped run the crowdfunding campaign that open sourced Blender (the first one on the internet!). I founded BlenderNation in 2006 and have been editing it every single day since then ;-)


  1. Decent result! Finally, an example of the OSL with Cycles in action! I'm looking forward to more examples of OSL at work within Blender.

  2. Just one small question:
    "AO Angle is in RADIANS, 1.0 = 180°"

    Do you mean 1.0 * pi = 180°, or angle is in pi Radians ?

  3. I have saw the different examples that you guys have made, they are really interesting. It would be grate if there was a site where all those great shaders could be made as a library. And explain to novice as me as to instal and use them properly.

  4. Gertjan van den Broek on

    I wonder...can OSL shaders positively affect cycles render times and/or noise?
    It's not hard to imagine that they can affect performance in a negative way.

Leave A Reply

To add a profile picture to your message, register your email address with To protect your email address, create an account on BlenderNation and log in when posting a message.