Starting with iray in 3ds Max 2015 you can render different bits of information into different buffers using Light Path Expressions (LPEs). LPEs are exposed through iray Render Elements.
LPEs are regular expressions that match some light transport paths that iray generates. Each result buffer can be associated with an LPE so that only paths which match the expression end up contributing to that buffer. The iray renderer also allows you to render several buffers with different LPEs at the same time at almost no additional runtime cost. LPEs can distinguish between different surface properties such as diffuse or glossy, reflection or refraction, types of light sources, and names.
In 3ds Max 2016, LPEs have been extended to allow light-specific and object-specific paths.
Light-specific LPEs allow to render your scene per light source. You can then adjust light intensities in a post process, weighing them together.
Object-specific allow to render your scene per object. You can then perform artistic compositing of an image, for example by subtracting an object’s reflection from the beauty image or by adding glow to the image.
For examples of LPE usage, check out these iray blog posts:
Compositing with Light Path Expressions
Instant Relighting & Nonphysical Effects
Get a grip (2): instant color change
Lights and objects need to be grouped into layers before they can be referenced in LPEs.
Below is an example how to achieve this. You can download the example scene from https://s3.amazonaws.com/arcdownload/irayLPESceneUsingLightsAndObjectsHandles.zip.
Open “Tools/Layer Explorer…” to group objects (e.g. the cosmetic box below is under a layer named “container”):
Grouping geometry in the Layer Explorer
The “container” can then be referenced in an LPE "L.*'container'RE"
(reflections of the cosmetic box):
Creating an LPE with object-specific path
In the same way lights can be grouped into layer and referenced in an LPE:
Creating an LPE with light-specific path
Rendering
"<L'light_right'>.*E"
Hope you will find this post useful.