Author Topic: HOW TO: Make a Calibrated Material Scene  (Read 16708 times)

2017-10-06, 02:05:35

dubcat

  • Active Users
  • **
  • Posts: 456
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
If you are new to CG, stuff like reflectance / albedo / sRGB (Gamma 2.2) / RGB (Gamma 1.0 / Linear) can be confusing.
In this post we will try to demystify these therms and show you how make a calibrated material scene.

There are two approaches to get the same end result.
# Use a fixed light intensity and adjust the camera exposure.
# Use 0 EV camera settings and adjust the light intensity.

We will use the second approach, because it's more practical. We can swap HDRI maps and nothing will break.

--= Sphere =--

We need a sphere to calibrate our scene.

Make a 100x100x100cm box, scans are usually 1m.



Apply a TurboSmooth modifier and use a high Iteration amount, I used 6 here.



Apply a Spherify modifier



The sphere has shrunk to 83.966cm, if you used the same settings as me.
To correct this, open the scale tool and input 119.096 into the "Offset:World %" box.
The sphere is now back to 100cm



The sphere is now hovering about 9cm above the pivot point.
This step is not essential, but stuff like this is really irritating!
Select our sphere, right click somewhere in the scene and click "Convert to:" > "Convert to Editable Poly"



Click on this wrench icon "Utility"
Click on "MAXScript"
Paste this code into the editor

Code: [Select]
for i in $ do(
i.pivot = [i.center.x,i.center.y,i.min.z]
)



Now CTRL + A the code, and drag it onto your Toolbar to make a Macro Button.
Select your sphere and click the macro button.
The pivot point should now be in the center of the sphere at the bottom.

Open the Move Transform tool and reset everything to 0,0,0.



--= 18% Gray Material =--

Gray cards are usually 18% reflectance. ColorChecker Passport "Neutral 5" is around 19.7%.
You might think, 18% what ? RGB ? sRGB ?

We are talking about 18% linear/RGB.
Create a "Corona Color" map



Click on the color preview to open "Corona Color Picker"
Uncheck "sRGB" and go into the "0-100%" tab.
Input 18, 18, 18 here and click "OK".
Do not input 18 into "Value", for whatever reason "Value" is always sRGB.



If people are talking about 90% white, they are talking about 90% linear/RGB.
Here is an overview of the average ColorChecker Passport swatches.



When you are capturing textures in real life, try to get "Neutral 5" as close to 122 sRGB as possible in camera (tethering is a huge help here). And then adjust your photo to match 100% in post.
I've noticed that on lower/medium end DSLRs you will get a better result by shooting for "Neutral 8", that is 201 sRGB.

Create a "CoronaMtl" and hook our 18% gray map into "diffuse color".
Leave Reflection at 0 while we calibrate.
Apply the material to our sphere



--= Render Settings =--

I usually use "Image Aspect" of 1.0, but do whatever you want.



Go into Performance
Set "Secondary solver:" to "Path Tracing"



I usually enable these render elements, but do whatever you want.



--= Calibrating Our HDRi =--

I will use "Apartment Livingroom 2015 – Interior" from mastering cgi in this example, because everyone and their mom has this HDRi.

Hit 8 on your keyboard and drag the HDRi into "Environment Map", this will auto change the mapping of the HDRi to "Spherical Environment".
3dsMax projects HDRi maps from the outside, this will flip our map. We have to counter this with -1 U Tiling. I wish Corona could auto apply this like "Spherical Environment".
Set Blur to 0.01



Hit "U" to go into "Orthographic" view.
Select your sphere in the view port and hit Z, this will lock your camera to the center of the sphere.
You can now hold ALT and middle mouse button to rotate around the sphere.

Fire up Interactive Render
Inside the VFB set "Saturation" to -1. We want even RGB values.
Our goal is to align the camera to the brightest spot in our HDRi. In my case that is the window above the sofa.
Rotate around and right click in the center of the sphere until you find the highest "Tonemapped sRGB" value in the center of the sphere.



18% gray is 0.459 sRGB float / 117 sRGB. We need to calibrate our HDRi until the brightest spot on our sphere is 0.459 sRGB float / 117 sRGB.
Go back into the HDRi map and adjust the "RGB Level" until the brightest value is 0.459 sRGB float / 117 sRGB.
I usually make a desaturated version of the HDRi to remove all color cast, then I plug the colored HDRi into "Environment overrides".





Calibrated HDRi



It's time to hit P to go back into Perspective mode.
Set "Saturation" back to 0 in the VFB.

Hide the sphere and import a real model. A little tip, always create materials on the actual object it's meant for, and not on a fancy shader ball!

--= Notes =--

Materials with proper ColorChecker values will look very flat and boring. This is how it should look.
Linear raw photos are just as boring.

You can toggle one of my photographic LUTs to see how the material will look in a final render.

3% black sphere with photographic LUT enabled


These are the official ColorCehcker Passport sRGB values.
If you capture your textures with a properly lit Checker and use this scene. Your materials will stay consistent and correct.

