Author Topic: PBR tuning of the reflectivity ability  (Read 30270 times)

2014-09-07, 14:35:25

Stan_But

  • Active Users
  • **
  • Posts: 526
    • View Profile
    • https://www.behance.net/archdizs
Hello, Ondra and Corona Renderer team!
Is it possible to make the tuning of the reflectivity ability with the reflect level but not with the reflect IOR - like it work in real world?
I mean that the level will rule the value of frontal reflection and then let the fresnel do his work.
And take off the IOR from the reflection settings
I resume: the refl.level - frontal reflection and the fresnel - watchs that with ~0 deg. would ~100% reflection

2014-09-07, 21:27:50
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12755
  • Marcin
    • View Profile
I'm not sure what you mean but you can turn off reflection IOR by setting it to 999. Or at least that's what Keymaster wrote some time ago. :)

When you are using some fresnel IOR value, then the "reflection level" parameters determines maximum allowed reflectivity.

Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2014-09-07, 21:49:41
Reply #2

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Modo has it this way and it's the worst system ever. It's one of the reasons Modo users do so ugly renders. Anyway, it's easily achievable in Corona:



But it's still wrong. Fresnel IOR defines ratio between facing and parallel reflectivity, so if you change it, you will break the correctness of fresnel. Modo has it implemented in this wrong way, and it's really the reason so many Modo users have hard time creating photorealistic shaders, especially for architectural interiors.

You should simply use Fresnel IOR, and not touch the ratio. With IOR number, you can easily tweak ratio, while keeping fresnel correct. Basically, higher IOR = less contrast between facing and parallel, and lower IOR = higher contrast between facing and parallel. As soon as you start to tweak it manually, you will break it.

2014-09-07, 22:02:01
Reply #3

vicnaum

  • Active Users
  • **
  • Posts: 69
    • View Profile
No, you got it all completely wrong.

You shouldn't change the maximum allowed reflectivity, it's not correct. Nor you shouldn't change the facing without changing the IOR.

Everything headoff wanted it the inverse of IOR.

Let me explain:
1. Each IOR has it's own starting facing reflectivity value.
2. For example IOR 1.33 has 0.02 facing starting value, IOR 1.51 has 0.041, and IOR 4.44 starts with 0.4. And all they go to 1.0 on the grazing edge.

What headoff wants is an inverse control - so you can set up the IOR by turning the base facing reflectivity. So, say, if you set up 0.02 reflectivity = IOR sets as 1.33. and so on. And these should be LINKED. And the Reflection Level slider, which affects maximum grazing reflection should be removed.

That's what shortly speaking headoff meant.

2014-09-07, 22:29:07
Reply #4

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
No, you got it all completely wrong.

You shouldn't change the maximum allowed reflectivity, it's not correct. Nor you shouldn't change the facing without changing the IOR.

Everything headoff wanted it the inverse of IOR.

Let me explain:
1. Each IOR has it's own starting facing reflectivity value.
2. For example IOR 1.33 has 0.02 facing starting value, IOR 1.51 has 0.041, and IOR 4.44 starts with 0.4. And all they go to 1.0 on the grazing edge.

What headoff wants is an inverse control - so you can set up the IOR by turning the base facing reflectivity. So, say, if you set up 0.02 reflectivity = IOR sets as 1.33. and so on. And these should be LINKED. And the Reflection Level slider, which affects maximum grazing reflection should be removed.

That's what shortly speaking headoff meant.

Could you post an example of any renderer that uses that? It really sounds like schlick approximation that Modo uses, and it makes process of creating good looking photorealistic materials complete hell. Or in other words, all of the mainstream renderers use the current model, and people do not have any trouble creating highly photorealistic materials. I am not saying it can not be improved further, and that we should keep using sticks and stones no matter what, but my point is that while there is no proof it can make setup of photorealistic materials better/easier, Modo is a definite proof it can make setup of photorealistic materials worse/harder.

2014-09-08, 00:01:36
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8843
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Very interesting discussion going on here. I would love to have more educated base in my material creation and less guesstimation. So, carry on, but without personal bashing, please.

