backdoor Arnold: setting visibility

If you want to control object visibility with operator, or the Arnold Python API, or by editing an ASS file, you need to understand Arnold’s visibility parameter.

In the UI, the object visibility options look like a bunch of separate parameters:


but in Arnold, all those options are stored in one visibility parameter.

For example, if an object is visible to the camera (primary visibility), and to transmission (both diffuse and specular), then that’s visibility 13.

Why 13? Because 13 = 1 + 4 + 8

  • camera rays = 1
  • diffuse transmission rays = 4
  • specular transmission rays = 8

The Arnold visibility parameter tells Arnold the rays to which the object is visible.

  • visibility 0 means the object isn’t visible to any rays
  • visibility 255 means the object is visible to all rays
  • visibility 253 means the object isn’t visible to shadow rays (so the object does not cast shadows).

Here’s the decimal values for all the different ray types.

To figure out the visibility, just add up the values for the rays you want.

Ray typeDecimal Value
Camera (Primary Visibility)1
Shadow (Casts Shadows)2
Diffuse transmission4
Specular transmission8
Diffuse reflection32
Specular reflection64
SSS (subsurface)128

Using an operator to override parameters in an ass file

Arnold 5.1 adds operators, which among other things, allow you to override parameters in ass files loaded by procedural nodes.

Here’s a quick example using the brand new MtoA 3.0

I exported some particles from Softimage, loaded them into Maya with an aiStandin (aka an Arnold procedural), and then used a set_parameter operator to scale the radius by 0.5

Note that I connect my operator by setting the Target Operator in the Render Settings.
I can chain two set_parameter operators together, to set the mode and then scale the radius: