This is the first of two tutorials dedicated to analyzing and using a Compositing node group for Blender 4.3 that allows you to render only a specific object or material in its original colors while masking everything else in grayscale, optionally highlighting edges or cavities.
Video Transcript
Hello everyone! This is the first of two tutorials dedicated to analyzing and using a Compositing node group for Blender 4.3 that allows you to render only a specific object or material in its original colors while masking everything else in grayscale, optionally highlighting edges or cavities.
I created this node group after seeing a page in a manual where only certain car parts were highlighted at a time, while the rest of the car remained visible in grayscale to provide reference points for the position of the various components. So, I tried to achieve the same effect in Blender using Compositing.
The tutorial is divided into two parts. In this first part, I will show you how to use the node group, which you can download for free from the link in the description. In the second part, we will look at what’s inside the group, how the various effects are implemented, and how to modify them. You can consider this first part as a small user guide and the second part as a technical manual.
As with many of my other video tutorials, the PDF version of this tutorial is available for free at the link in the description. This is also a great time to subscribe to the channel and enable notifications so you don’t miss future video tutorials!
Alright, with that said, let’s jump into the actual tutorial! I’ll start with a quick overview of the first three inputs, then I’ll show how to use the node with a couple of practical examples.
The node group can be imported into your project using File Append, selecting as the source file the one provided in the package and navigating inside it to the Node Tree section to load the Isolated on Gray group.
Once this is done, you can add the new node group in the Compositing Editor using Add Group.

The first three input sockets of the group need to be connected to external data. The other sockets are parameters that allow you to define various effects and can be connected to external nodes as needed.
The Image input should, of course, be connected to the rendered image in color, whether coming from Render Layers or other processing nodes.
The ID input should be connected to an ID Mask node, which I did not integrate into the group because the Index value of that node cannot be set externally. Therefore, it needs to be added manually outside the group.
The ID Value input of this node should be connected to the Index Object or Index Material information, depending on whether the elements to isolate are identified by an index on the object or the material. We will soon see two practical examples, but it’s important to note that to obtain this information, you need to enable either Object Index or Material Index in the View Layer Passes panel.

In the View Layer Passes panel, we also need to enable the Ambient Occlusion option, as this information will be sent to the Ambient Occlusion input of the node group.

In the first practical example, the objects are separate, and each has a numeric index assigned to it in the Relations section of the Object Data Properties panel. For this reason, before starting the rendering, I enabled the Object Index option in the View Layer Passes.
After setting the Pass Index for the objects and connecting the three inputs to the node group, I start the first rendering.

Since no object has 0 as its Object Index value, the areas corresponding to the object will be completely transparent. In this example, the rest of the image is not transparent because I forgot to enable the Film Transparent option in the Render panel, so what you see here is actually the background.
I then enable Film Transparent and render the scene again.
To get the entire object in grayscale on a transparent background, simply use a value that is not assigned to any object or material for the Index field and set the Grayed parameter to 100%.
However, the background transparency can still be retrieved separately from the Alpha output of the Render Layers node.
You can achieve a colored rendering on a transparent background simply by excluding the Isolated On Gray group by pressing the M key.

Now, by modifying the value in the ID Mask node while the group is active and the Grayed parameter is set to 100%, the object with the corresponding numeric identifier will appear in color, while the rest of the model will be in grayscale.

The two parameters Grayed Contrast and Grayed Brightness allow you to adjust the appearance of the grayscale areas, increasing contrast and brightness, respectively. Increasing the contrast helps reduce details in the rendering areas where they are more evident. This can be useful to avoid distracting the viewer from the colored parts.

Regarding the outlines and cavities of the various elements, we have the Ambient Occlusion mode and a filter that highlights the edges.
The contribution of Ambient Occlusion is adjusted using the Ambient Occlusion Edges parameter, but it can be further enhanced by adjusting the Ambient Occlusion Gamma Boost parameter.

Ambient Occlusion affects the geometry, while the filter used by Secondary Details also acts on Textures, making it useful for emphasizing other types of details.

Like most parameters in Blender, the Index value of the ID Mask node can also be animated, allowing you to create animations similar to the one shown at the beginning of the tutorial.
I am now using a different object, but the functionality of the node group remains the same. The only difference is that, in this case, there is only one object, so the ID separation must be done using submaterials.
First, we need to enable and use the Material Index option in the View Layer Passes panel.
Next, we need to assign different numerical values to the Pass Index fields of the various submaterials in the model. The Pass Index parameter of a material is located in the Settings section of the Material panel.

We can start rendering and use the node group just as we did with the first object.

Alright, that’s all for this first tutorial on this Compositing node group! In the next one, we’ll take a look under the hood to see how these effects are implemented! See you soon!