Website powered by

Arnold Reflection AOVs using Light Path Expressions (Maya/Arnold/Python)

Purpose

In VFX, We often render CG elements to merge them with Backplates. Very often we render reflection of a CG element on to another object. Suppose we have a table lamp placed in front of a mirror in the scene. Generally, If we render a reflection pass we would be seeing the entire Beauty of the lamp in the reflection of that Mirror. Since reflection is considered as an indirect contribution of specular we only get it in specular_indirect AOV and not a proper extraction of the Beauty AOVs. LPE gives us control to extract custom AOVs with a specific part of the light simulation for compositing purposes. I have prepared a set of AOVs with the help of LPEs in Arnold to get all Beauty AOVs inside Reflection.

I highly recommend visiting the following links if you want to learn more about LPEs.

For Arnold

For RenderMan

For Houdini Mantra

What you can achieve

Above Light animation is completely done in Nuke, I have simply animated Light Group AOVs.

Scene Information

I have a simple scene setup here. I have 3 Lights and named them 'cool', 'warm' and 'mesh' as Light Groups and few Arnold Shaders. Standard Surface, Standard Volume, Standard Hair and Car Paint supports LPE. You can also use Mix Shader, Ray Switch, Switch, and Two SIded as long as you are plugging the above-mentioned shaders inside. Shadow Matte Shader is not supported.

Contact Sheet of Beauty AOVs and Light Groups

In the above image, I have rendered 2 layers, Beauty and Reflection. All the AOVs which we commonly use in the Beauty layer including Light Groups are replicated for the Reflection layer. That way we get extra control in the comp.

Maya Workflow

Render layer setup

I have created two render layers, Beauty and Reflection. Beauty will have built-in AOVs and Reflection will have Reflection AOVs.


I have built a script that you can run in Maya, which will create a UI to create Reflection AOVs in your Maya scene.

Script - https://github.com/Bhavesh7393/Arnold-Reflection-AOVs-Maya-Python/releases


Paste "load_ui.py" file content to your Maya Script Editor, replace path variable with your local directory folder inside "".

Script Features

  1. Exact same UI and functionality as Arnold AOV Browser in Maya Render Settings.
  2. 2 additional Beauty AOVs: specular_only and hair. Arnold considers aiStandardSurface Specular and aiStandardHair Specular as the same specular AOV and does not differentiate. specular_only AOV only extracts aiStandardSurface Specular, and hair AOV only extracts aiStandardHair Specular.
  3. All possible Beauty AOVs have their Reflection AOVs.
  4. Emission has 2 additional Reflection AOVs:
    • refl_light_emission: Light Emission in Reflection
    • refl_object_emission: Shader Emission in Reflection
  5. refl_RGBA_default Reflection Light Group is provided by default. any additional Light Groups will automatically appear in the list as refl_lightgroup.

Nuke Workflow

Nuke script is pretty straight forward, align your Beauty AOVs, combine them, do the same for the Reflection AOVs. Once you finish the Color Correcting/Grading the Beauty AOVs, you can clone the nodes to Reflection AOVs to take the same effect.

Limitations

Though we can have control in the comp to a certain extent, there are few limitations:

  • Can’t extract Utility AOVs (Depth, Position, Normal, etc.)
  • Can’t extract Cryptomatte or other IDs.