The purpose of rendering out multiple passes is that it allows you to tweak all aspects of an image such as global illumination, direct light, diffuse, reflection, specular etc. These passes can then be compiled together in Adobe Photoshop.
The whole process of saving out the different render passes may seem like an extra task within your workflow but it will save you a lot of time, especially if you wish to reduce the reflection of a material or change the colour of an object. Without render passes you would result in rendering the image again and that is not the best way to go if you have a deadline looming.
Vray has multiple render elements, some are compulsory where as others are not. To view a list of render elements that Vray supports click here. Before I start, I would like to point out that I will be using a linear workflow with a gamma 2.2 setup within 3ds Max and Vray. I strongly recommend setting this up as it will improve many areas within your workflow. You can find an easy to follow step by step guide here.

Selecting the render elements

Within the Vray render settings go to the render elements tab and add the following elements.
VrayRawGlobalIllumination
The difference between VrayRawGlobalIllumination and VrayGlobalIllumination is that the raw version is not multiplied by the diffuse colour. This allows much more control in post processing
VrayDiffuseFilter
The pure diffuse surface colour, combined with VrayRawGlobalIllumination it will give you VrayGlobalIllumination.
VrayRawLighting
This element works in the same way as the VrayRawGlobalIllumination. Combined with the VrayDiffuseFilter the result will be VrayLighting
VrayReflection
The reflections on the surface.
VraySpecular
The surface specular highlights.
VrayMtlID
As long as you have given all your materials within your scene a material ID, the resulting render element will be a mix of solid colours that correspond to a material ID. This can then be used to colour pick areas within your render to adjust in post.

Providing you are using the Vray frame buffer leave all settings as they are. There are other render elements that are not included in this guide that you may need depending on the type of project, such as VrayZDepth for DOF, VrayRefraction to control the opacity and VrayExtraTex combined with Vray Dirt to create an ambient occlusion pass.
Additionally you can add the VrayRawShadow element to control the intensity of shadows but from experience, the outcome is sometimes less than desired because of the low amount of samples it uses to calculate. Similar to the diffuse pass, the end result is not very smooth. It’s best left combined with the GI and lighting elements.
Vray render elements also work best with Vray materials, if some of your objects are standard materials they may not function correctly as a render element. So double check that your objects have Vray materials applied before you render.

Auto save the render elements

Because there are many passes saving these out one by one is time consuming and out of the question when you are creating an animation. In the Vray frame buffer rollout tick split render channels and choose a location to save the render passes. I recommend saving as a TIF file with at least 16 bit Colour. This will allow for maximum range when adjusting the levels in Adobe Photoshop.
Leave save RGB and save alpha ticked. The RGB will be the completed render which combines all the render elements before any post production, this is known as the beauty pass. Due to the fact that you are saving the resulting image here, you do not need to specify a location for the render output in the common tab. Ignore the pop up warning for no files saved.
At this stage it is important to note that if you are following the gamma 2.2 and linear workflow setup mentioned earlier the rendered image will appear darker in the Vray frame buffer because don’t affect colours (adaptation only) is ticked. To see the actual result click the sRGB button in the Vray frame buffer during or after rendering.

Compositing the render elements in Adobe Photoshop

In Adobe Photoshop go file/scripts/load files into stack. Then select all the render elements and click ok, this will add all the elements into a single work file for you. Then re-order the stack into the following:
  • Alpha
  • RGB Colour
  • VrayMtlID
  • VraySpecular
  • VrayReflection
  • VrayRawLighting
  • VrayRawGlobalIllumination
  • VrayDiffuseFilter
The VrayDiffuseFilter will be used more than once and is combined with other render elements. A main purpose for the diffuse pass is to easily apply colour correction and if necessary, change the colour of an object completely. So that you do not have to manually adjust each diffuse pass, convert it to a smart object by right clicking the layer and choosing convert to smart object. Now duplicate the newly created smart object and place it under the VrayRawLighting so that both main light sources now have a diffuse layer to blend with.
To edit the smart object at any time, double click the layer and it will open in a new window. Once completed save and close and it will automatically update the smart object and any duplicates within your composition.
Set the VrayRawGlobalIllumination blend mode to multiply and create a clipping mask so that the blending of the VrayRawGlobalIllumination only affects the layer it has been clipped with. To do this hold down the Alt key and click between the VrayDiffuseFilter and VrayRawGlobalIllumination (The cursor will change into two circles). Repeat this step for the VrayDiffuseFiltercopy and the VrayRawLighting elements.

Group both the VrayRawLighting and VrayDiffuseFilter. Do the same for the VrayRawGlobalIllumination and VrayDiffuseFilter. Then change the blend mode between the two groups to linear dodge (add).
Linear dodge (add) adds the colour information from the blended layer and removes the black because it is seen as a value of 0 and is therefore invisible. A basic terminology is anything that adds light is to be linear multiplied such as GI complete with diffuse, reflection, specular etc.. Anything that takes away light (such as shadows) is to be multiplied.
Turn on the VrayReflection and VraySpecular layers and set both of their blend modes to Linear dodge (add).

Gamma correction

At the start I mentioned that the composition will appear darker than normal. This is because we are still working in linear space. Add a levels adjustment layer on top of the stack and change the middle Input slider to 2.2. The middle input slider adjusts the gamma in the image. For more information on level adjustments click here.
Some gamma users have mentioned that the results can appear washed out. To correct this you can add further adjustment layers to improve the colour and contrast.

This has been a summary of the required render elements to complete an RGB beauty pass. There are many more elements and adjustments that can be added to aid with post processing. However, it is very much down to the type of project and the result you are after.