I have noticed that the blackbody node has a 'scale by luminance' in its OSL code.
This is the code:
/* Scale by luminance */ float l = luminance(rgb); if (l != 0.0) rgb /= l; Color = rgb;
What does luminance have to do with the blackbody node?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
Let's look at what Luminance means:
Luminance...is a measure to describe the perceived brightness of a color.
Since luminance is the perceived brightness, not all hues with the same saturation will have the same luminance. The website linked above has a useful image:
From the image above, we can see that even though all of the colors have 100% saturation, their luminance varies a lot. Yellow light (2,800 K) has a luminance of 94%, while blue light (10,000 K) only has a luminance of 57%.
This becomes a problem with the Blackbody node, since its usual purpose is to provide color for Emission shaders and lamps. We don't want lights that are lit at varying temperatures to be perceived as brighter or darker than the others. We'd rather control this on our own with the Emission node.
All of the colors coming from the Blackbody node are divided by their own luminance as a kind of normalization, so that they all have the same perceived brightness.