Page MenuHome

Fix T47212: Use proper coefficients for Luminance Matte Node
ClosedPublic

Authored by Aaron Carlisle (Blendify) on Dec 31 2017, 1:47 AM.

Details

Summary

This patch is a continuation of the work done in D1082

In a private email from Charles Poynton:

Using [0.299, 0.587, 0.114] as _luminance_ coefficients (that is, with radiometric quantities) would be unwise, as modern displays typically do not have the highly chromatic green of 1953, and Ill. C is deprecated today.

So basically everywhere in Blender we are using BT.709 but here we are using BT.601

Here is a sample file:

Fixes T47212

Diff Detail

Repository
rB Blender

Event Timeline

The question from @Sergey Sharybin (sergey) in T47212 was to verify if this node still works equally well on actual green screen footage, like the one from Tears of Steel. Did you try that?

How about we just close this and rename the node to "Doesn't do what the node label is supposed to do" node, then we won't need to commit the three line patch.

@Brecht Van Lommel (brecht) I am a little confused by this because that is not what this node is designed for.
It is not a keying node but a matte node used to remove high or low contrast pieces of an image.
Also, the fact that it might look different should not matter. All this patch is fixing something that
was missed in rBdd38dce7f0ae604396d1e96bc49500369fdedf29

If you look the example file I posted above you can see the difference in weights between the current
the RGBtoBW node and the luminance matte node. So yes it is going to be different but it will be a
correct difference to match the rest of Blender. Besides this code will not go into a release until 2.8.

Update to fix discarding of alpha, also fixes incorrect comment.

The node is called Luminance Key and its purpose is similar to other keying nodes: creating a matte.

With some testing someone might have found that changing ConvertRGBToYUVOperation to ConvertColorToBWOperation does more than just change the luma coefficients. It also discards the alpha channel used by LuminanceMatteOperation. Or maybe that bug might still have been missed, but the point is that testing real world footage helps reveal unexpected bugs.

@Troy Sobotka (sobotka), if you don't have anything constructive to say don't comment.

This revision is now accepted and ready to land.Jan 1 2018, 3:16 AM
This revision was automatically updated to reflect the committed changes.