Wiki

Clone wiki

arnold_shaders / assExport_lights

Light

Similar to the aiOptions node you can create instances of dependency nodes representing Arnold lights. For example you can create an Arnold point_light light like this:

createNode "aiPointLight";

Once it's created (it should still be selected) you can load it into the Connection Editor and create a link to pointLightShape (the pointLight node contains the transform attributes), which stores values for example for the light color or intensity (beside others). 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;

You might want to create additional connections between both (Arnold and Maya) nodes, because some of the parameters match and can be linked to each other. This way you can still render with Maya's internal software renderer, while exporting and rendering with Arnold. Be careful to use the same decay type for both nodes:

Arnold's point_light shader being connected to the Maya PointLightShape

Currently the following Arnold lights are supported:

  • aiAmbientLight
  • aiCylinderLight
  • aiDiskLight
  • aiDistantLight
  • aiMeshLight (new in Arnold 4.0.7.x)
  • aiPointLight
  • aiQuadLight
  • aiSkydomeLight
  • aiSpotLight

Updated