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.
Depth, dust, and P Position
A scene file can be found here. |
---|
Depth Mask
Note that this mask directly depends on the distance from the camera.
Object Position (n) Dust Mask
If you cannot connect a single out color (Out G) to an Input in your DCC, use a rgba_to_float (mode G) shader to convert it.
In Maya, you cannot connect a single out color (Out G) to an Input. A workaround is to use an RGBAtoFloat (mode G) shader to convert it.
Object Position (P) Mask
If you cannot connect a single out color (Out G) to an Input in your DCC, use a rgba_to_float (mode G) shader to convert it.
In Maya, you cannot connect a single out color (Out G) to an Input. A workaround is to use an RGBAtoFloat (mode G) shader to convert it.