« Last Edit: 2017-10-13, 05:34:48 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 / https://dubcatshideout.com  ( ͡° ͜ʖ ͡°)

2017-10-06, 10:44:15
Reply #1

Fluss

  • Active Users
  • **
  • Posts: 408
    • View Profile
Awesome stuff as always! Thank you for sharing your knowledge! 👍

2017-10-06, 12:11:20
Reply #2

johan belmans

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

2017-10-06, 13:24:04
Reply #3

nkilar

  • Active Users
  • **
  • Posts: 785
    • View Profile
    • My personal website
Dude, you are something else... Thanks! :)

2017-10-06, 13:57:33
Reply #4

Juraj Talcik

  • Active Users
  • **
  • Posts: 3618
  • Tinkering away
    • View Profile
    • studio website
Straight into PBR Bible :- )
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2017-10-09, 09:33:22
Reply #5

srikken

  • Active Users
  • **
  • Posts: 36
    • View Profile
Super, Thank you!



The ColorCehcker Passport, would it be better to just use it as a bitmap or make an individual material for each color and model a simple ColorCehcker Passport?

2017-10-09, 13:22:33
Reply #6

Alexp

  • Active Users
  • **
  • Posts: 155
    • View Profile
18% grey or 13%?

I found a nice document to explain the difereces. In perfect spanish. And Im a bit confused.
https://blog.foto24.com/carta-gris-que-es-como-usarla-exponer-correctamente/#

2017-10-09, 13:55:01
Reply #7

burnin

  • Active Users
  • **
  • Posts: 835
    • View Profile
^ Google Translation to English > Gray card: what it is and how to use it to expose correctly

Confused about?
18, 13 or 12% - Is your choice, as you see it acceptable...

Quote
This value each photographer must decide whether it is acceptable or not.
« Last Edit: 2017-10-09, 14:02:01 by burnin »

2017-10-09, 13:59:58
Reply #8

Alexp

  • Active Users
  • **
  • Posts: 155
    • View Profile
^ Google Translation to English > Gray card: what it is and how to use it to expose correctly

Confused about?
It's your choice, as you see it acceptable...

If we need to take reference from 18% grey or 13%

2017-10-09, 14:04:10
Reply #9

burnin

  • Active Users
  • **
  • Posts: 835
    • View Profile
Updated the previous post.

Personally, i always deviate a bit... it's a personal style, preference.
As long as you know what you're doing.
;)

2017-10-10, 13:02:46
Reply #10

dubcat

  • Active Users
  • **
  • Posts: 456
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Hey guys

The important thing is to have a properly lit color reference next to whatever you want to capture. Capture the color reference as close as possible to the specified value. Adjust the raw image in post until the values match 100% to the specified value.

Once you have calibrated your HDRi inside Corona. It doesn't matter what diffuse color the sphere has, because the sphere will always be correct. If you change the color from 18% to 90%. The brightest part of the sphere should be 243 sRGB in VFB.

Since we are using 0 glossiness the white will dim a little. I'll remove the reflection/glossiness part from the main post later, so it dosn't add any confusion.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 / https://dubcatshideout.com  ( ͡° ͜ʖ ͡°)

2017-10-12, 16:58:43
Reply #11

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5720
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Materials with proper ColorChecker values will look very flat and boring. This is how it should look.
Linear raw photos are just as boring.

You can toggle one of my photographic LUTs to see how the material will look in a final render.

So should i do authoring of materials without tonemapping and only occasionaly turn tonemapping on, to see how final result will look? Also, the thing is that whenever i use one of your photographic luts, i feel that i always need to turn down exposure by 2/3-1 stop. Normally that isn't a problem, because i turn lut on, turn exposure down and continue working on other settings, but if i'd have to constantly fiddle with lut and exposure settings just to check how material will look with proper tonemapping, that would be very tedious. Or maybe i completely misunderstood workflow?
I'm not Corona Team member. Everything i say, is my personal opinion only.

2017-10-12, 19:58:17
Reply #12

dubcat

  • Active Users
  • **
  • Posts: 456
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Or maybe i completely misunderstood workflow?

Hey man!

You are spot on. The main objective is to calibrate the light source, so you know the brightest part on the object is the actual albedo.

Like you said, you have to be in full linear default mode to see the real values, but use tone mapping and LUTs to see the final result. I usually save both settings and just hit load in VFB.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 / https://dubcatshideout.com  ( ͡° ͜ʖ ͡°)

2017-10-12, 20:10:35
Reply #13

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5720
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Save/load might be good idea, i'll give it a try. Thanks!
I'm not Corona Team member. Everything i say, is my personal opinion only.

2017-10-13, 16:07:07
Reply #14

johan belmans

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 722
    • View Profile
    • belly.be
Hi Dubcat,

Can you explain me why it is important to desaturate the HDRI with a color correction node together with desaturating the VFB.
Because to me it seems illogical too desaturate twice.
Although I noticed you get different sRGB values.