Share

Depth, Dust, & Position Procedural Masks tutorial - Arnold for 3ds Max

depth dust pposition_

This tutorial shows how to create Z Depth, dust, and Object Position masks that can be used in a compositing package to layer shading effects such as depth of field, dirt, dust, or snow. They use a combination of Arnold shaders such as utility, range, and state_float. Thanks to Slava Sych for the assistance with this tutorial.

A scene file can be found here.

Depth Mask

  • Create a state_float shader. Set the variable parameter to ray_length (Rl).

  • Create a range shader and connect the state_float shader output to the input of the range shader. Change the following parameters of the range shader:

    • input_min: 0.6 (this value depends on the distance from the camera your object is).

    • output_max: 1.5 (this value depends on the distance from the camera your object is).

    • smoothstep : Enabled

Note:

This mask directly depends on the distance from the camera.

Object Position (n) Dust Mask

  • Create a state_vector shader and change the variable to n.
  • Create an rgba_to_float shader and change the mode to b.
  • Create a range shader and connect the rgba_to_float shader to the input of the range shader. Enable smoothstep and control the mask position with the Input Min/Max parameters.

Object Position (Po) Mask

  • Create a state_vector shader and change the variable to Po.
  • Create an rgba_to_float shader and change the mode to b.
  • Create a range shader and connect the rgba_to_float shader to the input of the range shader. Enable smoothstep and control the mask position with the input_min/max parameters.

Was this information helpful?