Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: Avan on 2016-04-13, 00:03:29

Title: Roughness maps
Post by: Avan on 2016-04-13, 00:03:29
Hello! I use a pack of textures for recreating some ground effects like this. (http://real-displacement-textures.com/info.html) But i do not know where i should put Roughness map and what can i do with IOR value. Could anyone give me the advice? I've read some information about PBR materials but it is kinda hard for me to understand all about it. I want to see the right result on material and not to use many hardware power for calculating. Texture pack hasn't got any IOR maps for converting like this way (http://polycount.com/discussion/155524/pbr-basecolor-metallic-to-vray-3-2-corona-redshift-arnold-converter). Must i choose IOR from my previous experience or use special technics for such textures pack (ground recreate)?

Title: Re: Roughness maps
Post by: dubcat on 2016-04-13, 01:48:31
Normally the roughness map should be an inverted version of the glossiness map, in this case it is not. My guess would be that this is for the "old" roughness that v-ray has for Blinn/Ward BRDF.

Take a look at my Substance Painter 2 Profile and Starter Guide (https://forum.corona-renderer.com/index.php/topic,11377.0.html) thread for IOR / Glossiness guidelines.
You basically need to plug the glossiness map into a "GGX Output" and leave IOR at 1.5.
Title: Re: Roughness maps
Post by: Avan on 2016-04-13, 09:41:59
Thank you dubcat ! I've seen all of your articles at our forum already :) Great explanation. Simply i did not know all features of that type materials and corona restrictions for it.
I would like know all of this features in near future :) It is rather interesting for me and my work.
Title: Re: Roughness maps
Post by: Juraj on 2016-04-13, 10:15:53
My guess would be that this is for the "old" roughness that v-ray has for Blinn/Ward BRDF.


Not in this case. I don't think anyone, at any time provided such texture :- ) It is, a roughness in PRB terms.

It's his "Gloss" that throws it off, because that really is just specular texture for 1.52 IOR workflow. The incorrect way ;- )
He just combined his old workflow (clamping specularity) to PBR and kept zombie version of it.

So the correct way imho is to invert his 'roughness' map and then plug it into your setup.

Title: Re: Roughness maps
Post by: dubcat on 2016-04-13, 11:11:27
Juraj_Talcik is correct.
After zooming in on one of the overview pictures I see that "Gloss" is the same as "Reflection Color" and "Roughness" is the standard inverted Glossiness map.
What a mess !

I'm downloading one of the demo packs right now, need to see how these look.
Title: Re: Roughness maps
Post by: Avan on 2016-04-13, 11:43:05
This all look messy) If you will be able to explain how to use  this maps in a right way i'll be very thankful you. Bumps, normals and depth (displacement) working perfect. Only misunderstanding with correct IOR settings.
Title: Re: Roughness maps
Post by: dubcat on 2016-04-13, 13:09:11
Here is my quick little test with the demo texture.

I had to lower IOR down to 1.33, since Corona does not dim the IOR. (Maybe 1.43 or something like that would be better)

