OSL Pattern Exploration

 
 
OSL is an open shader language that is used for the CPU render engine. The code's flexibility makes the procedural texture have more variability, therefore achieving many effects that standard texture can't.
 
basic ring osl used with pxr-layer surface

basic ring osl used with pxr-layer surface

Look-Dev

Basic Look-Dev to combine the OSL pattern with glass materials. Find the OSL code example here.

To make a pattern that works with transparent material, use carefully with a Pxr-layer surface to get the alpha channel. See node below.

ring_glass.png
 
Combine circle osl with ring osl to make more interesting shader

Combine circle osl with ring osl to make more interesting shader

Look-Dev

After writing serval OSL patterns, combine them to achieve the more interesting results with the alpha channel.

combine_ring_circle.png
 

Create a rectangle or stripe is possibly as well.

 

Look-Dev

Control the rectangular shape by defining its boundary.

Find OSL code here.

simple Cross osl

simple Cross osl

 

Carbon Fiber Shader

For more complicated pattern, define the function at the front of the shader would be necessary

The example can be download here:

If you find it difficult to understand. Learn some basic C++ syntax would help

Carbon fiber shader with more defination in OSL code

Carbon fiber shader with more defination in OSL code