Author Topic: Issue with "Invert colors" option in Corona Color Correct Texmap  (Read 1707 times)

2022-04-30, 03:52:49

Basshunter

  • Active Users
  • **
  • Posts: 279
    • View Profile
I'm trying to convert a glossiness map into a roughness map by using the "invert colors" option on a Corona Color Correct Texmap. However, this gives me different results than just using the "invert" option on the texture itself. Am I missing something?

Please see attached images, where Image 01 is using "invert" option on the texture and Image 02 is using Corona Color Correct.

2022-04-30, 14:07:36
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8834
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Invert colours in Corona Colour Correct is not linear. If you want to convert between roughness and glossiness, you need either reverse the curve in CCC curve editor, or use 3ds Max native output node and turn on invert option.

You can read more about this here: https://forum.corona-renderer.com/index.php?topic=28250.0
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-04-30, 16:01:28
Reply #2

Basshunter

  • Active Users
  • **
  • Posts: 279
    • View Profile
I see. Still trying to wrap my head around this whole gamma thing.

How can I do this in PS? I guess just using the invert option (Ctrl+I) in PS will give me the same unwanted result as the CCC invert option.

2022-04-30, 16:16:16
Reply #3

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8834
  • Let's move this topic, shall we?
    • View Profile
    • My Models
AFAIK you should be good to simply invert the texture in photoshop.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-04-30, 16:26:03
Reply #4

Basshunter

  • Active Users
  • **
  • Posts: 279
    • View Profile
Following your logic that the problem is that the "invert option" in CCC is not linear, PS would give me the same "incorrect" result since its invert option is not linear either, no?

Take a look a the attached images. Photoshop result is the same a CCC result.

2022-04-30, 16:28:25
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8834
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Did you load all the textures with gamma 1.0?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-04-30, 16:31:20
Reply #6

Basshunter

  • Active Users
  • **
  • Posts: 279
    • View Profile
No. The original glossiness map was not created to work in gamma 1.0

2022-04-30, 16:36:32
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8834
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Are you sure about that? Usually data maps are ALWAYS needs to be loaded with gamma 1.0
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-04-30, 16:44:41
Reply #8

Basshunter

  • Active Users
  • **
  • Posts: 279
    • View Profile
I know. But this how the model came from Renderpeople. Probably they modified it at some point to get this map to work with gamma 2.2 instead of 1.0. That's my guess.
« Last Edit: 2022-04-30, 16:51:43 by Basshunter »

2022-04-30, 19:13:55
Reply #9

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8834
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I have that same model, so i did quick test and i think you're right on both points - the glossiness map indeed looks like it's authored with 2.2 gamma and inverting it in photoshop does not make a proper roughness map out of it. I don't know why they took so odd decision, because it complicates things a lot. If glossiness would be authored with gamma 1.0, like it is in 99% cases, simple invert operation in photoshop would work correctly. Now however, your only option is to reverse the curve in Corona color correct, or to use output node.

P.S. is there specific reason why you can't or don't want to use glossiness and feel the need to convert it to roughness?
« Last Edit: 2022-04-30, 19:19:40 by romullus »
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-04-30, 20:42:25
Reply #10

Basshunter

  • Active Users
  • **
  • Posts: 279
    • View Profile
P.S. is there specific reason why you can't or don't want to use glossiness and feel the need to convert it to roughness?

I'm just trying to stick to roughness maps just to keep some consistency on my workflow/library. Not a big deal I guess.

Still wonder if there's some way I can use PS to turn this 2.2 glossiness map into a 1.0 roughness that gives me the same exactly result.


2022-04-30, 22:42:02
Reply #11

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8834
  • Let's move this topic, shall we?
    • View Profile
    • My Models
First you need to remove gamma from it, then invert and save. Just keep in mind that after this operation, you will need to load the new texture with gamma 1.0
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-04-30, 23:18:00
Reply #12

Basshunter

  • Active Users
  • **
  • Posts: 279
    • View Profile
First you need to remove gamma from it, then invert and save. Just keep in mind that after this operation, you will need to load the new texture with gamma 1.0

I added an Exposure adjustment layer in PS and set "gamma correction" to 2.2. Is that the right way to remove gamma?
After that I saved the image and loaded it in Max as gamma 1.0. Result is similar but not the same unfortunately.

Maybe I'm doing something wrong.

2022-04-30, 23:49:18
Reply #13

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8834
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I don't have photoshop, but i think your procedure is correct. How far is your result from truth? Unfortunately there's no way to know what curve has been applied by original creator, i guess you'll have to try and match the curve, or live with what you have.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures