How to Enable Open Shading Language GPU Render in Blender

Blender now has the amazing capability to render Open Shading Language (OSL) on GPU. This is a significant development since one of the largest blockers to people using OSL was the CPU-only render limitation. That limitation is gone, and the usefulness of OSL just skyrocketed.

Background

Open Shading Language was added to Blender 2.65 in December 2012. Since that time, it has been limited to CPU rendering. This was a significant limitation on the use of OSL, particularly since Blender had invested so heavily in other features to speed up rendering on the GPU (like Eevee realtime views).

Blender 3.5 was released on March 29, 2023. In the release notes for 3.5, I completely missed the announcement about GPU OSL. I only discovered thanks to @ACrazyCat’s comment on YouTube. You had to look very closely at the Blender 3.5 release notes to see “OSL Support with OptiX” on the page. This was linked to the Open Shading Language page of the Blender manual. I also found a blog post by NVidia announcing the ability to render OSL on NVidia RTX GPU with OptiX.

What is OptiX?

OptiX is a ray tracing engine developed by NVidia for fast ray tracing on GPUs. Blender began working with NVidia in 2019 to add this highly requested feature.

How do you use OSL with GPU

First, according to the Blender manual, you will need an Nvidia GPU with compute capability 5.0 and driver version 470 or later. Go to Edit->Preferences->System and ensure OptiX is selected.

Next, change the render engine to Cycles. Select GPU from the device dropdown and enable Open Shading Language.

You should be ready to go. If the GPU option doesn’t show up, you may need to go into preferences, system settings.

Test Renders

According to NVidia, rendering on GPU is 36x faster than CPU. I had to take this for a test spin. I loaded up two of my recent scripts, Mandelbrot and Scratched Metal. I did a high quality test render of both to compare the times.

Not surprisingly, the GPU was significantly faster. This is going to significantly decrease my render times.

The Blender manual does note that some OSL features are unavailable on OptiX, such as the lack of some noise functions (Cell, Simplex, Gabor) and the lack of the trace feature.

One Comment

Comments are closed.