Arbitrary output variables (AOVs) make it possible to output image besides the beauty render, for using in compositing software.
Light Path Expression AOVs
For Arnold light path expressions are used to output light into specific AOVs, with the beauty RGBA AOV being the most commonly used one. Rather than writing to specific AOVs from shaders, LPEs can be used to extract specific light paths using regular expressions. Builtin LPEs are available for the common cases.
See Light Path Expression AOVs for more details.
In addition to builtin LPEs, these builtin AOVs are available.
|Per RGB channel alpha|
|Per RGB channel alpha, using volumes only|
|World space position|
|Pref||VECTOR||Reference space position, from Pref user data|
|VECTOR2||Screen space motion vector|
|FLOAT||Time taken to render pixel|
|FLOAT||Number of rays traced to render pixel|
|Pointer to shader node, for filters and drivers|
|Pointer to object node, for filters and drivers|
Shaders can output custom AOVs for cases that are not covered by LPEs and builtin AOVs. For example to output mattes or masks, ambient occlusion, textures, etc. AOVs are only written for camera rays.
Here's an example shader, writing a noise texture to a float AOV: