Author Topic: HOWTO: Capture and Calibrate Textures (PBR Style)  (Read 34902 times)

2015-11-26, 15:56:05

dubcat

  • Active Users
  • **
  • Posts: 452
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
This is how I capture and calibrate my textures for PBR rendering.

The basic PBR Albedo/Diffuse rule is that you stay within 53-243 RGB.
Lucky for us the "Macbeth Chart" has 53-243 swatches, wohoo!

I'm most interested in the "Luminance" of the calibrated texture and not the colors. But it doesn't hurt to have correct colors too!

- Must Have Gear -
* DSLR Camera (or a camera that can shoot raw/manual)
* Macbeth chart ("X-Rite ColorChecker Passport" is a popular one)

- Good to Have Gear -
* Camera Tripod
* Camera Remote Shutter Trigger
* Polarizing Filter (2x if you want to cross polarize)
* Camera External Flash (If you want to cross polarize)

- Camera Tips -
* Capture textures when there is diffuse light, like an overcast day.
* Always shoot in manual.
* Always shoot in RAW.
* Set a custom White Balance. (Optional)
* Use "Faithful" profile on your camera. (Optional)
* Try to keep the Macbeth chart as parallel to the surface as possible. (Sometimes I put tape on the back)
* Don't overexpose, you do not want to clip the Macbeth chart.
* If you are cross polarizing, set shutter speed to 200+, this will cancel out the ambient light.
* When you use a polarizing filter you will loose around 1 stop of light and the white balance will shift.

- Creating the Camera Pofile -
Take a picture of your macbeth chart in the same lighting conditions as your textures.
If you are using a macbeth chart from X-Rite, download the "ColorChecker" app
Start the "ColorChecker" app and load the picture.
The "ColorChecker" app will do it's thing.
That's all, you are done.

- Calibration -
I use Lightroom most of the time, but you can do the same stuff in Photoshop with CameraRAW. I'm using Photoshop in this guide.
Remember that these are RAW images.

If you open the RAW image in Photoshop without changing anything it will look like this. eeeeew nasty!



Before we can calibrate the image, we need to linearize it.

Open the "Camera Calibration" tab
Change the "Process" to 2010.
If you made a "Camera Profile", select it.



Open the "Lens Corrections" tab
Enable "Lens Profile Corrections" and "Remove Chromatic Aberration"



Open the "Detail" tab
Disable "Sharpening Amount"



Open the "Tone Curve" tab
Change the "Curve" to "Linear"



Open the "Basic" tab
Set "Blacks" / "Brightness" / "Contrast" to 0



The picture should now be linear and look like this.



Time to calibrate the image!

Select the "Color Sampler Tool"
Click on the "Luminance" swatches like this.



Lets fix the White Balance first.
Click on the "White Balance Tool"
Click on sample #2



I have made this little cheat chart to show you what the values should be.
The RGB is for Photoshop and the % is for Lightroom.



You want to get Sampler #1 and #6 correct first. That's 243 and 53.
Start by adjusting the "Exposure" slider until you get 243.
If #6 is too dark use "Fill Light" if it's too bright, use "Blacks"



#1 and #6 are correct, but the other swatches still need some tweaking.
This is where we use the "Targeted Adjustment Tool".
Select the tool and drag your mouse up and down over the swatches.
You need to fudge each swatch multiple times before each one is correct.
You can still adjust "Exposure" "Blacks" etc.



When you are done, click on the "Presets" tab and create a preset.



Open the picture without the macbeth chart and click on the preset.

Here is the calibrated picture, niiice.




The picture we just calibrated was shot without any polarizing filter.
If you want to capture really good textures, you will need to invest in cross polarization.

Here is the albedo texture from cross polarization.
That's one dirty concrete wall ! What is that ? diarrhea splatter ? Guess we will never know.



and this is the specular. (These were not calibrated only linearized)

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

2015-11-27, 22:06:24
Reply #1

lacilaci

  • Active Users
  • **
  • Posts: 757
    • View Profile
Interresting, correct me if I'm wrong. But if you shoot in raw, why choose "faithfull" profile in camera?? It's only good for "in camera" preview , you can shoot even in monochrome, it won't make the raw monochrome anyways. Or does the setting change something for the raw?

2015-11-27, 22:54:51
Reply #2

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5504
  • Let's move this topic, shall we?
    • View Profile
    • My Models
It won't change anything in RAW, but PS or Lightroom will recognise that profile and automatically will apply according tonemapping settings.
I'm not Corona Team member! Everything i say, is my personal opinion only. Render Legion does not endorse my words nor actions.

2015-11-27, 23:13:16
Reply #3

lacilaci

  • Active Users
  • **
  • Posts: 757
    • View Profile
It won't change anything in RAW, but PS or Lightroom will recognise that profile and automatically will apply according tonemapping settings.

Does it? I kinda remember it always like resseting those settings... Like, monochrome opened right away as colored etc.. But I may remember this wrong, using DxO these days :)

2015-11-28, 02:00:27
Reply #4

dubcat

  • Active Users
  • **
  • Posts: 452
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
The custom White Balance and onboard Camera Profile is optional. I just do it to keep everything consistent and non auto, it makes me sleep better at night ;)
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 / https://dubcatshideout.com  ( ͡° ͜ʖ ͡°)

2016-02-23, 02:41:57
Reply #5

SeBass

  • Users
  • *
  • Posts: 2
    • View Profile
