Corona Renderer Forum

General Category => I need help => Topic started by: mrjojo on 2015-03-08, 12:44:24

Title: Adjusting Falloff RGB curves
Post by: mrjojo on 2015-03-08, 12:44:24
Ive been trying to use falloff map RGB curves instead of using the fresnel value for having a physically more accurate result. I extract the curves off Infractive Index website. However ive been having a hard time adjusting the curves and I end up with weird results due to not having the curves properly set. Ive attached the Iron below for an instance. Is there any way I can adjust these curves correctly?
Title: Re: Adjusting Falloff RGB curves
Post by: oncire on 2015-03-08, 13:28:12
just graph the non-polarized(green curve)... use mono option ...just ignore the two curves...
Title: Re: Adjusting Falloff RGB curves
Post by: mrjojo on 2015-03-08, 13:41:57
just graph the non-polarized(green curve)... use mono option ...just ignore the two curves...

But I have seen people adjusting all three curves to get good results, for Gold material for instance.
Title: Re: Adjusting Falloff RGB curves
Post by: PROH on 2015-03-08, 13:57:25
Those 3 curves are not different RGB channels (just as described). However your curves are making 3 different RGB channels. I don't know how to achieve what you want, but I very much doubt this is the correct way.
Title: Re: Adjusting Falloff RGB curves
Post by: mrjojo on 2015-03-08, 14:13:24
Im new to this whole using the RGB curves for adjusting the fresnel so Im most probably confused! Below I tried to recreate the curves for silver. So should I leave red and blue and only adjust the green curve? or just simply adjust the mono curve?

Title: Re: Adjusting Falloff RGB curves
Post by: oncire on 2015-03-08, 17:16:40
just use the mono option and graph the curve... and make sure also your fresnel is 999 if your making your own custom fresnel reflection..
Title: Re: Adjusting Falloff RGB curves
Post by: Siger on 2015-03-08, 17:52:18
For color channels use different wavelength ( http://en.wikipedia.org/wiki/Color )
For example: average for Red use 0.67 µm ( http://en.wikipedia.org/wiki/Red )
Title: Re: Adjusting Falloff RGB curves
Post by: Elviz on 2015-03-08, 22:26:55
Dear Siger, can you please explain in more detail how to apply different wavelengths to RGB/Mono curves and why it matters. Why not just use the color picker in reflection section of the shader..

Thank's a lot !
Title: Re: Adjusting Falloff RGB curves
Post by: Ricky Johnson on 2015-03-08, 23:22:44
The difference between a separate falloff curve for each channel as opposed to a single colour in the reflection slot is that the reflection colour will vary depending on the viewing angle. For instance, as the curves converge towards the end of the graph, at a glancing angle a metal will lose the colour in it's reflection.

Title: Re: Adjusting Falloff RGB curves
Post by: mrjojo on 2015-03-09, 08:06:03
For color channels use different wavelength ( http://en.wikipedia.org/wiki/Color )
For example: average for Red use 0.67 µm ( http://en.wikipedia.org/wiki/Red )

Im a little bit confused here. Are you saying that I should adjust RGB curves only for colored metals ? or this applies for all metals? Could you be more specific? 
Title: Re: Adjusting Falloff RGB curves
Post by: Ricky Johnson on 2015-03-09, 12:05:18
Are you saying that I should adjust RGB curves only for colored metals ? or this applies for all metals?

Yes, the only reason for (or result of) separating the RGB curves would be to create a colour. If you get into mapping some of the various metals from that refractive index website you'll notice that the red, green and blue wavelength curves for metals such as silver are very close to one another. There is some subtle variation in colour and the amount of the value returned is also of importance if you're interested in physically based materials so it's still worth looking into for metals with a lesser colour tint.
Title: Re: Adjusting Falloff RGB curves
Post by: Adanmq on 2015-03-09, 14:43:42
Hi. Excuse mi English.
The main difference using curves is that you always get full white reflectivity on glancing angles. Using a color, you don´t get 100% (Beacuse colors can´t be 255-255-255). But to be honest sometimes, the difference it´s barely noticeable. Here is an example i made to illustrate.

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


All metals have "tinted" reflection (specular reflections are´t equal in all wavelengths), but the effect in some of them is barely noticeable. The most important ones are: Chromium, Platinum, Nickel, Titanium, Copper, Iron, Gold, Cobalt.

 Aluminium and Silver are almost white.

Light wave have 2 different polarization, these Red and Blue curves in your graphic represent those polarization and the green one the "approximate" medium value, the one you should use.

To get the reflectivity by color, you need to introduce 3 (because you want to translate to a RGB sistem) diferent light wavelength in http://refractiveindex.info/. Blue 0.440 / Green 0.510 / Red 0.650 (approximately, light it´s not that simple) and use ONLY the green curve of each one (you can see the example of gold in mi image).

Another different question is if all of this really pay off. Sometimes you can get almost the same result using a single color in a fraction of the time you need to spend tweaking the curves, and almost always you need to adjust by eye in both cases. It´s an excellent exercise to better understand light but you must decide if it is efficient.

Title: Re: Adjusting Falloff RGB curves
Post by: Juraj Talcik on 2015-03-09, 14:58:15
Fantastic write-up from Adanmq.

I can only echo his advice to understand both, but use the one that is most comfortable to you. I pretty much use simple color charts for metals most of times, like the one from Dontnod. There is no magic here, no holy grail of uber-realism.

(https://seblagarde.files.wordpress.com/2012/04/dontnodgraphicchartforblinnmicrofacet_lowres2.png?w=630&h=630)
Title: Re: Adjusting Falloff RGB curves
Post by: mrjojo on 2015-03-10, 10:48:16
Big thank you everyone contributing and sharing their thoughts on this topic.
Title: Re: Adjusting Falloff RGB curves
Post by: Adanmq on 2015-03-18, 20:50:05
Hi.

Just a quick tip. If you don´t wan´t to sacrifice 100% white reflection on glancing angles you can use a falloff but instead of split it into RGB component (this is time consuming and not intuitive) you can use base reflective color + curve to control where do you exactly get 100%. If you don´t want color change across reflective angles this approach gives you the exact same result but you can control base reflective more "artistically" using a color.
(https://corona-renderer.com/forum/index.php?action=dlattach;topic=7351.0;attach=29457;image)