This is the second 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 and optionally highlighting edges or cavities.
Video Transcript
Hello everyone! This is the second 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 and optionally highlighting edges or cavities.
In the first tutorial, I showed you how to use the node group, which you can download for free from the link in the description. In this second tutorial, we will take a look inside the group to see how the various effects are implemented.
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 upcoming video tutorials!
By opening the group with the TAB key, we can see that the effects are implemented in the left column of nodes. Some of these nodes are actually groups. The nodes on the right side of the column are only used to add the effects to the image sequentially.

As seen in the previous tutorial, the node group essentially performs three operations. First, it isolates an object or Material, keeping it in color while converting all other elements to grayscale.
As a second effect, the group takes the Ambient Occlusion information from the render to emphasize cavities and edges.
As a third effect, the group uses a filter to further enhance other details, especially those present in Textures rather than in the geometry.
To separate the elements with an ID matching the input from the rest of the image and keep them in color, the original image is multiplied by the mask coming from the ID input. Then, the same ID mask is used as the Alpha transparency, so at this stage, we have only a portion of the rendering in color on a transparent background.

To obtain the entire original rendering in grayscale, the information from Image is sent, along with the Grayed Contrast and Grayed Brightness data, to the Grayed Base subgroup.
Inside this subgroup, the image is desaturated using a Hue Saturation Value node, with Saturation set to 0, resulting in a grayscale image. Then, a Brightness Contrast node is used to adjust the brightness and contrast of this image.

This image will then have detail layers applied sequentially, derived either from Ambient Occlusion or the Laplace filter, which we will examine shortly.
The final grayscale image, obtained after applying those additional effects, has a variable intensity controlled by the Grayed input as a percentage. This input is a numerical value ranging from 0 to 100, which is divided by 100 so it can be used as the Factor in an Alpha Over node.
In this Alpha Over node, the first Image input is actually complete transparency, created with a black color and Alpha set to 0. When the Grayed value is 0, only this complete transparency is used. When it is 100%, meaning the Alpha Over Factor is 1 due to the division, only the grayscale image is used. Intermediate values naturally correspond to blended transitions between the two.

The image output from this Alpha Over node then serves as the grayscale base, onto which the color image of the correctly ID matched elements is applied. This is done using a second Alpha Over node.
Now that the processing flow is clear, we just need to examine the operations performed by the Ambient Occlusion and Laplace From Image subgroups, which help highlight edges and cavities.
Before analyzing them in detail, I'll mention that these subgroups generate black and white masks that are sequentially multiplied with the grayscale rendering. Multiplying an image by another grayscale image effectively darkens the original image in areas where the second image is progressively darker.
The Divide nodes you see before the Factor inputs of the multiplications are simply used to bring the input values back into the 0 to 1 range, since I expressed them as percentages for easier usability. With that said, let's examine the two remaining subgroups in detail.
To analyze the steps and the output of the Ambient Occlusion subgroup, I am connecting its output directly to the main group’s output.
The Ambient Occlusion group takes as input the Ambient Occlusion data from Render Layers and a numerical value called Gamma Boost, which allows the Ambient Occlusion mask to be emphasized.

The Ambient Occlusion data is immediately sent to a Denoise node to reduce noise. The result is then passed to a Filter node in Laplace mode, which highlights the edges.
The Laplace result shows bright edges and a dark background, but we need the opposite because we will multiply the dark edges with the grayscale image to darken them further. For this reason, the Laplace output is sent to an Invert Color node, followed by a Gamma node that further enhances the dark areas based on the user-defined Gamma Boost parameter.

A Dilate Erode filter follows, slightly expanding the dark areas to maintain continuity in places where the lines might otherwise be broken.

Now, I exit the Ambient Occlusion subgroup and connect the output of the Laplace From Image subgroup directly to the main group’s output to examine its steps and final result.
The inside of the Laplace From Image subgroup is very similar to that of Ambient Occlusion. Here too, we have Filter Laplace, Denoise, Invert Color, and Dilate Erode nodes performing the same operations we described in the Ambient Occlusion subgroup.

However, in this case, the first step is a Hue Saturation Value node with Saturation set to 0, which converts the input image to grayscale. This step was unnecessary for Ambient Occlusion, as that information is already in grayscale.
The grayscale image is then processed with the Laplace filter, followed by a Denoise node to remove noise.

The second unique element of this subgroup is the Greater Than node, which essentially acts as a threshold, turning all gray areas below a very low value to black and making all other areas white.

The mask has white edges on a black background, so an Invert Color node is used, followed by a Dilate Erode node to reduce interruptions between lines, just like in the Ambient Occlusion subgroup.

To summarize, the image is converted to grayscale by the Grayed Base subgroup.

The resulting image is then multiplied sequentially by the masks generated by the Ambient Occlusion and Laplace subgroups.


The final resulting image has a transparency level determined by the Grayed input in an Alpha Over node.

The color image of the elements with the correct numerical ID, whether objects or materials, is then overlaid onto this result.

That’s all for this tutorial! I hope you found it useful! See you soon!