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

2018-04-11, 15:33:15
Reply #195

dubcat

  • Active Users
  • **
  • Posts: 460
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Paint manufacturers "fake" the brightness of darker colors on swatches. Luckily we can get measured "Light Reflectance Value" of the actual paint online.
The swatches also include IOR from what I understand.

Juraj sparked some ideas in my head yesterday, and last night I had a dream where I made a LUT that convert swatches to albedo.
The LUT will remove fake brightness and IOR from the swatches.
The more color samples I have, the more accurate the LUT will be.

I will share the LUT when it has at least 100 swatches, and then keep posting updates as I add more colors.

Here is an example of what it will do

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

2018-04-11, 18:15:12
Reply #196

peterguthrie

  • Active Users
  • **
  • Posts: 242
    • View Profile
    • Peter Guthrie Visualisation

2018-04-11, 18:33:14
Reply #197

mferster

  • Active Users
  • **
  • Posts: 401
    • View Profile
Dubcat's dreams are the best dreams. I wish my dreams were as productive.

*edit: So on a general bases what's the translatable value from a swatches Light Reflectance Value to a material's Albedo or IOR?
« Last Edit: 2018-04-11, 19:50:14 by mferster »

2018-04-11, 18:52:36
Reply #198

Dippndots

  • Active Users
  • **
  • Posts: 289
  • Alex Fagan Co-Founder at The Faction
    • View Profile
    • The Faction
Where did you get these swatches from originally dubcat? Color picking from manufactures' websites?

2018-04-11, 21:09:11
Reply #199

dubcat

  • Active Users
  • **
  • Posts: 460
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I love your dreams dubcat :)

hehe :)

So on a general bases what's the translatable value from a swatches Light Reflectance Value to a material's Albedo or IOR?

+

Where did you get these swatches from originally dubcat? Color picking from manufactures' websites?

Most painters in Norway use Jotun, so I sample my colors there.
They have a new 2018 set, that sparked the whole conversation with Juraj and Daniel R.
I can do a quick example. Lets use a dark color, since bright colors swatches are pretty accurate, we only need to remove 4% IOR from bright values.

Lets say someone want this dark brown NORWEGIAN WOOD 10981

You sample the manufacturers value



This color is #7f5c47

We go to e-paint and search for #7f5c47, because we don't know what the international standard name is.
The search result tell us that this color is part of "AMS Standard 595A -  Brown international"
And that the scanned LRV aka "Light Reflectance Value" is 13% Linear.

We can try to check the LRV of our current sampled value. But if we disable sRGB in "Corona Color Picker", we still get sRGB "Value" in Corona. I have made a requested that "Value" should be affected by the sRGB toggle, but I don't think it will happen. Maybe if enough people bug the devs about it, we can get this feature. It's really important.



Since "Corona Color Picker" "Value" is not linear, we have to do some side stepping.

Disable "sRGB", go to "0-100%", input 13.



Enable "sRGB" again and go back to "0-255".



Copy the Red value in this case 101.

Go back to our sampled color, and paste 101 into "Value"



We have now converted this preview swatch into real world LRV. But from my understanding this value still contain 4% reflectance from IOR 1.5.
But really, no one will notice this 4%. But I can't sleep well at night, knowing that I apply IOR 1.5 twice. And this is why you are one step ahead og the rest.

This is where I use pure white in "Environment Background", create a plane. Look straight down at the plane in orthographic. Use 1.5 IOR and 1 Glossiness (GGX glossiness will mess this up, if you use anything bellow 1). Then adjust "Value" until the sRGB match the original corona color value.

In our current case, this is what we get in IR with the corrected sampled color.



The brightest color is 113 sRGB. Because we have to deal with IOR.

But the brightest color in our sample is 101 sRGB, and these guys have to deal with IOR in real life too.

So we have to adjust our sample down to 87, 64 ,50.



Sometimes the darker colors change hue and saturation when you do drastic changed like this, you can manually correct this. But my LUT will take care of all this mess. The LUT is not generated in sRGB space.

TLDR; Just remember to give the devs a little PM that you want the sRGB toggle to affect "Value" in "Corona Color Picker", features like this depend on you!
« Last Edit: 2018-04-12, 17:00:05 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°)

2018-05-22, 14:40:57
Reply #200

IsmaeL

  • Active Users
  • **
  • Posts: 47
    • View Profile
This is exactly the stuff I dream about XD

Just made a bathroom furniture catalogue and color is a major issue. The client uses NCS and we had to adjust everything in Post to match print and swatches. Just horribly painful.
So I'm glad to see I'm not the only one annoyed by the Corona Color Picker.

It would be so nice if we could get the Cinema Color Picker, it is very elaborate and useful.

Talking about color, maybe we could ask the devs to automatically load the screen color profile into the Corona Frame Buffer. Because right now calibrating my screen is not very useful in Corona.
Falling in love with Corona

2018-07-06, 02:53:11
Reply #201

dubcat

  • Active Users
  • **
  • Posts: 460
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I was having a chat earlier this year about HDRi and Corona Sun/Sky. Theres been lots of stuff happening in RL, so I haven't had much time to be active online (both forum and discord). I thought this stuff might be interesting for some people, so lets recap.

I made the switch from Vray to Corona back in 2015, and one of the first things I noticed was that everything felt "orange". I'm talking about VFB 6500K white balance.
I can't express how good it was to drop that damn green vray usb dongle that kept disconnecting every 10 min, sometimes mid render.

Earlier this year, people were going crazy on social media about HDRi, how good HDRi light was. They said stuff like, if you want smooth shadows, you must use a HDRi.

So earlier this year, I wanted to answer two questions. Why do I feel Corona is orange, and why do 90% of the world prefer HDRi skies.

I live in Scandinavia and I know that the strongest sun is at 12:00 6/21/2018. This gives us a latitude of 59.917.
The closest HDRi I could find online was Peter Guthries 1216 Sun Sky which is 58 degree.

Peter has been a good boy and updated his skies with a calibrated sun, but I wanted to keep the original camera sun values. So I will be using the original HDRi which he also provide.

Peters 1216 Sun sky is pretty much perfect, but as with any real world HDRi captures, there will be sun flare. We have to isolate the sun from the sky. And the sky has to be isolated from the sun flare.

We have to base our test on something, or else it would be random values. As usual I will be using 18% grey on my test subjects, this is 117 sRGB. Corona sun will be matching Peters HDRi angle, about 58 degree. Corona sky is a dynamic map, it will change color and gradient based on the sun position. We will change "Horizon blur" to 0 and Ground "color" to black, to match Peters HDRi.

The first thing we have to do is calibrate our "camera" aka VFB. We are using Corona Sun and Sky with default settings.
We know our test subject is 18% grey aka 117 sRGB. We have to lower EV in VFB to -5.24 for our test subject to meet 117 sRGB.
-5.24 EV will be our base for the rest of this test.



Our next step is to isolate the Sun from the HDRi, I will do this inside 3dsmax with this mask.



When we isolate the sun from the sky, this is what we get. Remember that this is the original camera capture. Peter provides a calibrated sun version when you purchase the HDRi. Most companies will only provide the "Photoshoped" perfect version, but Peter is keeping it real. If your monitor is not calibrated, it will show up as black.



If we boost the HDRi "RGB Level" to 520, we will match our calibrated Corona Sun value.




This calibration phase has to be done with any HDRi. It doesn't matter if its CG-Source, PG Skies or anyone else. No real world commercial camera can capture the real world sun value in a HDRi. Most people use the 0.8 gamma trick, this trick will boost your sun value a tad bit, and mess your sky values up like there is no tomorrow! The best way to handle real world HDRis, is to isolate the sun from the sky and calibrate them separately, because the values are so far apart.

I've been splitting sun/sky on a bunch of real world HDRis and on average the sky is "the sun RGB Level" / 100. In our case that is 520 / 100 RGB = 5.2 RGB.

I had to mask the sun flares on this render to calculate the values.



We have our Peter Sun/Sky split and calibrated. It's time to match Corona Sun/Sky to our real world captured data.
Lets start with the sun.

