Gamma correction serious issue


#1

Why is there still a difference between images rendered with materials texture corrected with the gamma correct node, and images rendered with “enable color management” mode turned ON (without the gamma correct nodes this time)? There is still a slight difference between the 2 renders, where does it come from? Isn’t the exact calculation/sampling happening in both methods?

http://sor.typepad.com/.a/6a00d8350600cb53ef01a511ca0bcc970c-pi
http://sor.typepad.com/.a/6a00d8350600cb53ef01a73dd54e85970d-pi

       [http://www.filefactory.com/file/3dcwiykfu08l/7_gamma_correction_issue.7z](http://www.filefactory.com/file/3dcwiykfu08l/7_gamma_correction_issue.7z)

#2

gamma 2.2 and sRGB curves differ slightly. Most people opt for a 2.2 gamma in the correction node, while the color management uses the proper sRGB curve. Might this cause the discrepancy that you notice?


#3

To my knowledge the sRGB color profile has a 2.2 gamma curve encode in it.
Even if its different, I am not sure if this is the cause of the difference but I certainly want to.


#4

In this image you can see the different curves for the most common colorspaces.
sRGB and gamma 2.2 are very close to each other, but, as you can see, there are some differences.


#5

thanks alot Luca, this graph is worth a 1000 words.
But at the same time, I am a bit confused, I thought gamma2.2 ans sRGB meant the same thing. What about all the JPEGs on the internet, do they have a gamma 2.2 curve encoded into them or a sRGB curve?
And when I enable “enable color management” in render globals what gamma correction is MR applying to the textures? is it a 0.454 value or something else?


#6

Hi!

I think that maya is using a sRGB curve to correct the textures when you activate the color management (and select sRGB eheh).

As for “how are the jpg you find on the internet encoded” I think it depends on how the user decided to because there are many standards (sRGB, Adobe sRGB, ecc ecc, just take a look at the color settings in photoshop…).

Check this discussion here, I think it will help you :thumbsup:


#7

Ok but the does the sRGB profile has a specific gamma value (something else instead of 2.2)?


#8

Not really, the actual math behind the two is quite different.

Gamma 2.2 is just a power function:

output = pow(input, 2.2)   # this is done per channel

while sRGB depends on the initial value of the pixel (some pseudo code follows)

if input > 0.04045: 
    output = pow((input + 0.055) / 1.055, 2.4)
else:
    output = input / 12.92

If the initial pixel is brighter than 0.04045 you use something similar to gamma 2.4 (please note that you add 0.055 first and divide it by 1.055).
If it is darker, you just divide it by 12.92.


#9

Thanks alot for the info, it makes sense now.


#10

that leaves me with one more question.Whats the difference between sRGB and linear sRGB?