This is less of a tutorial and more of a quick deep dive into converting color images to grayscale in Blender’s Compositor.



Video Transcript

Hello everyone! This is less of a tutorial and more of a quick deep dive into converting color images to grayscale in Blender’s Compositor. There are several ways to do this, depending mostly on the color space being used.

The first method is actually the one you shouldn't use, because it doesn’t take into account how real light energy is perceived by our eyes depending on the different wavelengths of light. I'm talking about using the Hue Saturation Value node, specifically by setting the Saturation value to 0. This has the effect of uniformly removing color components across the three RGB channels, resulting in a high-contrast black and white image where some detail might be lost.

The second method involves using an RGB to BW node in Blender’s Compositor, which gives a more pleasing result and is especially suitable for renders produced in Blender or, more generally, in any context where you're working with linear RGB data, such as in Linear Workflow pipelines.

This node implements a formula, meant to be used in the Linear color space, where the individual color components are multiplied by three different coefficients: 0.2126, 0.7152, and 0.0722.

On screen, I'm showing the contents of a node group. Inside this group, I’ve recreated the breakdown of the color image into the three RGB channels, followed by the multiplication of each channel by its corresponding coefficient, and finally the summation of the various results to arrive at the final output.

As you can see, the result of this node group is essentially identical to what you get from the RGB to BW node, which confirms that this is indeed the formula it uses. As mentioned earlier, this is the photometric luminance formula, that is, actual light energy, based on the Rec.709 standard, meant to be used with linear color data, without gamma correction, such as in Blender renders.

At this point, you might point out that the image I’m using for the examples isn’t a render produced by Blender, but a photograph loaded into Blender using an Image node, which uses sRGB as its color space. So in theory, I should be using the Rec.601 standard formula, historically associated with SD content, to process this image. However, as far as I know, Blender automatically converts it to linear space, so you can safely use the RGB to BW node.

Just for the sake of completeness, in the Rec.601 standard the weights for the RGB channels are 0.299, 0.587, and 0.114, respectively.

On screen, I'm showing the difference between the output from the Linear node group, which implements the same formula used by the RGB to BW node, and the output from the sRGB node group, which instead uses the Rec.601 standard formula.

In general, the purpose of this node group is to show how you can customize the weights of the RGB color channels based on your artistic needs or to match other standards. For example, in the Rec.2020 standard, used for 4K and 8K HDR, the weights for the RGB channels are 0.2627, 0.6780, and 0.0593 respectively.

Before wrapping up the tutorial, I want to point out that when Blender displays or exports an image, like in PNG or JPG format, it applies a transformation, such as Filmic or sRGB, which converts the linear values back into gamma-corrected space. Blender therefore converts any external images into the Linear Workflow so they can be processed consistently alongside the render and other elements in the Compositing stage. Then, if necessary, it applies conversions into other color spaces at export time.

Unlike most of my video tutorials, a PDF version of this one is not currently available for download. However, you’ll find a link in the description that leads to a page containing the PDF versions of many of my other video tutorials. In any case, this is a great time to subscribe to the channel and turn on notifications!

Alright, that’s it for this short tutorial! I hope you found it useful! See you soon!

Search Tutorials

Enter a phrase or multiple comma-separated keywords to search.

This is a personal website and does not constitute a sales channel. The pages dedicated to 3D models document a selection of my work and do not contain offers, prices, purchasing procedures, or commercial links. I am not currently accepting requests for custom work, consulting, or other professional collaborations.


EXTENDED PRIVACY AND COOKIE USAGE POLICY