Author Topic: New Corona Physical Material (PBR) playground!  (Read 39856 times)

2021-05-25, 10:29:11
Reply #180

Feodor

  • Active Users
  • **
  • Posts: 113
    • View Profile
20 years late

I'm pretty sure you could do this in earlier Corona versions too - we have dispersion for quite some time.

@Feodor, thanks for sharing your setup. May i ask why you decided to modify gradient ramp in aniso rotation slot that way? I think default settings with only the type being changed to spiral, would give you more physically accurate result.

Previously, such a material could not be made, the dispersion worked only on refraction. In the Physical Material, it is taken into account when reflecting. From my personal experience (I may be wrong) Corona is the first render where I managed to make CD material!

2021-05-25, 12:32:02
Reply #181

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 10940
  • Marcin
    • View Profile
Sorry, but this really was possible in older versions of Corona. The attached is a V6 render.
And here is a post with CDs from 2013 :)
https://forum.corona-renderer.com/index.php?topic=577.msg5982#msg5982

2021-05-25, 13:13:54
Reply #182

lupaz

  • Active Users
  • **
  • Posts: 665
    • View Profile
20 years late

I'm pretty sure you could do this in earlier Corona versions too - we have dispersion for quite some time.
It was a joke: like, who needs to render cds anymore.

2021-05-25, 16:20:14
Reply #183

GeorgeK

  • Corona Team
  • Active Users
  • ****
  • Posts: 565
  • George
    • View Profile
20 years late

I'm pretty sure you could do this in earlier Corona versions too - we have dispersion for quite some time.

@Feodor, thanks for sharing your setup. May i ask why you decided to modify gradient ramp in aniso rotation slot that way? I think default settings with only the type being changed to spiral, would give you more physically accurate result.

Previously, such a material could not be made, the dispersion worked only on refraction. In the Physical Material, it is taken into account when reflecting. From my personal experience (I may be wrong) Corona is the first render where I managed to make CD material!

On the context of previously not possible to make materials, do try Aerogel, it's great with the new PhysicalMtl :).
For solutions, troubleshooting, ticket requests please visit - [link]

2021-05-25, 18:49:41
Reply #184

Feodor

  • Active Users
  • **
  • Posts: 113
    • View Profile
Sorry, but this really was possible in older versions of Corona. The attached is a V6 render.
And here is a post with CDs from 2013 :)
https://forum.corona-renderer.com/index.php?topic=577.msg5982#msg5982

I have some doubts about the physical correctness of the 2013 method. And with the 6 Corona it would be interesting to see the material settings, what did I miss!)

2021-06-14, 17:14:02
Reply #185

Yuriy Bochkaryov

  • Active Users
  • **
  • Posts: 71
    • View Profile
    • Home Page
New physical material does not work correctly with the map in IOR
I think you need to check and fix it.
Adding a texture to the IOR slot does not draw on reflections.
For the texture to start working, you need to increase its RGB multiplier Level - this is not correct, because the texture has a normal contrast and should already work
Also, if you switch from IOR mode to Specular mode, then the texture starts working.
Please check.

P / S "black - increase, white - decrease" - a bit unusual and probably not logical, but perhaps it was done for convenience using Roughness


2021-06-15, 16:32:55
Reply #186

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 10940
  • Marcin
    • View Profile
New physical material does not work correctly with the map in IOR
I think you need to check and fix it.
Adding a texture to the IOR slot does not draw on reflections.
For the texture to start working, you need to increase its RGB multiplier Level - this is not correct, because the texture has a normal contrast and should already work
Also, if you switch from IOR mode to Specular mode, then the texture starts working.
Please check.

P / S "black - increase, white - decrease" - a bit unusual and probably not logical, but perhaps it was done for convenience using Roughness

I have some info here, since this appears to be an important issue:

The way IOR mapping currently works (and always worked) is this:
- if the value is above 1, it is directly applied as IOR (e.g. value 1.5 = IOR 1.5)
- if the value is below 1, it is converted into 1/IOR (e.g. value 0.5 = 1/0.5 = 2)

This is why you are getting the "black = increase" effect.

8-bit textures like JPGs will have RGB values 255 or less, which means less than 1.
If you need to get the "brighter = increase" effect, you either have to use a texture with higher bit depth (like EXR) or you need to manually boost the texture's RGB level to go above RGB 255.

Honestly, I am not sure what at typical IOR texture looks like. Could you share some examples? Where does your texture come from? Do you know of some commonly used software that can generate IOR textures?

2021-06-15, 17:51:35
Reply #187

pokoy

  • Active Users
  • **
  • Posts: 1628
    • View Profile
I still think that remapping of texture values from 0-255 to '1-user value' would have been the most reasonable way to go. The current way is just a big question mark, while remapping would have been self-explained if available right in the material's UI. Nothing works without adding extra nodes anymore the way it is right now.

2021-06-15, 17:57:47
Reply #188

Juraj

  • Active Users
  • **
  • Posts: 4312
    • View Profile
    • studio website
I take what I wrote below back, I forgot it's Substance that introduced the 1/IOR mapping texture. I don't want to tinker with industry standard.


------------------------------------------------------------------------------------------


I still think that remapping of texture values from 0-255 to '1-user value' would have been the most reasonable way to go. The current way is just a big question mark, while remapping would have been self-explained if available right in the material's UI. Nothing works without adding extra nodes anymore the way it is right now.

I see a perfect way implement this :- D

Quote
- if the value is above 1, it is directly applied as IOR (e.g. value 1.5 = IOR 1.5)
- if the value is below 1, it is converted into 1/IOR (e.g. value 0.5 = 1/0.5 = 2)

Who on earth would use the second method (below 1) to create 1/IOR? Let's just change that one method and we'll have both approaches at same time. Full backwards compatibility, full IOR mode override and full easy flexibility. Everyone could be happy?

Like this:

