VFT | OSL shaders in Blender

For my graduation project VFX Fractal Toolkit (VFT) I developed a couple of Open Shading Language (OSL) shaders to render volumetric fractals. I produced with them the following animations.

As a renderer I used Arnold and was pretty satisfied with the workflow. However I was wondering how difficult would it be to use the same OSL shaders in another renderer, e.g. Blender’s Cycles. Especially because I was trying to mimick OpenCL’s syntax in OSL (not the best idea, but helped me port OpenCL shaders which I built first), included couple of header files etc..

As it turned out it was a pretty quick process and everything worked out of the box, requiring only minimal changes. The only thing I had to change was to properly set up multiple node outputs. Arnold doesn’t support multiple outputs for an OSL node so I worked around it by outputting a 4×4 matrix type with encoded values in it and extracting them afterwards. This makes Blender’s shaders nicer and more readable, you can check the diff here.

The shading setup in Blender looks pretty similar to the one used in Arnold and also outputs similar results.

Screenshot from 2019-06-19 18-37-47

For the testing I used Blender 2.80 beta running in a Docker container.

Keep in mind that rendering such volumes is pretty slow and neither Arnold nor Cycles support OSL on GPU. I included the changes in blender branch of the repository (not for all OSL shaders yet, but you get the idea :)).

VFT | OSL shaders in Blender

Style Transfer Docker images

I would like to share with you a small setup I did for artistic style transfer. I won’t go too much into technical details, rather I will describe my motivations and what problems I tried to solve.


Style transfer example taken from fast-style-transfer.

Style transfer can easily produce quite interesting results unlike filters we already know from e.g. Adobe Photoshop. While style transfer might be cumbersome to set up and control, it is definitely an interesting image processing technique to experiment with and which can produce novel looks.

Continue reading “Style Transfer Docker images”

Style Transfer Docker images