spikeyxxx

9 answers · asked · Lesson: Using Blender's Shader Editor · Course: Fundamentals of Blender Materials and Shading

Color output into Value socket

mmin 6:00 you say that when you take a yellow output and plug it into a grey input socket, it takes the Value of the Color. This is not correct: it takes the Luminance of the Color. The same would be if you insert a RGB to BW in between (that node also calculates the Luminance). So it is a rather unintuitve result and imho should be avoided (the other way around is perfectly fine of course).

Blender calculates the Luminance according the ITU-R standard: 0.2126R + 0.7152G + 0.0722B.

(Actual luminance is subjective...)

  • Wow, this is once again a very precise description from spikeyxxx of what is Blender doing "under the hood" 👍! 


    PS: Do you know the difference between "Brightness", "Luminance" and "Value" (HSV color description model)?

  • Luminance is the perceived brightness of a color.

    Value is the highest value of the three channels red, green and blue (nowadays in Blender set to the power of about 0.444).

    Lightness (in HSL color model) is the average between the lighttest and darkest channel of the RGB (again set to the power of 0.444).

    In the 'old days a RGB of (0.5, 0.5, 0.5) used to correspond to a Value of 0,5, but that has changed.

    Bartek Skorupa explains it really well. Look in the courses by him, I forgot the exact titel, but there is only one here on CGCookie.

    • Thank you, spikeyxxx, for these explanations. Just one mathematical question: I raising X to the power of Y/Z the same as taking the Z-th root of X raised to the power of Y?

      To your course recommendation: I  only remember Bartek Skorupa explaining here on CG Cookie as a guest author at the end of a texturing course how to create a procedural wood texture . Is this what you're meaning?  

    • It's old, but has a ton of useful information in the whole course, but here he explains Value and Luminance and so on:

      https://cgcookie.com/lesson/hue-saturation-lightness-luminance

      As for the math: yes, that is the same; x to the power 1/2 is the same as the square root of x and this leads to the more general form that you described.

    • spikeyxxx  Excellent course by Bartek Skorupa 👍 judging from what I've seen so far! He explains everything very detailed and clear in a very friendly tone 😀. 

      You said that value is the highest value of the three channels red, green and blue and that this value is nowadays in Blender set to the power of about 0.444. My question: How does setting the "Value" in the HSV color model influence the RGB representation of the same color?

    • duerer I am not exactly sure how this is calculated but when you have RGB = (1, 0.5, 0.5) for instance the Value is of course 1.

      When you then lower the Value to 0.735, the red, green and blue channels all get reduced to about half their values.

      To be more exact: (0.5, 0.253716, 0.253716). 

      With RGB 0 (1, 0.8, 0.2) you get, if you reduce the Value to 0.735;

      (0.5, 0.401725, 0.104275).

    • Thanks spikeyxxx for these comparisons between HSV and RGB. It's really a science of its own 😉!

  • crew

    Ah shoot, thanks for the catch sspikey !!  Excellent explanation.