If the value is above 1, it is applied directly as IOR override (exactly as right now).
If the value is below 1, it will directly map as fraction of existing material IOR. Example value 0.5 will halve the reflectance of material IOR 1.52 (so something like 1.333 I don't know the math from head).

Did I miss something, looks ok to me but I also have brutal migraine right now..
« Last Edit: 2021-06-15, 20:55:01 by Juraj »
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2021-06-15, 19:47:31
Reply #189

Yuriy Bochkaryov

  • Active Users
  • **
  • Posts: 71
    • View Profile
    • Home Page
Quote
Do you know of some commonly used software that can generate IOR textures
we do not need a program to generate IOR textures, it should work with any texture, with any image, based on the gradation of dark and light, where dark adds IOR and light removes IOR - or vice versa, it doesn't matter, the algorithm subtracts from light to dark, this allows us to define areas with and without reflection on one object through the texture.
For example - a leaf of a tree, the leaf has veins that have no reflection, and another zone of the leaf has a reflection, this makes our picture realistic.
It is impossible for the entire sheet to have the same IOR value, this is not correct.
I’m not saying that your theory is not correct, I’m saying that we probably have an error somewhere in the work of IOR with textures
Please note that when switching IOR mode to Specular mode, the texture starts to work. If everything is correct, then there should be no changes in the reflection when switching different modes to IOR.
I tried a texture with 16 bit depth and the problem persisted.
I also observed problems - when I tried to adjust the IOR through the texture in the color-correction and it did not work, RGB level 0 and level 1000 always gave reflection, but the texture at RGB 1000 was absolutely white, and at RGB 0 it was absolutely black. The reflection was of different strengths, but it was a reflection. Although, within the maximum range of 0 and 1000, I should have had maximum reflection at one value, and complete lack of reflection at the other.
The working range for the color corestore was approximately 120-180 in the RGB, all other values ​​of the RGB multiplier simply did not work, there was no texture on the reflection, it was just a mirror with different reflection strength
Also, if you check the Invert checkbox on the texture, then the card starts working - this also indicates that the work is incorrect, because the invert should swap the reflection and its absence, and not turn the texture on and off.
You need to make tests with a simple texture, with 3d max procedural maps everything works fine, the problem is in raster textures
Another oddity - texture in IOR through color correction with RGB 500 - has the correct reflection pattern, if you make RGB 700, then the texture is perceived as inverted for reflection, but the texture itself remains the same, but the texture itself has become brighter, but not inverted, why is it in IOR perceived as inverted?
I think we have obvious problems with the perception of the range of brightness of the texture, somewhere there is an error in converting the brightness of pixels to IOR values

 
« Last Edit: 2021-06-15, 19:53:05 by Yuriy Bochkaryov »

2021-06-15, 19:51:08
Reply #190

Mohammadreza Mohseni

  • Active Users
  • **
  • Posts: 118
    • View Profile
    • Instagram


I have some info here, since this appears to be an important issue:

The way IOR mapping currently works (and always worked) is this:
- if the value is above 1, it is directly applied as IOR (e.g. value 1.5 = IOR 1.5)
- if the value is below 1, it is converted into 1/IOR (e.g. value 0.5 = 1/0.5 = 2)


really???? wow. that's is strange behavior. really not expecting it.
personally, I always used EXR for it so not expected it to behave like that for 8 bits.

IOR generated from something like substance painter for corona would really look strange with this current behavior. I would expect this to be in the tooltip so if someone generated a map from substance ecosystem or other texturing applications to at least know about this and only generate 16 or 32-bit exr to use in corona.
I think at least more than half of those who use substance painter and corona use this incorrectly with the wrong exporting format.

Quote
Like this:

If the value is above 1, it is applied directly as IOR override (exactly as right now).
If the value is below 1, it will directly map as fraction of existing material IOR. Example value 0.5 will halve the reflectance of material IOR 1.52 (so something like 1.333 I don't know the math from head).

Did I miss something, looks ok to me but I also have brutal migraine right now..

thats something that we can imagine really easily and it works really well

2021-06-15, 20:21:57
Reply #191

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 7240
  • Let's move this topic, shall we?
    • View Profile
    • My Models
really???? wow. that's is strange behavior. really not expecting it.
personally, I always used EXR for it so not expected it to behave like that for 8 bits.

IOR generated from something like substance painter for corona would really look strange with this current behavior. I would expect this to be in the tooltip so if someone generated a map from substance ecosystem or other texturing applications to at least know about this and only generate 16 or 32-bit exr to use in corona.
I think at least more than half of those who use substance painter and corona use this incorrectly with the wrong exporting format.

Substance generates IOR maps that are 1/x IOR, so it should work in Corona out of the box. If you have evidence that it's not the case, then please share it with community.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2021-06-15, 21:39:24
Reply #192

Juraj

  • Active Users
  • **
  • Posts: 4312
    • View Profile
    • studio website
For example - a leaf of a tree, the leaf has veins that have no reflection, and another zone of the leaf has a reflection, this makes our picture realistic.
It is impossible for the entire sheet to have the same IOR value, this is not correct.

That is not entirely true, the leaf in 99perc. of cases has the same IOR value/Specular value across its surface. But due to its surface micro-structure variation, which in CGI PBR model will translate to modulation with roughness(/glossiness) and normal map(/bump/displacement).

But because nothing in CGI can perfectly capture all the irregularities of real world, not even gigantic normal maps, micro occlusions, cracks and many tiny imperfections have to be simulated using "fake" methods. The result is not fake at all ! This is where specular modification applies. Or modification of IOR. Same thing, but the specular map is easier to work with since it's most similar to former reflection map.

Unreal Documentation on PBR material explains it nicely:
Quote
Commonly, if we modify Specular, we do so to add micro occlusion or small scale shadowing, say from cracks represented in the normal map


Specular 0.5 is IOR 1.52, the CoronaPhysicalMaterial nicely translates this value for you when you keep changing the modes.

To simulate former behavior of reflection slot, here is quick tutorial of one particular common scenario:

LegacyMaterial: IOR 1.52, Reflection 1.0, Reflection map B&W with 0 value in map being Reflection 0.0 (and thus IOR 1.0) and 255 being Reflection 1.0 (and thus specified IOR 1.52).

PhysicalMaterial: IOR 1.52 translates as Specular 0.5 (this is industry standard formular, Corona didn't make it up, look Unreal or Substance documentation), so B&W map with 0 value will be IOR 1.0, 128 (linear mid-grey) will be 1.52 and 255 will be IOR 1.8.

To use the same reflection maps previously with IOR 1.52 as specular maps just clamp them by half.

I know written like this it might seem complex, but I presume it will become second nature soon. This is industry standard now and will make translating between Substance/Quixel/etc.. assets much easier. There just a lot of options, and multiple workflows, which will be confusing at first. It's best to pick one (roughness or gloss, IOR or specular) and stick with that.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2021-06-15, 23:08:51
Reply #193

lupaz

  • Active Users
  • **
  • Posts: 665
    • View Profile
I don't know what you guys think, but I'd pay the guy that used to do these Corona tutorials to make one for Physical material and all the things you are talking about here. He was awesome, and maybe if we all chip in he can get a good chunk of money and would be interested in doing one more tutorial. I don't know his name, so I can't contact him.

ab_channel=CoronaRendererCoronaRenderer

2021-06-15, 23:40:51
Reply #194

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 3975
    • View Profile
As mentioned before, it's not about the money or anything else, he wanted to move on to other projects that were not tutorials. We will be having new tutorials though, and with an equally awesome presenter, so never fear in that regard :)