-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filmicrgb: fix norm handling in v6 #11480
filmicrgb: fix norm handling in v6 #11480
Conversation
|
This should fix issues like the one reported in #10976 (comment) |
You are not. Good job ! |
|
I think this is correct as-is but something could still be done to make the transitions a bit smoother. I'm thinking about it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
|
did not change the behaviour as described in #10976 (comment) |
|
@piratenpanda thanks for the report. Do you happen to have a raw file + XMP you could share where this behaviour is seen? |
|
Ok might as well be user error. If I lower the white value I can recreate the v5 look now. Sorry for the noise. That's most likely expected behaviour that the white points are different for v5 and v6. |
We need to clamp the RGB norm before calculating ratios. Otherwise things like this can happen:
max RGBnorm and input pixels(1, 1, 1)and(1, 1, 2). Filmic white is set such that the source white is at(1, 1, 1).(1, 1, 1),(0.5, 0.5, 1).[0, 1]range at some point. Now both norms have value 1.(1, 1, 1)and(0.5, 0.5, 1). This is bad as the original blue pixel was brighter than the white!To remedy this, we already clamp the norm before calculating the ratios. This way when the ratios are restored, they will retain their brightness ordering. Gamut mapping takes care of finally clamping the brightest highlights back into the target range. I don't know if dumb clamping like this is the best solution, but the filmic curve is not really well defined outside the designed dynamic range i.e. it doesn't extend above the source white point value. Correct me if I'm wrong, please. From brief testing I find the white point adjustment in filmic behaving now much more like I would expect it to - the brightest parts will eventually turn white when bringing down the white point slider. Without this PR, this is not always the case.
This behaviour exists also with the earlier filmic v5 revision but probably the mandatory desaturation has masked this issue.