Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Tutorials & Guides => Topic started by: danielmn on 2015-05-02, 03:33:26

Title: Glossy Falloff Curve Experiment
Post by: danielmn on 2015-05-02, 03:33:26
Hey guys,
I was intrigued after reading this article on http://viscorbel.com/ about how reflections sharpen at glancing angles even on very rough items.
You can see more real world images here http://filmicgames.com/archives/557
I had noticed this effect recently but that I might look into it at one point.

workflow:
1) Find out what the Glossy value you would like to start with for the material  (ex is  .3)
2) add a falloff curve to your Glossiness and set to parallel falloff with a curve similiar to the example on viscorbel site.
3) Convert the Glossy value to Grey scale value ( Glossy .3--> Grayscale 76.5)
4) change ior  to 999.999
5) Render, the front will be what you expect but glancing angles will now start to sharpen out.

specifically check out the change on the flat surface I was very intrigued to see how this would change the look of the reflection.


Thanks to siger's gang for turning me onto this and the complex ior shader. which you can see here, that I used in this example.
https://forum.corona-renderer.com/index.php?topic=7928.msg52876#new
Title: Re: Glossy Falloff Curve Experiment
Post by: gabyanz on 2015-05-03, 21:16:11
Interestin!! Also I was playing with those glossiness fallof...

Just a question...

Why do you convert che glossy value to grayscale? Where do you put that number?

Title: Re: Glossy Falloff Curve Experiment
Post by: romullus on 2015-05-04, 09:41:39
3) Convert the Glossy value to Grey scale value ( Glossy .3--> Grayscale 76.5)

I guess you wanted to say: convert glossiness value from 0-1 to 0-255 range?
Title: Re: Glossy Falloff Curve Experiment
Post by: maru on 2015-05-04, 11:03:52
I was pretty sure this is something that is handled by Corona's reflection model automatically (maybe it is in some degree?).
From first post I don't understand only one thing: why set IOR to 999?
Title: Re: Glossy Falloff Curve Experiment
Post by: Karol Nord on 2015-05-04, 11:06:47
Any tests on how the rendertimes compare?
Title: Re: Glossy Falloff Curve Experiment
Post by: Siger on 2015-05-04, 11:43:41
I was pretty sure this is something that is handled by Corona's reflection model automatically (maybe it is in some degree?).
From first post I don't understand only one thing: why set IOR to 999?

If texmap ComplexFresnel for the calculation of reflections is used (used as reflection color map), it's necessary to disable material calculations of a fresnel (enter IOR 999) - texmap calculate own fresnel function for each color.
Title: Re: Glossy Falloff Curve Experiment
Post by: Juraj on 2015-05-04, 11:57:38
Maru knows that well, but this is tutorial for glossiness :- ). Of course, he also used the fresnel map, but he doesn't write so in his tutorial so you would have to read between lines otherwise it's confusing.


Well, it looks good but it's incorrect, or semi-correct, to certain degree. The GGX handles the falloff well, but rough materials do have glossy 'retro-grazing reflection' where they appear mirrory close to grazing angle, but not
to such degree as in your example. Your curve is too benevolent and it looks like blend of two materials too obviously, far too soon before grazing angle occurs.
Title: Re: Glossy Falloff Curve Experiment
Post by: maru on 2015-05-04, 12:05:21
I was pretty sure this is something that is handled by Corona's reflection model automatically (maybe it is in some degree?).
From first post I don't understand only one thing: why set IOR to 999?

If texmap ComplexFresnel for the calculation of reflections is used (used as reflection color map), it's necessary to disable material calculations of a fresnel (enter IOR 999) - texmap calculate own fresnel function for each color.
Oh, there is a note about it in the first post. Sorry, didn't notice it.
Title: Re: Glossy Falloff Curve Experiment
Post by: danielmn on 2015-05-06, 19:09:21
juraj
you are correct the falloff to the grazing "sharp" angle is prob extreme.

Since, to my knowledge, there are no exact number reference for this. For these examples I copied the falloff curve that http://viscorbel.com/ was using.  Every material would have it own particular falloff curve and would need to be examined and studied before completely implementing your scene.

That is also why I did not include the glossy falloff curve I used as I did not want to throw anyone into the wrong track.

As an added note, I have not yet implemented the CORRECTED Linear Falloff curve Siger and Viscorbel introduced.So that would prob help to fix things aswell.
Glad this started a good discussion, thx guys
Title: Re: Glossy Falloff Curve Experiment
Post by: maru on 2015-05-06, 20:25:14
Since, to my knowledge, there are no exact number reference for this.
I can imagine this is something related to micro-structure of the material. So it would be even possible that sometimes glossiness becomes lower at grazing angles.
Title: Re: Glossy Falloff Curve Experiment
Post by: Juraj on 2015-05-06, 21:26:02
Since, to my knowledge, there are no exact number reference for this

Yeah, unfortunately. But it's easier to eye-ball than reflectiveness itself, which is good :- )

Interesting sidenote: Some time ago, I stumbled again upon those short video tutorials by Alex Roman. They're hidden gem that not everyone seems to be aware they exist.
And he was already doing this such a time way back, probably because he just seen it. A fallof map in glossiness slot, with black being the glossiness map, and then a curve into pure white.

Title: Re: Glossy Falloff Curve Experiment
Post by: danielmn on 2015-05-06, 22:40:29
I would love to see that video or post.

All of Alex Roman's stuff is gold.
Please post it if you can.


the only thing I wonder is, is that if you set the falloff from black to white, you are basically telling it to start at a .01 glossiness which is may be way too much but as an example I totally get it.
Title: Re: Glossy Falloff Curve Experiment
Post by: Siger on 2015-05-07, 00:29:22
the only thing I wonder is, is that if you set the falloff from black to white, you are basically telling it to start at a .01 glossiness which is may be way too much but as an example I totally get it.

Adjust falloff curve or you can use map in front color slot. Or composite falloff with another map.
Title: Re: Glossy Falloff Curve Experiment
Post by: Juraj on 2015-05-08, 18:33:14
the only thing I wonder is, is that if you set the falloff from black to white, you are basically telling it to start at a .01 glossiness which is may be way too much but as an example I totally get it.

Adjust falloff curve or you can use map in front color slot. Or composite falloff with another map.

Siger is right, that is what I meant. The videos are on his VIMEO channel :- )
Title: Re: Glossy Falloff Curve Experiment
Post by: 4b4 on 2015-06-03, 16:07:08
Just found out Alex Roman released a book as well:

http://www.thirdseventh-book.com/
Title: Re: Glossy Falloff Curve Experiment
Post by: Rimas on 2015-06-03, 16:47:51
Interesting stuff!I was sometimes using a blend with the same material and higher glossiness for that 'rim' effect, like a spaz :D

And +1 to Alex Roman's stuff, the guy's a freakin' legend to those who know his work!
Title: Re: Glossy Falloff Curve Experiment
Post by: GestaltDesign on 2015-06-03, 16:58:08
I am a little puzzled as I thought that the original idea of the GGX/GTR BRDF code factored fresnel glossy falloff into the reflection model.
Or is the fresnel code for reflection only and not roughness (hence the minor impact on a custom Fresnel Map that Ondra confirmed recently).
Title: Re: Glossy Falloff Curve Experiment
Post by: Ondra on 2015-06-03, 18:23:53
I am a little puzzled as I thought that the original idea of the GGX/GTR BRDF code factored fresnel glossy falloff into the reflection model.

it does, but some people just have to have custom solutions to everything ;)

there might also be currently some bugs
Title: Re: Glossy Falloff Curve Experiment
Post by: GestaltDesign on 2015-06-03, 22:51:35
Thanks for the confirmation Ondra!
If you are really going for a material specific physical approach then you are best off building on a simpler BRDF model anyhow then and replicating the behaviour in real world terms.
Potentially an expensive route for minuscule gains in realism I imagine.
Title: Re: Glossy Falloff Curve Experiment
Post by: Flavius on 2015-08-31, 11:02:20
Hi there everyone,

I'm very interested in this glossiness change per angle. The best I could see it in real world is by taking my wacom tablet and putting it next to my monitor. When my viewing angles turned to a high angle, the reflection was pretty sharp, compared to looking straight into it.

I can barely notice the effect with "natural" GGX shader in Corona, but I was expecting a much higher difference in glossiness, now it is barely visible. I surely couldn't recreate the effect of the Wacom surface without using a falloff map in the glossiness slot

(http://i60.tinypic.com/2a7fn2w.jpg)

Title: Re: Glossy Falloff Curve Experiment
Post by: maru on 2015-08-31, 11:39:12
You cannot expect a "universal" shader that will work with everything. In real world, this is dependent on the micro structure of materials.
Title: Re: Glossy Falloff Curve Experiment
Post by: Flavius on 2015-08-31, 11:50:57
Hi Maru,

Thanks for replying. That is correct, so applying a fallof curve in the glossiness is still the best way to go for more complex materials.

I must say, Corona shader is the best I've seen so far :)

Kindly,