Wiki

Clone wiki

arnold_shaders / assExport_cameras

Camera

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

createNode "aiPerspCamera";

Once it's created (it should still be selected) you can load it into the Connection Editor and create a link to perspShape. 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.

Arnold's persp_camera being connected to the Maya camera node

Currently the following Arnold cameras are supported:

  • aiOrthoCamera
  • aiPerspCamera

Motion Blur

Each camera has some shutter settings, which influence when the shutter opens and when it closes:

Motion blur shutter settings

While exporting the .ass file there are some motion blur related options (mblur on/off and mbsteps) which activate motion blur and tell the exported how many steps should be exported. E.g.:

file -force -options "mblur=1;mbsteps=12;rotx=0" -type "ASSexport" ...

The MEL command above will result in 12 motion steps (if the shutter settings make sense) and in an .ass file this might look like this:

...
persp_camera
{
 name Camera
...
 shutter_start 0
 shutter_end 0.25
 shutter_type "box"
...
}
...
nurbs
{
...
 matrix 1 12 MATRIX 
...
}

The image below shows a toy wind mill rotating around 90 degrees during one frame with shutter_end settings 0.25, 0.5, 0.75, and 1.0:

Motion blur with shutter_end in [0.25, 0.5, 0.75, 1.0]

Updated