Author Topic: dubcats secret little hideout  (Read 94538 times)

2018-03-13, 17:59:22
Reply #180

fabio81

  • Active Users
  • **
  • Posts: 273
    • View Profile
thank you so much!

2018-03-16, 17:07:33
Reply #181

dubcat

  • Active Users
  • **
  • Posts: 456
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
The new generator is almost complete.
It can generate IOR and Specular maps from 3 different map inputs so far.

#1 Cross Polarization Specular Scan
This is the best solution, your Corona render will have identical reflections to the real world cross polarized specular map.

This is the result



#2 Normal Map
This is the second best solution. If you don't have a cross polarized specular map, you can use this one.
You can use any existing normal map. It will generate a IOR / Specular map based on the normal map height strength.
This was initially Jurajs idea, and Ondra gave me some pro tips. So this generator would not exist if not for them!

This is the result



#3 Reflection Level
This is the shittiest last solution.
It will convert old reflection level maps to IOR/Specular. This will give you the same look as you had before, but it will not clamp fresnel.

Since the new generator also generate specular maps, we get real world reflection behavior in Unreal 4!



When everything is road tested and tweaked, I will compile them as 3 LUTs.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 / https://dubcatshideout.com  ( ͡° ͜ʖ ͡°)

2018-03-16, 23:02:16
Reply #182

dubcat

  • Active Users
  • **
  • Posts: 456
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Thought I could share my custom metal settings. It's nice to get the correct scanned behavior from "refractiveindex.info", but the color values are way off. These are my current reference matched metal materials, these change every week, so it's more of a snapshot of my current settings.



















Gold Example:

« Last Edit: 2018-03-16, 23:05:37 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 / https://dubcatshideout.com  ( ͡° ͜ʖ ͡°)

2018-03-20, 05:08:32
Reply #183

Basshunter

  • Active Users
  • **
  • Posts: 23
    • View Profile
Hi @Dubcat, very interesting topic. So, this "Specular map" would be used as Glossiness map right? And reflection slot full white?

2018-03-21, 16:27:28
Reply #184

dubcat

  • Active Users
  • **
  • Posts: 456
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
"Specular map" would be used as Glossiness map right? And reflection slot full white?

Hey!
The IOR map is used in the "Fresnel IOR" slot and complements the glossiness map. They are both generated from the same cross polarized set of pictures.
Current PBR shaders can't emulate real world materials with just albedo/glossiness.
If you build a virtual material scanner inside Corona and scan your materials, you will see that the cross polarized specular does not represent real world at all.
My new IOR generator takes care of this problem.

Here are some examples from my last virtual 3d scanner test.

This is how I generate my maps



No IOR map Specular



IOR map Speulcar


Glossiness map generated from the material with no IOR Map



Glossiness map generated from the material with IOR Map

             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 / https://dubcatshideout.com  ( ͡° ͜ʖ ͡°)

2018-03-21, 23:10:41
Reply #185

mferster

  • Active Users
  • **
  • Posts: 396
    • View Profile


If you build a virtual material scanner inside Corona and scan your materials, you will see that the cross polarized specular does not represent real world at all.

Wait, wait, wait! How did you simulate a cross polarization filter material in corona?

2018-03-22, 09:25:46
Reply #186

karnak

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 66
    • View Profile
@mferster

In Corona you don't need cross polarization to split diffuse reflection from specular reflection. You have render elements for that.
Conversely, in real-world you need cross polarization because your capture equipment (i.e. your camera) most likely won't have render elements. :D

I think dubcat is saying that when you compare the render element to the real-world cross-polarized photo, the two don't match at all.
He is using a method for processing scanned data, but looks like the inputs in his test are from Corona so he can iterate and change things faster.
Corona Academy (May 2017)

2018-03-22, 09:33:52
Reply #187

Fluss

  • Active Users
  • **
  • Posts: 408
    • View Profile
Looks great Dubcat! Some questions comes to my mind:

How can you extract specular values from a normal map?
I guess you basically linearly remap the "height" infos of the normal map, keeping the reflectance between the 2-5% range at F(0°), but that way, I can't understand how it can be better than a map derived from a reflection map which contains "proper" lighting pieces of information compared to a normal map.

Reflection and Specular maps are sRGB bitmaps (gamma 2.2) while normal maps and IOR maps are Linear (gamma 1.0), How is that handled?

Hey!
The IOR map is used in the "Fresnel IOR" slot and complements the glossiness map.

I a bit confused on the difference between IOR and Fresnel IOR inputs. Can you explain what properties are defined by each of those?

