Page 1 of 1

Differing results for gamma on different nodes

Posted: Tue Dec 29, 2020 5:06 pm
by Kanne
Hi,

i'am having a little trouble to understand how the gamma parameter exactly works, or why some results are different than expected.

Following test setup:
RGB-Image node --> in Input on color correction node --> in Albedo on Random Walk node --> in Medium on Universal Material.

My assumption: It wouldn't matter if i adjust the gamma value on the image node or on the color correction node. Examples:

Gamma on image is set to 1.0 and on the color correction the gamma is 1.5. In the other case the gamma on the image is set to 1.5 and the gamma on the color correction to 1.0.

The results are slightly different in terms of saturation and brightness/contrast (not sure).

Is 1.0 not the normalized value for gamma? Is it 2.2?

Tested using build 2020.1.3.55.

Re: Differing results for gamma on different nodes

Posted: Wed Dec 30, 2020 7:37 am
by bepeg4d
Hi,
in both cases the final Gamma should be 1.5 :roll:
Do you mind to try with the same setup, but connected to Diffuse pin, instead of Albedo in Random Walk Medium node, sharing some screenshots?
Please also try with versions based on 2020.1.5, and or 2020.2-RC6, thanks.

ciao Beppe

Re: Differing results for gamma on different nodes

Posted: Wed Dec 30, 2020 1:25 pm
by Kanne
Ok, sorry for the lack of given material in the original post. I thoughed i just didn't understand something and it wouldn't be a technical issue.

Quite a few issues i experienced while testing:

Appearence is different on Diffuse too like on random walk.
Gamma.png
(Diagonal-Comparison)

Other issues i see:
- Denoising darkens the enviroment or image as whole, didn't have the time to evaluate it No, it's fine, my mistake. :?
- Random Walk keeps being very noisy, even after many samples (for image provided i used 1000)
- Phong-Artifacts / Shadow-Artifacts

Build 2020.2 RC6
Test-File attached

Kind regards

Re: Differing results for gamma on different nodes

Posted: Thu Dec 31, 2020 7:51 am
by funk
Hi Kanne, I had a quick look.

You're plugging the texture into the "brightness" pin, when it should be plugged into the "input" pin (leave the brightness at 1.0).

What youre actually doing is color correcting a "white" input texture (input defaults to 0.7,0.7,0.7) using brightness (for each R,G,B channel).

Your 2 tests are feeding a different input into each gamma control. Try this to see the difference:

- Set all gamma controls to 1.0.
- Connect texture output > diffuse
- Draw a smaller render region to compare the next part
- Connect texture output > color correction brightness > diffuse.

You will see the output of these 2 tests is completely different, and you are using these 2 differences as your starting point.

Re: Differing results for gamma on different nodes

Posted: Thu Dec 31, 2020 1:28 pm
by Kanne
Hi funk,

thank your for pointing that mistake out. That is the issue in the test scene. Kinda embrassing now :? However in my original scene i setted it up correctly, but reviewing it again lead me to my real issue/ false assumption.

My scene where i originally experienced this problem was setup slightly different. Not only did i adjust the gamma, but i also had the brightness on the color-correction node set to a greyscale value other than 1.0. I assume the brightness calculation takes place before gamma correction in the color correction node and therefore is causing the differences.

The plugin i'am using doesn't have the exposure parameter on the color correction node at the moment. But using the exposure parameter instead of the brightness parameter fixes the "issue" again. I guess the exporsure calculation takes place after the gamma calculation.

Glad to understand it now. Thanks for the help :)

Kind regards.

Re: Differing results for gamma on different nodes

Posted: Thu Dec 31, 2020 2:49 pm
by funk
Yeah the internal order of operations will affect the result. I haven't really looked into it to figure out the order.

Assuming brightness happens before gamma, you could use 2 color correction nodes, changing gamma in the first, then brightness in the second.

It would be nice if we could control the order within the color correction node though (like imager > order)