Site icon Oded Maoz Erell's CG Log

Using OSL Shaders in V-Ray for 3ds max

Advertisements

Software:
3ds max 2020 | V-Ray next

V-Ray for 3ds max supports compiling and rendering OSL shaders,
And also offers some handy shaders for download on the V-Ray documentation website.
Note:
OSL shaders are supported only in V-Ray Advanced and not in V-Ray GPU.

 

To load an external OSL shader:

  1. For a material (color closure) shader, create a:
    Materials > V-Ray > VRayOSLMtl
    For a texture shader create a:
    Maps > V-Ray > VRayOSLTex
  2. In the VRayOSLMtl or VRayOSLTex‘s General properties,
    Click the Shader File slot-button to locate and load the *.osl file.
  3. Provided that the shader has loaded and compiled successfully,
    You will now be able to set it’s custom parameters in its Parameters section:
  4. If compile errors will be found you’l be able to read the error messages in the V-Ray messages window:

 

To write an OSL shader:

  1. To write a material shader (color closure) create a:
    Materials > V-Ray > VRayOSLMtl
    To write a texture shader create a:
    Maps > V-Ray > VRayOSLTex
  2. Expend the Quick Shader section of the node’s properties,
    And check the Enable option.
  3. Write you’r OSL code, and press Compile.
  4. Provided that the shader compiled successfully,
    You will now be able to set it’s custom parameters in its Parameters section:
  5. If compile errors will be found you’l be able to read the error messages in the V-Ray messages window.

 

Related:

  1. OSL read-list
  2. What are OSL shaders?
  3. Using OSL shaders in Arnold for maya 
  4. Using OSL shaders in Blender & Cycles
  5. Writing a basic OSL color shader
Exit mobile version