Rendering Specific Objects with Render Mask

This page provides a tutorial on using V-Ray's Render Mask feature.

Overview

The Render Mask makes it easy to choose just a part of the image you'd like to re-render. It's more accurate and offers more control than Render Region. It can be found in the Image Sampler (Antialiasing) rollout.

images/download/attachments/60099357/Max2022_VRay5_RenderMask_step6.png

Workflow

Here's our base render:

images/download/attachments/60099357/Max2022_VRay5_RenderMask_step1.jpg

In the next steps, we render just a few different objects and not the whole scene again.

Let's dull the chrome material and match the eyes and neck frames to the robot's joints.

Next, select the objects to re-render: all the chrome parts, the eyes and neck frames.

Then we go to the V-Ray tab > Image sampler (Antialiasing) rollout and choose the dropdown for Render mask.

images/download/attachments/60099357/Max2022_VRay5_RenderMask_step2.png

From the dropdown we have several choices:

Texture – Uses a black and white image to control the rendered areas.
Selected – Renders only the currently selected objects.
Include/Exclude list – Renders only the objects added to the list.
Layers – Renders only the objects from the selected layers.

In our case, we choose Selected.

Render the scene, and you'll notice only the selected objects are re-rendered. The rest of the image remains unchanged.

images/download/attachments/60099357/Max2022_VRay5_RenderMask_step3.jpg

To make it a bit more noticeable, clear the VFB by selecting Clear Image from the VFB toolbar.

images/download/attachments/60099357/Max2022_VRay5_RenderMask_step4.png

In the VFB Confirm dialog that appears, choose Yes to confirm.

images/download/attachments/60099357/Max2022_VRay5_RenderMask_step5.png

Now that we've cleared the VFB, we render again.

images/download/attachments/60099357/Max2022_VRay5_RenderMask_step6.png

This time it's easier to see that only the selected objects were re-rendered.

If we look at the Alpha Channel, it is updated as well.

images/download/attachments/60099357/Max2022_VRay5_RenderMask_step7.png

Notes

  • When rendering animation with Render Mask, the previous render can be cleared by going to the Render Setup window > Settings > System rollout and setting the Previous parameter to Clear.

  • When using VRayPhysicalCamera and Auto Exposure enabled, note the following: after the initial render is done, use the Transfer to camera button from the Render Setup. Then disable the Auto Exposure. This way, the exposure is constant regardless of the region or object selection.