Let me explain:
1. Each IOR has it's own starting facing reflectivity value.
2. For example IOR 1.33 has 0.02 facing starting value, IOR 1.51 has 0.041, and IOR 4.44 starts with 0.4. And all they go to 1.0 on the grazing edge.

Is there a formula to calculate that or is it just yours arbitrary numbers?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-09-08, 00:58:13
Reply #6

Juraj

  • Active Users
  • **
  • Posts: 4761
    • View Profile
    • studio website
Vicnaum deserves a medal for clarifying stuff ! :- )

Yes, some PBR models (like the one in Unreal engine 4 derived from Disney's paper) use inverted specular reflectivity values because they wanted UNIFIED model for specular reflectivity across both metals and not metals.

Why is this logical: (I am not advocating we need this actually at all, but just writting argument against "all the mainstream renderers do something, so it's obviously right" fallacy type of argument above).

1)Metals don't translate well using only the simplified fresnel formula (only n-number), so they end up looking "incorrect" (of course, depends to what point at which case), and to avoid using the complex model (n,K), which
for example Maxwell has, they ditched it altogether and just let you specify base reflectivity and metal-ness (0 or 1, whether the material is metal, or not metal). The rest is adjusted internally then.
This also lets you lineary scale the specular value from non-metal (which will be at 0.02-0.04) to something like 0.6 for chrome or 0.9 for aluminium. One value for all material types, instead of two values.

2) If we discount refractiveindex.com , it's easier to get measured values in inverted fashion. It's still potato values, but easier to use, because again, we are only using ONE value (fresnel is computed internally aftewards).
From 0.02-0.04 for non-metal likes plastics, paints,etc.. to 0.2-0.95 etc.. for metals. This is both easier to custom modelling the curve from ref index web, as well as inputting 2 values for full fresnel n/K (too scientific).

Both points above become strong positive when it comes to authoring textures. The whole workflow was intended so you can paint your textures more universally. You only paint single specular map which will only apply with metals,
and will contain both color and intensity (in the scale above,0.2+) but will be ignored for non-metals, which will return to default 0.04 (1.52 IOR as Vicnaum wrote). Both will keep 1.0 at grazing angle and their variance will be driven
by single another map, roughness. It's very simple model actually. I suggest everyone to play with Unreal to get the feel of how it works. It's not more abstract, it's more user-friendly and logical.

It doesn't make creating material "like hell", nor does it look like anything Modo does. It's the same stuff. It's actually easier, and it prevents people from creating "incorrect" materials (metal with too high albedo because you use diffuse, but incorrectly low specularity because you used random IOR number like 8-12 instead of unique curve which varries a lot for metals, and can only be simulated by the respective curve, or full fresnel formula, n/K (like Maxwell).

All the other stuff applies same way, there is no "capping" of specular reflectivity, it always go to 100perc. but the curve can be so steep that coupled with rough surface, the material simply appear mat (and shader lambertian)

Last but not least to counter the "People have no-problem creating photo-realistic materials":

Well, I would say they do.. 99perc. of people including me have that problem. But the problem is not so much that's not possible now. It is just fine. But that it could be refined to allow "easier" creating of them, by a model that very much
navigates you to correct result and avoids the possibility of having physically incorrect materials.
Which the current model promotes, the fact the you can cap reflectivity for non-metals means that vast majority of people have materials that are less reflective then they should. Instead, they often compensate by too high diffuse values or generally upping exposure for whole image and then complain on forums of "flat, washed out" look.

« Last Edit: 2014-09-08, 01:32:33 by Juraj_Talcik »
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2014-09-08, 04:11:20
Reply #7

Stan_But

  • Active Users
  • **
  • Posts: 526
    • View Profile
    • https://www.behance.net/archdizs
Yep guys!
Vicnaum and Juraj_Talcik are right fully in that I want to say

Romullus, you can look here:  http://hyperphysics.phy-astr.gsu.edu/hbase/phyopt/reflco.html

Formula in simple form is: R=(n1-n2)^2/(n1+n2)^2, R - reflectance, n1/n2 - IOR of the first and of the second medias. In our case n2 is the air with IOR ~1

