an arnold plugin for massive software rendering

cdl / shading networks

Here's a CDL line example for an arnold standard shader:

shader 5 "renderpass_PRMan" "Aistandard" "Ks" [0.15] "Kd" [0.8] "Ka" [0.5] "specular_roughness" [1] "Kd_color_filename" ["../maps/shader_maps/prman/colour/shirt_color_'shirtmap'.tex"]
Note the Ai keyword before the shader name. This is needed here in order to get the shaders correctly translated into arnold. 
Opacity is handled automatically, and the opacity bit is set to false in case the shader connected has a Kt value greater than 0.0 or there's a Kt_filename on the cdl.
Displacement should be stated using the Ai keyword before the shader name.
Bump shaders should go there too.
Visibility can be set per shader using the parameter VISIBILITY and setting its byte value directly.

In case you need to add shading network capabilities, there's a way to hook to and from the shader generated by massive.
You will need to define the following variables inside your cdl file:

  • extern_shd_ntwk_shader_hook_PARAMNAME the shader on your network to plug PARAMNAME into
  • extern_shd_ntwk_param_hook_PARAMNAME the param on the previous shader to hook PARAMNAME into
  • extern_shd_ntwk_file_PARAMNAME the .xml filename ( must be an ABSOLUTE PATH ) that defines the shading network
  • extern_shd_ntwk_shader_output_PARAMNAME the shader on your defined network to get the result from
  • extern_shd_ntwk_param_output_PARAMNAME the param on that shader to plug into to get the result from

The values will be read from PARAMNAME and results will be plugged again into PARAMNAME
If you don't need to set values based on your PARAMNAME just let
extern_shd_ntwk_shader_hook_PARAMNAME and extern_shd_ntwk_param_hook_PARAMNAME empty by typing [""]
only file and shader_output contents are mandatory, definition is mandatory for all, and you should use that precise order.

an example line inside a cdl will look like this
shader 5 "renderpass_PRMan" "Aistandard" "Ks" [0.15] "Kd" [0.8] "Ka" [0.5] "specular_roughness" [1] "Kd_color_filename" ["../maps/shader_maps/prman/colour/shirt_color_'shirtmap'.tex"]
"extern_shd_ntwk_shader_hook_Kd_color_filename" ["override"] "extern_shd_ntwk_param_hook_Kd_color_filename" ["color"] "extern_shd_ntwk_file_Kd_color_filename" ["Y:/Agentes/FB_Mayhem/cdl/override.xml"]
"extern_shd_ntwk_shader_output_Kd_color_filename" ["override"] "extern_shd_ntwk_param_output_Kd_color_filename" [""]
the override.xml file should look something like this 
<?xml version="1.0" ?>
    <shader name="override" type="flat">
        <param name="color" type="RGB" value="0.0 0.0 0.0"></param>
    <shader name="override2" type="flat">
        <param name="color" type="RGB" value="override"></param>