Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: cjwidd on 2020-03-18, 23:42:43

Title: Corona Color Correct: Roughness -> Glossiness
Post by: cjwidd on 2020-03-18, 23:42:43
When converting Roughness to Glossiness, it is not correct to 'invert' using the Corona Color Correct map, but you can 'flip' the white and black points using the curves(?)

EDIT: 'flip' the white and black points using the curves, but you can 'invert' using the Corona Color Correct map(?)
Title: Re: Corona Color Correct: Roughness -> Glossiness
Post by: romullus on 2020-03-19, 10:56:20
Why it is not correct to invert using Corona CC node and what is the difference between "inverting" and "flipping black and white points in curve editor"?
Title: Re: Corona Color Correct: Roughness -> Glossiness
Post by: cjwidd on 2020-03-19, 20:16:51
'correct' might be a loaded term in this case, but the results are different - I just don't understand why(?)

Curves
(https://i.imgur.com/ZlZAZLK.png)

Invert
(https://i.imgur.com/FvRW7Lm.png)
Title: Re: Corona Color Correct: Roughness -> Glossiness
Post by: romullus on 2020-03-19, 20:34:31
Indeed, you're right. I've compared it to the max's native output node and it looks like invert colours in Corona CC node is broken. Moving topic to bug reporting.
Title: Re: Corona Color Correct: Roughness -> Glossiness
Post by: TomG on 2020-03-19, 23:07:20
Haven't tried the native Max, but I did this - took a bitmap, put it through two Corona Color Corrects, one using Invert, one using the "reversed curve". I then screengrabbed, copy-pasted into Photoshop, duplicated, and inverted the duplicate there. The Corona Color Correct invert, once inverted again in Photoshop, matches the original (and the Photoshop Invert matches the Corona Color Correct invert).

The Corona Color Correct curve change, however, looks very different from the Photoshop invert result. So, to me, it looks like the Invert in the Corona Color Correct is working as expected, and either there's a problem with the curve, or there's just a misunderstanding as to what the curve does. As to what Max native invert is doing, not sure :)
Title: Re: Corona Color Correct: Roughness -> Glossiness
Post by: cjwidd on 2020-03-20, 03:17:41
Perhaps that is the question, what does it mean to 'flip' the curve handles as I did in the original post? I thought it would just be an invert(?)
Title: Re: Corona Color Correct: Roughness -> Glossiness
Post by: maru on 2020-03-20, 10:46:14
I will take a closer look at this, but my first thought is that most likely this is related to this phenomenon:
https://forum.corona-renderer.com/index.php?topic=19997.msg144961#msg144961

So it's probably gamma-related and/or filtering-related.
Title: Re: Corona Color Correct: Roughness -> Glossiness
Post by: romullus on 2020-03-20, 10:50:11
Tom, when you test it in photoshop, don't forget that inevitably there's gamma involved. I did my test in linear and i think, it's pretty obvious which node is broken (see attachement).

Perhaps that is the question, what does it mean to 'flip' the curve handles as I did in the original post? I thought it would just be an invert(?)

You are correct - swapping curve's endpoints = invert.
Title: Re: Corona Color Correct: Roughness -> Glossiness
Post by: Juraj on 2020-03-20, 10:52:18
The issue here could be that Roughness map by standard, is authored at Gamma 1.0 (technically glossiness should be too but that isn't any standard and everyone uses gamma arbitrarily).

So if you want to convert Quixel/Substance Roughness map into correct and expected glossiness result, you need to also use gamma outside of invert, because the invert alone is only in sRGB space (it's in sRGB space tab).
Title: Re: Corona Color Correct: Roughness -> Glossiness
Post by: maru on 2020-03-20, 12:31:10
Juraj's explanation seems to be correct. It seems that "invert colors" and "invert curve" operate in different gamma/color space.
I am attaching an example with a possible workaround.
I will now report it to the devs, but keep in mind that this may be the expected behavior.

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=28250.0;attach=121751;image)


(Internal ID=480940238)
Title: Re: Corona Color Correct: Roughness -> Glossiness
Post by: cjwidd on 2021-01-16, 11:48:21
Man, this came back to bite me *again*. Maybe there should be a warning in the curve editor(?) Was there some consensus from the devs about this, or is it too niche of an issue, or already well understood by most of the user base?