So formula is: R=(n1-1)^2/(n1+1)^2

And in backward:  n=(SQRT(R)+1)/(1-SQRT(R))

for n=1.33  -  R=0.0201     ~2% 
for n=1.51  -  R=0.0413     ~4%
etc

But it work directly only for the non-diffuse surfaces. For other surfaces need to divide reflectance between the diffuse reflections and the direct reflections

2014-09-08, 13:36:26
Reply #8

agentdark45

  • Active Users
  • **
  • Posts: 577
    • View Profile
I'm completely lost in this thread...could you guys post up some example photos or renders to help show what you're talking about? Seems like a very interesting topic!
Vray who?

2014-09-09, 00:54:08
Reply #9

Adanmq

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 94
    • View Profile
    • 3D Collective
Hi.
Even if it´s not "user friendly", you can go the opposite way. If you know R you can deduce a "fake" n that will give you the R you want and use it as the IOR. Should give you similar results. The idea of 2 linked values looks very good to me. I still prefer custom Fresnel curves for the moment.

2014-09-09, 20:03:19
Reply #10

Stan_But

  • Active Users
  • **
  • Posts: 526
    • View Profile
    • https://www.behance.net/archdizs
This is how it realized in MentalRay
One mult. - the Reflectivity. Like in the real physic. No anything superfluous - only that what needed.
But here is one minus - there is not map for reflectivity ((

2014-09-09, 20:37:36
Reply #11

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12755
  • Marcin
    • View Profile
Reflectivity map in MR is driven by the "color" slot next to reflectivity...

---

Ok, guys, you are discussing important things here, but is there any universal solution? Different materials have different IOR/reflectivity "profiles" so this could be solved by presets but you would either need lots of them or be able to manually alter them to create new materials. Would it be best to have a switch to use or not use the "physically correct" method? Maybe a whole different material? (this surely wouldn't be a Coronesque move)
« Last Edit: 2014-09-09, 20:45:19 by maru »
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2014-09-09, 20:56:00
Reply #12

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
This is how it realized in MentalRay
One mult. - the Reflectivity. Like in the real physic. No anything superfluous - only that what needed.
But here is one minus - there is not map for reflectivity ((

Yes... this makes no sense. Level is multiplier of reflectivity color. So map slot next to color is what drives reflectivity.

So now that i understand what you all want, it makes even less sense. It's basically different way to set up the exact same thing. But the way that a lot less people is familiar with. It does not add any more flexibility, nor does it add possibility of creating better looking materials. It just makes things different, not better, not worse, just different.

Well, almost, because it then actually removes some flexibility - ability to modify overall reflectivity. Sure it may not be physically correct, but if client wants material same, but less reflective, you can't say now.
« Last Edit: 2014-09-09, 21:03:36 by Rawalanche »

2014-09-09, 21:19:36
Reply #13

Juraj

  • Active Users
  • **
  • Posts: 4761
    • View Profile
    • studio website

Well, almost, because it then actually removes some flexibility - ability to modify overall reflectivity. Sure it may not be physically correct, but if client wants material same, but less reflective, you can't say now.

Proper controls (like in Disney model) let you go outside boundaries always. But it's the fact those controls are more logical with their linked nature by default and more sound terminology.
Of course, there is much more to it and on one end some people think it's magical solution to something (it's not, but this is very nature of holy grail searching mentality), but then again your stance is continually biased and you're always quick to come to over-simplified opinion based on current preference.

But with that said I don't know what the MentalRay comparison showed...there is nothing different there. These threads get confusing too fast.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2014-09-09, 21:30:27
Reply #14

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Ok,

since there's quite a bunch of people who are requesting it, i am researching a way to get it into UI. Keep in mind this is at this point just a theroretical concept and not guaranteed to show up in Corona (although at some point it probably will)

The idea is enabling PBR mode in material would freeze level and IOR input, and enable value field to input facing reflectivity. IOR value field, even when frozen, would still show the number that is being derived from current fac. reflectivity parameter.