sRGB <> Linear Nodegroup

I tested complex math nodes for sRGB <> Linear conversion.
Here is no node in Blender that can do this (if you don’t use Color Management)
Math is bit more complex than just pow(srgb, 2.2)…
It is not really fast - but should work

“sRGB To Linear” and “Linear To sRGB” are for one channel
“sRGB To Linear x3” and “Linear To sRGB x3” are for color


Attachments

nodes.blend (91.5 KB)

I forget, what is wrong with the internal handling of color management?

sRGB is not linear. :stuck_out_tongue:

http://www.qvolabs.com/Digital_Images_ColorSpace_Log_vs_Linear.html

:slight_smile: that depends if by sRGB you / someone means color space ie: sRGB color primaries or transfer curve applied, whether it’s sRGB with reference to images (sRGB primaries defining sRGB color space and 2.2 gamma curve applied) or HD video. (sRGB primaries defining sRGB color space and rec709 transfer curve).

You can have linear sRGB and that’s exactly what blender does, it takes a 2.2 gamma encoded image, removes the gamma curve, processing in linear light and then it reapplies 2.2 gamma to image formats that should be gamma encoded and leaves other formats that should be linear light like EXR as linear light. EXR’s can still sRGB primaries but linear.

So back to the OP, Blender uses the ‘wrong’ linearizing maths for HD video, which was originally encoded with a rec709 transfer curve not 2.2 sRGB gamma, so if the values in the noodle we’re amended to suit rec709 it’d be more useful maybe, but it’s still a good exercise in maths. :slight_smile: