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

2016-11-28, 19:05:36
Reply #30

laurenth

  • Users
  • *
  • Posts: 3
    • View Profile
Hello here,

I have been using similar workflows :
- shoot raw images with chart ( no polarization )
- get linearized tiff from dcraw
- white balance and expose in photoshop
-> all swatches match pretty well with the chart

I recently started using cross-polarization, and I noticed I couldn't use the same worflow :
- when I white balance my images at the end of the process, the patches of the chart don't all fall into place as they do with non polarized images.
-> if I expose according to the 3rd grey patch as I usually do I get too bright white, and too dark black

It feels like cross-polarization, which I use to remove specular lighting, removes specular also from the chart. It doesn't seem to remove the same amount of specular on all the patches, and thus I can no longer calibrate according to the chart values.
Matching the cross-polarized patches with the reference values using something like 3D lut creator might try to compensate that missing specular part, and do some odd color transformations.

Did anyone come across the same situation ?
Do you think that the specular part on the chart is neglectible and thus we can consider there is no spec in the chart ?

Any insights appreciated :)

2016-11-28, 19:49:39
Reply #31

dubcat

  • Active Users
  • **
  • Posts: 441
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I've made a custom calibration preset in 3d lut creator, it will only work with my camera/filter.
You can use my white to black values as a base to find the correct values for your own setup.

Albedo



Glossiness

« Last Edit: 2016-11-28, 23:54:36 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7

2016-11-29, 10:49:26
Reply #32

laurenth

  • Users
  • *
  • Posts: 3
    • View Profile
Thanks for the answer, I feel less alone in the world ^^
May I ask how you came up with these values ?

In my case, I tried to calibrate my polarized chart based on the brightest grey first since I found it's the one that might have the least specular ( because of the low glossiness ) and also even if there is a little specular in it, it should not be much compared to the value of the bright grey itself. I expect a bigger difference on the black.

2016-12-16, 22:43:54
Reply #33

dubcat

  • Active Users
  • **
  • Posts: 441
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
My samples are still not perfect, I'm improving my camera/light setup every month.
The secret is to have everything calibrated and then recreate the scene in 3dsmax.
I have HDRis of my light boxes and ring light (Diva Ring Light Nebula), these are calibrated to give me the same intensity/falloff as in real life. I've measured the distance/angle of these lights and recrated them in 3dsmax.
Then i shoot something with and without polarization filter. You can then create a glossiness map from the specular map you get from cross polarization (You need to light the object from all angles, or else the specular map will not be correct). I don't have any fancy app that generate the glossiness right now, so I adjust the map until the cross polarization diffuse/glossiness match the non-polarization picture.

I use this dcraw script to make linear raws
Code: [Select]
dcraw-9.27-ms-64-bit.exe -v -w -H 0 -o 1 -q 3 -4 -T *.CR2
I haven't found anything online about this stuff, so I'm improving as I go ;)

Edit:
I want to mention that I adjust my white balance in camera. I shoot the greycard of my Color CheckerPassport, go into custom white balance on my Canon and select the picture. You might think, but I'm shooting in raw, it doesn't matter. Well, it does matter when you run the raw through the script I just posted. The polarizing filter will tint your pictures, just white balance in camera and be done with it.
« Last Edit: 2016-12-17, 03:21:24 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7

2017-12-06, 21:23:28
Reply #34

philipb

  • Active Users
  • **
  • Posts: 12
    • View Profile
Dubcat!!!

Just looking back over this thread and ran across this:

"And this is how you create the Specular and Albedo texture.
I say 100-50% here, this depends on your filter. Only the ratio matters.
Here is my Layer stack (Linear 32bit)

When you shoot cross polarization, you get two pictures.
One with 50% Albedo and one with 100% Specular and 50% Albedo"

Can you explain the 50% albedo issue? When I do X-pol I tend not to extract a spec pass and just end up making bump/spec from the Albedo. But when i X-Pol capture my Albedo i expose as close as possible to the ColorChecker values and then bring them in line 100% with curves. Do you see a problem with this? Also, what is the significance of the 32bit space here?

PS. also, as we discussed before, in terms of getting a liner/flat RAW, I have found a great free open source, raw developer...... It's called Rawtherapee. It has a flat default which does not add any toning and so is perfect for developing textures from.RAW. I would highly recommend it to anyone looking to develop their own textures. It accepts custom camera color calibration (ala adobe dng profile), and lens correction profiles. It is really fantastic and is my go-to texture-from-raw tool.



2017-12-07, 20:10:55
Reply #35

dubcat

  • Active Users
  • **
  • Posts: 441
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Hey man!

Can you explain the 50% albedo issue?
When you cross polarize you will either get 50% abledo, or 50% albedo + 100 specular depending on the angle.
If you add the 50% albedo with itself in 32bit, you will get 100% albedo.

i expose as close as possible to the ColorChecker values

This is where the cross polarization headache comes in.
The polarization filter will lower the exposure a little.
You will only get 50% albedo max.
You can try to calibrate the camera without the filter, since the color checker values are 100% albedo + 100% specular. And then turn up the exposure, to compensate for the filter.
Or the optimal solution would be to tether the camera, shoot booth polarization pictures. Combine them in 32bit with Add, and see if the checker value is correct. If not, just remember to adjust both pictures with the same values.

what is the significance of the 32bit space here?
Since we are doing math, we have to use 32bit when combining the 50% and the 50/100% picture.

Rawtherapee
Thank! Will give it a try :)
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7

2018-06-17, 22:57:09
Reply #36

dj_buckley

  • Active Users
  • **
  • Posts: 184
    • View Profile
Hey Dubcat (or anyone else who might know the answer) sorry to reignite an old thread, but keen to know why in the original post from 2015 you change the Lightroom Process to 2010 initially for calibration?

I'm just looking into this properly now, and have been messing around in Lightroom with those Process options and find myself wondering what exactly they're doing and why you'd choose one over the other when it comes to texture creation.

I've just opened a random raw photo in lightroom and 'linearized' it according to the steps in the first post.  I then changed the process back to Version 4 (Current) and noticed it changes the tone curve and a few of the tone settings but maintains a similar look so I found myself asking how critical this step was.

Thanks

2018-07-01, 03:15:10
Reply #37

dubcat

  • Active Users
  • **
  • Posts: 441
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Thanks

Hey man!

The reason I used 2010 is because Adobe moved away from "Recovery" after 2010. Before ACES, CameraRAW Recovery was my go to tone mapper, it's just too good. Adobe has removed 32bit support for CameraRAW in the 2018 update, but you can still manually download CameraRaw 9.9 from their site.

If you select 2010 and do adjustments and then select Version 4, CameraRAW will auto convert the 2010 settings to version 4.

Like many others I've made the change from Photoshop to Affinity Photo. Because Affinity Photo has 32 bit floating point support and the 360 degree HDRi mode is 1000 times faster than the 2017 Photoshop feature. Photoshop clamp floating values above +16 and values bellow 0 is clamped to 0. If you try my ACES tone mapper Photoshop script, you might noticed black pixels, this is because of the poor 32bit support.

I have to edit the original post and update it to 2018 standards with homemade cheap Megascan setup.

Here are the differences

             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7

2018-07-12, 21:02:23
Reply #38

dj_buckley

  • Active Users
  • **
  • Posts: 184
    • View Profile
Quote
If you select 2010 and do adjustments and then select Version 4, CameraRAW will auto convert the 2010 settings to version 4.

Makes sense.

I'm actually using Lightroom.  The camera I use has a 'Flat' Picture Mode built into it which looks very Linear (RAW).  I've found if I load the RAW file into Lightroom and just switch the Profile to Camera Flat.  It looks pretty much like an original RAW file to me but I wouldn't really know otherwise.

If I'm correct, the workflow you were using with the 2010 process was purely to Linearize the RAW so you were actually seeing the original raw data right?  So I'm wondering with the Camera Flat profile, whether any of that 2010 process bit is relevant to me anyway.

Also if you can get the same results from 2014 process, I'm assuming you chose to use 2010 as it's what you were comfortable with through experience and you could in fact use either?

2018-07-12, 21:16:14
Reply #39

dj_buckley

  • Active Users
  • **
  • Posts: 184
    • View Profile
Just to add I'm thinking of just buying 3D LUT Creator and eliminating the need for Lightroom altogether as I'm starting to shoot my own textures with the macbeth more and more these days.

How does 3D LUT Creator deal with Removing CA and Lens Distortion though or doesn't it?  That seems like a critical step in the Lightroom workflow to me when creating textures?
« Last Edit: 2018-07-12, 21:20:24 by dj_buckley »

2018-11-28, 17:51:35
Reply #40

manuce

  • Users
  • *
  • Posts: 1
    • View Profile
I know its a old post but have you guys checked this mmcolorTaget tool in nuke ?

 This is the best tool to calibrate all the textures and hdri in one go. All the cool kids are using this :)

https://www.marcomeyer-vfx.de/?p=88