2018-03-22, 16:03:41
Reply #188

mferster

  • Active Users
  • **
  • Posts: 396
    • View Profile
@karnak

Yes, I am aware of how render elements work, thanks karnak. It looks like I misinterpreted what he wrote and got excited at the idea of simulated cross polarization filters.

2018-03-22, 17:16:56
Reply #189

karnak

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 66
    • View Profile
That was just my interpretation of what he wrote, and I hope I didn't accidentally offend you with it. :)
Corona Academy (May 2017)

2018-03-22, 18:18:15
Reply #190

mferster

  • Active Users
  • **
  • Posts: 396
    • View Profile
It's all good, I think you are quite right, that is indeed what he is doing.

But now it has lead me down a rabbit hole of experimentation to see if it is actually possible to simulate cross polarizing filters in Corona (or fake it atleast).
« Last Edit: 2018-03-22, 18:22:45 by mferster »

2018-03-22, 19:45:50
Reply #191

karnak

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 66
    • View Profile
Me too and I'm also excited about OSL in 3dsmax2019. A lot of stuff to experiment with! :D
Corona Academy (May 2017)

2018-03-23, 00:46:54
Reply #192

dubcat

  • Active Users
  • **
  • Posts: 456
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Wait, wait, wait!

Hey!
Create a "CShading_Components" pass and disable "Indirect". This should give you the same result as we get from cross polarizing and subtracting.
When we capture materials in real life, we use fast shutter speeds like 1/400+ to kill ambient light. We only want the direct flash/softbox light.

How can you extract specular values from a normal map?
I guess you basically linearly remap the "height" infos of the normal map, keeping the reflectance between the 2-5% range at F(0°), but that way, I can't understand how it can be better than a map derived from a reflection map which contains "proper" lighting pieces of information compared to a normal map.

Reflection and Specular maps are sRGB bitmaps (gamma 2.2) while normal maps and IOR maps are Linear (gamma 1.0), How is that handled?
Hey!
You are pretty much spot on.
In a perfect world we generate a 4+ point specular scan of a material, and run it through my generator. I only do Arch Viz and 80% of my texture library is still old school "non scanned".
By extracting height data from old school normal maps, we can at least fake depth somewhat. It's still better then not having any depth emulation at all.
And as a last resort, we can convert old reflection maps to IOR. This can be nice for wood materials, where we have to emulate the wood tubes that go in different directions. When we don't have a specular/normal map, and we don't want to use "Reflection Level" to clamp the Fresnel. "Reflection Level" is pure evil! (As a side note, pleeeeeeeeaaaase Ondra, can we get a Wood Material ?, http://www.cs.cornell.edu/~srm/publications/SG05-wood.pdf)

I a bit confused on the difference between IOR and Fresnel IOR inputs. Can you explain what properties are defined by each of those?
To be honest I have never done any research if the "Refraction IOR" behaves differently from "Diffuse IOR" in Corona, they should be the same. Most engines only have one IOR that control both diffuse and refraction.

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

Every now and then I get PMs from people that are really interested in materials and CG in general.
I use my Skype at work, so I can't add everyone there.
I've made a new Discord server that will be invite only, but everyone can join.
Send me a PM, and I will send you an invite.
« Last Edit: 2018-03-27, 01:20:03 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 / https://dubcatshideout.com  ( ͡° ͜ʖ ͡°)

2018-03-28, 17:22:02
Reply #193

Basshunter

  • Active Users
  • **
  • Posts: 23
    • View Profile
Hi @dubcat. I recently discovered this thread and I must say everything that has been talked here is SO interesting! However, as a new Corona user I feel a little lost when trying to find the beginning and conclusion of the topics. Is there any way to easy access files, pictures or written conclusions resulting from the topics treated? Maybe another thread?
« Last Edit: 2018-03-29, 07:15:04 by Basshunter »

2018-03-31, 23:51:42
Reply #194

dubcat

  • Active Users
  • **
  • Posts: 456
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Hi @dubcat. I recently discovered this thread and I must say everything that has been talked here is SO interesting! However, as a new Corona user I feel a little lost when trying to find the beginning and conclusion of the topics. Is there any way to easy access files, pictures or written conclusions resulting from the topics treated? Maybe another thread?

Hey!

I will consolidate everything here http://dubcats-secret-little-hideout.wikia.com/wiki/Dubcats_secret_little_hideout_Wiki, it will take some time before the wiki gets refined and contain everything.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 / https://dubcatshideout.com  ( ͡° ͜ʖ ͡°)