Wiki

Clone wiki

arnold_shaders / assExport_shaders

Shader

Similar to the aiOptions node you can create instances of dependency nodes representing Arnold shaders. For example you can create an Arnold standard shader like this:

createNode "aiStandard";

Once it's created (it should still be selected) you can load it into the Connection Editor and create a link to a shading group. I recommend using a Maya shader (like Phong), leave the connection to the shading group intact, and add an extra attribute called assShader on the shading group to connect the Arnold shader (in this case a standard shader). To create the assShader attribute you can use the following MEL commands:

addAttr -longName assShader -usedAsColor -attributeType float3;
addAttr -longName assShaderR -attributeType "float" -parent assShader;
addAttr -longName assShaderG -attributeType "float" -parent assShader;
addAttr -longName assShaderB -attributeType "float" -parent assShader;

Furthermore you can connect similar colors or float values via the Connection Editor. This way Maya's viewport will still show e.g. the diffuse colors and you can connect both nodes, so that you can adjust the diffuse color e.g. in a Maya Phong shader, and use the same color for the Arnold standard shader:

Arnold's standard shader being connected to the shading group and a Maya Phong shader

Currently the following Arnold shaders are supported:

  • aiAllayer
  • aiAlsurface
  • aiAmbientOcclusion
  • aiBaIllumFlatLight
  • aiKettleUber
  • aiMeshLight
  • aiMillShadowMatte
  • aiMillStandard
  • aiNoise
  • aiObqAtmosphere
  • aiShadowCatcher
  • aiSkinSss
  • aiStandard
  • aiUtility
  • aiWireframe

Updated