Our first goal is to match the "softness of the sun", 2.5 Corona sun size does the trick.
Our next goal is to match the RGB. When we switch to "Direct Input" aka 1.0 White Sun. 1 sun intensity does not give us 1 intensity in the render. So we have to boost the Sun intensity to 1.12 (Corona error?).
To match the sun RGB we have to change Red to 254 and Blue to 252.



This is what we get if we just isolate the sun from the HDRi and do not remove the lens flare. It's kind of crazy how much lens flare affect the render. Since lens flares have much lower value than the sun, it will help generate smoother shadows. So maybe I judged those social media people too soon.



If we remove the lens flares, we get this from the HDRi. You can see all the direct shadows from the lens flare is gone.
This is what we base our Corona Sky on.



To get a close match we have to use "Turbidity" 1.7 (1.7 does not satisfy the Peter capture, maybe 1.5 would, but we can't try)  and these values inside a "Color Correction". Color Correction is linear so 1 * 2 would result in 2.



This is how Peter Guthries 1216 Sun looks calibrated



With our quick approximated values, Corona Sun/Sky looks like this.



So in the end. Even small lens flares from real world captured skies will give you more "detailed" skies. Since you mix the sun with less valued light sources. If you capture a sky with clouds, the clouds will in most cases go above +1 RGB. Resulting in more soft light sources.
Most HDRis will have white balanced suns. But if you use Corona Sun "Realistic" it will give you an "Orange" look.
« Last Edit: 2018-07-06, 05:15:38 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°)

2018-07-06, 03:52:02
Reply #202

arqrenderz

  • Active Users
  • **
  • Posts: 683
  • arqrenderz.com
    • View Profile
    • arqrenderz
Just WOW to the last dubcat post, you know a lot of this.
Where can u normal user start, in order to better understand all this concepts?

2018-07-06, 11:11:55
Reply #203

piotrus3333

  • Active Users
  • **
  • Posts: 18
    • View Profile
finally. thx for educating people about flares on hdris.
another thanks for all of you guys chasing fstorms tone mapping. great work. I'm spending more and more time on this forum because of content like that.

quick question about paint color samples: why subtract 4% form 13% LRV when corona's mat does energy conservation for you?
and what about doing it with composite map from max? (attached). 13% gray map and color sample on top in "color" blend mode plus maybe lowering saturation a bit in some cases (oversaturated samples made looking nice on screens)

2018-07-06, 11:34:41
Reply #204

johan belmans

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 723
    • View Profile
    • belly.be

2018-07-06, 12:36:51
Reply #205

Juraj Talcik

  • Active Users
  • **
  • Posts: 3699
  • Tinkering away
    • View Profile
    • studio website
quick question about paint color samples: why subtract 4% form 13% LRV when corona's mat does energy conservation for you?

I have found this to be very arbitrary ad-hoc introduced in Corona shader. It was done long time ago as quick-fix for people over-doing bright albedo.
It's not part of the energy conservation model but additional part on top. Perhaps the devs could show what exactly it does because I haven't found it to correlate with 4perc (the most common base reflectance of insulator).
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2018-07-06, 13:12:56
Reply #206

piotrus3333

  • Active Users
  • **
  • Posts: 18
    • View Profile
4% or 24% does not matter as long as diffused reflections are dimmed by direct ones. that looks ok to me in Corona but I also never bothered with side-by-sides.

2018-07-06, 15:04:08
Reply #207

karnak

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 66
    • View Profile
Let's say that the color was sampled with a spectrophotometer. What you get from that instrument is one reflectance value that contains both diffuse and reflection (with no distinction). So, if you want only the diffuse you have to know the reflection value and subtract it from the value the instrument gave you.

When you read that you have to subtract 4%, it's because they assume the color was sampled from a non-metal surface with the default 1.52 IOR (that at normal incidence equals 4%).
Corona Academy (May 2017)

2018-07-06, 15:29:08
Reply #208

piotrus3333

  • Active Users
  • **
  • Posts: 18
    • View Profile
correct me if Im wrong but „Diffuse” in corona mat describes total reflectance (diff + direct). when you add „Reflection” on top of that Corona dimms diffuse part to balance the energy.

2018-07-06, 15:40:22
Reply #209

piotrus3333

  • Active Users
  • **
  • Posts: 18
    • View Profile
...dimms „Diffuse” part to balance the energy.