Hi dubcat. just one quick question. If the final texture with the correct albedo is "brighter" than the original one, I suppose the final render will look wash out. So what would be the next step once the render is done? Apply a contrast curve or something in post? Apologies if I'm not getting things right. My mother language isn´t english, so I'm doing my best to understand this topic.

2016-02-23, 08:19:24
Reply #6

dubcat

  • Active Users
  • **
  • Posts: 452
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Hey SeBass
You are correct, PBR calibrated renders look bland.
Personally I use ArionFX in Photoshop. I love the default "RandomControl Camera" and "Canon DSC S315 #2" Response.
I've emulated the "RandomControl Camera" curve and shared it here as LUT.

On another note, I recommend that you underexpose your textures. I've captured a lot of bright kitchen textures, and when I've processed them in Photoshop/Lightroom they got really overexposed/wrong. Lately I've been calibrating my stuff with 3D Lut Creator, kickass tool.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 / https://dubcatshideout.com  ( ͡° ͜ʖ ͡°)

2016-04-11, 13:23:49
Reply #7

SairesArt

  • Active Users
  • **
  • Posts: 657
  • Pizza | The Cheesen One
    • View Profile
    • SairesArt Portfolio
Really awesome guide! Looked into cross polarisation, never came to my mind to use a polarizer like that!
Found this resource from a game dev on that topic: http://filmicgames.com/archives/233

@Dubcat: Since a simple photo is technically Diffuse + specular, wouldn't be the correct path to polarize the simple photo as well and calibrate the image through the polarizer with the chart? Or since we aim to shoot when overcast the specularity doesn't matter with textures that much to influence the outcoming image?
Or do you already use the polarizer in the albedo image and I didn't read it correctly in your guide?

2016-04-11, 19:10:21
Reply #8

dubcat

  • Active Users
  • **
  • Posts: 452
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Or do you already use the polarizer in the albedo image and I didn't read it correctly in your guide?
I didn't use a polarizer in the example as I wanted the guide to be generic.

This is my current workflow.

01. Take a picture of the chart with cross polarization.
02. Take a picture of the texture you want with cross polarization.

03. Open the chart picture in 3D Lut Creator.
04. Run the ColorChecker tool.
05. Save the LUT.

04. Apply the LUT to the texture pictures in Photoshop.

You can test this for yourself with the demo version of 3D Lut Creator, but you can't save the LUT/Pictures.
They have an official ColorChecker tutorial (Two Parts)

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

2016-04-11, 19:33:02
Reply #9

Juraj Talcik

  • Active Users
  • **
  • Posts: 3435
  • Tinkering away
    • View Profile
    • studio website
Dubcat, have you thought of building a personal scanner ? Would give normal/height from the cross-polarization. Not sure how but I've seen few of those setups recently, didn't seem that complicated at all.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik    My Behance portfolio
lysfaere.com   Something new

2016-04-11, 20:11:49
Reply #10

dubcat

  • Active Users
  • **
  • Posts: 452
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I began building a scanner two summers ago, but I ran into a couple of problems
This guy solved one of my problems by getting a free “Fast Polarization Modulator", lucky guy!


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

2016-04-11, 20:16:00
Reply #11

Juraj Talcik

  • Active Users
  • **
  • Posts: 3435
  • Tinkering away
    • View Profile
    • studio website
Hah, his blog post even mentions the inspiration from Ready-at-Dawn. That's the one I was impressed by :- ) Looked like ghetto version of Megascans you could possibly build.

I have giant white room in apartment building, so I could utilize that..

Edit: Read through all that...ok...I guess not.

Edit: And I thought that the mechanical part looked so easy.... I was more puzzled if the software was fully bespoke that did normal map and specular extraction.
« Last Edit: 2016-04-11, 20:24:05 by Juraj_Talcik »
talcikdemovicova.com  Website and blog
be.net/jurajtalcik    My Behance portfolio
lysfaere.com   Something new

2016-04-11, 20:37:45
Reply #12

dubcat

  • Active Users
  • **
  • Posts: 452
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I need to look into this normalmap method you mentioned.

My little prototype box had LED strips on each side. I took 4 pictures and combined them in Photoshop like this.
Image 1: Top light in Green Channel and Left light in Red Channel
Image 2: Bottom light in Green Channel and Right light in Red Channel
Then I combined the two images with Overlay blend and filled the Blue Channel with #8080FF (And adjusted it afterwards).
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 / https://dubcatshideout.com  ( ͡° ͜ʖ ͡°)

2016-04-11, 20:51:15
Reply #13

Juraj Talcik

  • Active Users
  • **
  • Posts: 3435
  • Tinkering away
    • View Profile
    • studio website
I need to look into this normalmap method you mentioned.

My little prototype box had LED strips on each side. I took 4 pictures and combined them in Photoshop like this.
Image 1: Top light in Green Channel and Left light in Red Channel
Image 2: Bottom light in Green Channel and Right light in Red Channel
Then I combined the two images with Overlay blend and filled the Blue Channel with #8080FF (And adjusted it afterwards).

Like this ?

http://www.zarria.net/nrmphoto/nrmphoto.html
talcikdemovicova.com  Website and blog
be.net/jurajtalcik    My Behance portfolio
lysfaere.com   Something new

2016-04-11, 21:13:39
Reply #14

dubcat

  • Active Users
  • **
  • Posts: 452
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Yes. I used megascan normal maps as reference back then.
Maybe they are using the same process.

EDIT: I forgot to say that I used "Highpass" with 256 radius on the pictures. That's the secret dDo value.

« Last Edit: 2016-04-11, 22:56:04 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 / https://dubcatshideout.com  ( ͡° ͜ʖ ͡°)