© Square Enix © Goodbye Kansas


Table of Contents

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


Overview


The Render Mask makes it easy to choose just a specific part of the image you'd like to re-render. It's more accurate and offers more control than Render Region.

The Render Mask feature can be found in the Renderer ROP > Renderer > Sampler > Image Sampler.



Workflow


Here's the base render.

The joints and eyes of the robot are chromic. Let’s experiment with another type of metal for the joints and eyes.

To save time, render just the parts mentioned, without wasting time for the whole scene (the rest of the robot parts and background).





Color the chrome material and match the eyes and neck frames to the robot’s yellow joints.

Then go to the ||out Network|| and find the Renderer ROP. Open the Image Sampler parameters from Renderer tab > Sampler tab > Image Sampler, and choose the dropdown for Render Mask.

From the dropdown you have several choices:

Texture – Uses a black & white texture to limit rendering to the white areas of the texture only. You can also use animated texture sequences by specifying an Image File VOP using the op: synthax (e.g. /mat/imageFile). Note that the Type of Image File VOP's UV must be set to Environment, and the Mapping Type to Screen.
Object – Only the specified objects are rendered.
Object ID – Only objects with the specified object IDs are rendered. You can list more than one object ID as a space-separated list. To add IDs to the Geometry nodes, add V-Ray Object Properties using the V-Ray menu.

In this particular case, choose Objects.





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





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





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





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





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





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

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