(http://i.imgur.com/LgaDPUO.png)

The maps should be linear, but I'm not sure if they are. I loaded them with gamma 1.0

Not flipped normal                                                                                                                                              flipped normal

(http://i.imgur.com/nRSUopg.jpg) (http://i.imgur.com/8EV2slf.jpg)

EDIT: Added 1.4 IOR just for comparison.

(http://i.imgur.com/vQO3dpI.jpg)
Title: Re: Roughness maps
Post by: Juraj on 2016-04-13, 13:32:14
Most often with micro detail, I can't tell when normal map is incorrect.

Should we take it for granted, that every time we use modern normal map, we have to Flip Green channel (Y) by default inside Corona ?
Title: Re: Roughness maps
Post by: Ondra on 2016-04-13, 14:16:48
I can make the checkbox on by default, would that be OK?
Title: Re: Roughness maps
Post by: dubcat on 2016-04-13, 14:21:58
I can make the checkbox on by default, would that be OK?
That would be great!
Title: Re: Roughness maps
Post by: Avan on 2016-04-13, 17:04:48
Thanks again Dubcat ! Is there any curve tweak at your "output/ggx fix" map?
Title: Re: Roughness maps
Post by: dubcat on 2016-04-13, 19:22:17
Thanks again Dubcat ! Is there any curve tweak at your "output/ggx fix" map?
It's the default "GGX Output" from Corona Converter. It's also included in the .mat in the Substance thread.
Title: Re: Roughness maps
Post by: dubcat on 2016-04-14, 03:31:34
I've made a LUT that you can apply to any glossiness map that is using IOR 1.5. This will simulate the proper IOR dimming behavior that Coronas GGX is missing.
If your material is using Roughness, remember to invert it before you apply the LUT in Photoshop.
Load the IOR map with gamma 1.0.

This is how the cobble stone should look like with 1.5 IOR. The dirt is very rough even though it has IOR 1.5.

(http://i.imgur.com/SYj2nia.png)

This is how the cobble stone look like with 1.5 IOR in Corona. The dirt is washed out and glossy.

(http://i.imgur.com/HRqde1v.png)

This is how the cobble stone will look like in Corona when you use my "IOR Fix LUT". The dirt is behaving as it should, yey!

(http://i.imgur.com/QK9J7wE.png)

HOW TO

Apply the LUT above the Glossines map in Photoshop (Change to 16 bit for best result)

(http://i.imgur.com/TVfWrfg.png)

Magic

(http://i.imgur.com/z6Z792R.jpg)

Load the IOR Fix Map with Gamma 1.0

(http://i.imgur.com/r9EX1Hj.jpg)

Open in a new tab to see the difference.

(http://i.imgur.com/6S0bPDA.jpg)(http://i.imgur.com/zesZ15u.jpg)
Title: Re: Roughness maps
Post by: romullus on 2016-04-14, 09:35:00
Let's hope that Ondra and his team will bring us glossiness fix as promised soon and will make your workaround redundant :]
Excellent stuff nonetheless!
Title: Re: Roughness maps
Post by: Juraj on 2016-04-14, 10:36:35
That would be great.

Honestly I think this is needlessly complicated workaround (also destructive), that requires creation of new map individually for each material.

I actually remade my material library with your IOR lowering technique. So rough materials of 1.52 go to +/- 1.3 on scale of their roughness. Now the materials actually look as they should.

Still, one day I'll have to remake them again....
Title: Re: Roughness maps
Post by: racoonart on 2016-04-14, 10:44:53
I must admit that I have not followed the whole pbr discussions over the last couple of months, so I might not know what I'm talking about but wouldn't it be easier to just insert an output map (like my ggx conversion) instead of destructively alter maps in PS via a Lut ?
Title: Re: Roughness maps
Post by: Juraj on 2016-04-14, 10:51:25
All we need is for the current IOR model to become part of 'legacy' check-box. That would be seamless integration of correct behaviour without affecting anyone's workflow or destructing past materials (since the IOR behaves likes this from early Ashikmins' model as well).

That's not PBR. That's just how the specularity should behave. It's bug, issue.
Title: Re: Roughness maps
Post by: lacilaci on 2016-04-14, 10:55:44
I've made a LUT that you can apply to any glossiness map that is using IOR 1.5. This will simulate the proper IOR dimming behavior that Coronas GGX is missing.
If your material is using Roughness, remember to invert it before you apply the LUT in Photoshop.
Load the IOR map with gamma 1.0.

impressive, what does the LUT actually do??
Title: Re: Roughness maps
Post by: racoonart on 2016-04-14, 11:09:25
impressive, what does the LUT actually do??
Title: Re: Roughness maps
Post by: lacilaci on 2016-04-14, 11:53:34
the moment I saw your picture I realized that I could've just loaded the lut in the live curves in photoshop to see that... Sometimes I'm just so slow thinking :D... thank you :)
Title: Re: Roughness maps
Post by: Avan on 2016-04-14, 12:25:21
Guys, i am really impressed depth of your knowledge. Thank you very much. With the last IOR lut fix material is looking perfectly.
Title: Re: Roughness maps
Post by: dubcat on 2016-04-14, 13:17:56
I must admit that I have not followed the whole pbr discussions over the last couple of months, so I might not know what I'm talking about but wouldn't it be easier to just insert an output map (like my ggx conversion) instead of destructively alter maps in PS via a Lut ?
I was actually going to send you a PM when I got back online.
Would be awesome if you could add a little "IOR Fix" button or something to the Converter.

I sampled every glossiness value from 1-0.
Here's the range and values.

Glossiness 1.00 - 0.26 should be mapped to 187 RGB aka IOR 1.50
Glossiness 0.25 - 0.14 should be mapped to 194 RGB aka IOR 1.42
Glossiness 0.13 - 0.00 should be mapped to 205 RGB aka IOR 1.33

When the image is loaded as gamma 1.0 the RGB is 212, 217, 225

This output should connect to the same map as the GGX Output and not after the GGX Output.

I'm using the LUT non destructively with the "VRayLut map", but not everyone has vray installed.
"Convert to log space before applying LUT" need to be disabled in the map.

(http://i.imgur.com/R8RIlus.jpg)
Title: Re: Roughness maps
Post by: Ondra on 2016-04-14, 15:21:28
Let's hope that Ondra and his team will bring us glossiness fix as promised soon and will make your workaround redundant :]
Excellent stuff nonetheless!
we have it done. But we will probably wait for 1.5 so there is enough time to test it
Title: Re: Roughness maps
Post by: dubcat on 2016-04-14, 15:41:24
we have it done.

(https://media.giphy.com/media/EOpZ7XsVfTN2E/giphy.gif)
Title: Re: Roughness maps
Post by: Juraj on 2016-04-14, 15:51:05
Let's hope that Ondra and his team will bring us glossiness fix as promised soon and will make your workaround redundant :]
Excellent stuff nonetheless!
we have it done. But we will probably wait for 1.5 so there is enough time to test it

Can't we get a Daily of 1.4 that has it feature ? Just 1.4 + this.
Title: Re: Roughness maps
Post by: Ondra on 2016-04-14, 16:01:00
It's a pandora box, because meaning of the most crucial numbers will change. So I will not release it until 1.4 stable is out
Title: Re: Roughness maps
Post by: Juraj on 2016-04-14, 16:08:25
Ah, I just wrote it stupidly then. I did meant after 1.4 is out.
Title: Re: Roughness maps
Post by: Ondra on 2016-04-14, 17:09:51
yep, it will be probably one of the first updates after 1.4
Title: Re: Roughness maps
Post by: guest_guest on 2016-04-14, 18:21:45
Magic
(http://i.imgur.com/z6Z792R.jpg)

Load the IOR Fix Map with Gamma 1.0

(http://i.imgur.com/r9EX1Hj.jpg)

hi dubcat,

is any simpler way to get this? like as an output node with tweaked curve or something like this?
Title: Re: Roughness maps
Post by: dubcat on 2016-04-14, 19:18:35
is any simpler way to get this? like as an output node with tweaked curve or something like this?
This is how you recreate the LUT with an Output map :)

(http://i.imgur.com/YuV7iX2.png)
Title: Re: Roughness maps
Post by: guest_guest on 2016-04-14, 19:27:13
is any simpler way to get this? like as an output node with tweaked curve or something like this?
This is how you recreate the LUT with an Output map :)

(http://i.imgur.com/YuV7iX2.png)

Woooow ... ;)
Title: Re: Roughness maps
Post by: Torsten on 2016-04-16, 16:20:00
Just a question about your nice examples. Do you use also displacement? I can't see it in the material itself, so do you apply it on the object? Or is the nice displacement that can be seen just the result of the normal mapping in bump?
Title: Re: Roughness maps
Post by: dubcat on 2016-04-16, 19:13:57
I used "CoronaDisplacementMod" on  the mesh

(http://i.imgur.com/cemnEug.png)

The displacement map is not a proper 32 bit map, so you have to play around with the strength.
Title: Re: Roughness maps
Post by: Avan on 2016-04-19, 21:09:01
Is there any differences between map inside material or corona dispacement mod modifier? (speed, use scenarios)
Title: Re: Roughness maps
Post by: maru on 2016-04-20, 12:24:46
Is there any differences between map inside material or corona dispacement mod modifier? (speed, use scenarios)
None.

The difference is obvious - you can use material displacement per-material, and modifier displacement per-object. So you can for example put one material on different objects, and then assign the modifier to have different kinds of displacement od different objects, despite the same material assigned to all.
You can also do it using the multi map. :)
Title: Re: Roughness maps
Post by: Avan on 2016-04-22, 09:34:56
Thank you, Maru!
Title: Re: Roughness maps
Post by: brr on 2016-06-18, 20:08:14
Hello everyone !
Sorry for the stupid question , (I'm new here and also newbie in corona) , just wanted to test all this and done the same as dubcat posted , but.... until the reflection level is 0.0 , there are no visible difference in render with/without GGX fix and IOR fix .
  Only when i make reflection level 0.1+ some changes happens .
  How strong should be reflection level ?

Please , see shader settings attached .

(I use corona 1.4, corona Sun and HDRI - 1.0 mult. )
Title: Re: Roughness maps
Post by: dubcat on 2016-06-19, 09:11:34
Reflection Level should be 1
If I remember correctly, these glossiness maps should be loaded with gamma 1.0, give it a try.
Title: Re: Roughness maps
Post by: brr on 2016-06-19, 14:27:49
Thanks, dubcat ! 
 I did it as you wrote , but I have also noticed that the stones have an wet-look.
 When I add glosiness map into reflection slot, then it' looks more realistic. Is it correct ?

Thanks to your reply
Test renderings and shader images are also attached :
(http://i.imgur.com/iCOTRMd.jpg)
(http://i.imgur.com/B15qHrC.jpg)
(http://i.imgur.com/tUYzzzx.jpg)
(http://i.imgur.com/B1EGSE9.jpg)
Title: Re: Roughness maps
Post by: dubcat on 2016-06-19, 15:35:49
I guess that's just how he made his roughness map, here is a picture from his demo gallery.

(http://i.imgur.com/0VT9Qgg.jpg)

If you want the material to be more rough, darken the glossiness map. My IOR LUT will reduce the IOR based on your glossiness map, like unreal,renderman,vray etc does.
Reflection level should be left at 1.0
Title: Re: Roughness maps
Post by: Fiorentin on 2016-07-09, 09:42:32
Thanks, dubcat ! 
 I did it as you wrote , but I have also noticed that the stones have an wet-look.
 When I add glosiness map into reflection slot, then it' looks more realistic. Is it correct ?

Thanks to your reply
Test renderings and shader images are also attached :

Brr, do you mind sharing the settings of the plane you have the displacement texture on. I'm interested in if you also use the corona displacement mod and how tight your polygons are. Your renders look amazing!