HDRI Community
http://www.hdrlabs.com/cgi-bin/forum/YaBB.pl
General Talk >> Virtual Light >> IBL and gray ball lighting calibration issue
http://www.hdrlabs.com/cgi-bin/forum/YaBB.pl?num=1264525246

Message started by jasonhuang1115 on 01/26/10 at 17:00:46

Title: IBL and gray ball lighting calibration issue
Post by jasonhuang1115 on 01/26/10 at 17:00:46
Hi, Christian and everyone,

I am doing some IBL research trying to match my CG gray ball render to the photographed gray ball picture. What I don't understand is that why my CG gray ball render usually looks a lot darker than the gray ball in the photograph? Here below is my test setup:

shooting & post-processing HDRI:
I shot 9 JPEG brackets (DSLR + Sigma 8mm) and made sure the fastest brackets has not saturated pixels in the brightest area. The stitched spherical HDRI was then graded in Nuke to match the overall mid-tone of the reference gray ball image (shot with the same DSLR + kit lens), which is also in this case my BG plate, just to simplify the process.

Rendering:
In Maya, a pure diffuse sphere was textured with a file texture created in Photoshop (fill with 50% gray). The texture was gamma-correct inside of Maya and finally I apply a lens shader with gamma 2.2 as the Render Viewer LUT to address the linear workflow. Rendered with Final Gather and no CG lights in the scene.

What I got is: (Final gather primary diffuse scale = 1)


And if I crank up the Final gather primary diffuse scale to around 2, I will get better matched CG gray ball:


I am wondering if I did something wrong in the color management and linear workflow? I tested this workflow in different scenarios and my CG gray ball renders are always quite darker than the reference gray ball picture? Could anyone shed some light and I will be very appreciated.

cheers,
Jason

Title: Re: IBL and gray ball lighting calibration issue
Post by jasonhuang1115 on 01/26/10 at 17:04:13
I did some more tests and upload the results:
In this test, a chrome ball instaed was used for acquiring HDR environment map.


A sunset scene. DSLR + Sigma 8mm for HDR environment map. This is the closest CG gray ball render I ever got with the default Final Gather value.


Outdoor afternoon. Final gather value has to be increased 6 times.


I expect a much closer CG gray ball render without artificially increase the illumination like crazy in 3D. Any thoughts?

cheers,
Jason

Title: Re: IBL and gray ball lighting calibration issue
Post by Dschaga on 01/26/10 at 20:29:56
It's all about white balance!

There is no material (except a 100% reflective mirror) which doesn't tint the reflections - on the other hand the white balance of a digicam pano can give better results, but can also lead to wrong results with artificial lightsources.

btw, the error of the camera WB can be corrected when you compile your image set to an HDR image.

The FG issue have probably to do with the key/sunlight, because you need at least one or two bounces to get a good result. If we are talking about MR in 3ds max, you also can handle the WB in the MR photographic exposure dialogue.

btw .. the reason why i always loved the idea of sIBL is that you can get good results from images with less dynamic range, because hdri's with less fstops always tint the renderings.


Title: Re: IBL and gray ball lighting calibration issue
Post by jasonhuang1115 on 01/27/10 at 16:43:15
Thank you Dschaga.

Regarding the white balance, I am not quite getting what you mean.
If you were referring to the WB in brackets, although I didn't shoot RAWs but I am sure that all JPEG brackets and the gray ball image were shot with the same WB setting (sun light).
If you were referring to white-balance the HDR environment map as mentioned in Bloch book P.137, then I didn't do this because I was not trying to create a tone-mapped BG plate as in sIBL. I graded the HDR environment map to match my BG plate - the gray ball image.

About the final gather issue, what I can figure is that I will not be able to fully capture the sun intensity and hence the FG value has to be raised to add illumination. In the sunset scene above, the CG gray ball rendered with default FG value matches OK to the photographed one. However, what I wonder is that in the interior scene, where I (should) capture the full DR of the scene, my CG gray ball is still rendered much darker than the photographed one.

The BRDF of the gray ball is a big unknown in this test and pure diffusive CG gray ball is also in incorrect, but I wonder if this is the reason causing all these difference or there is something more to it.

Bt the way, to create a mid-gray texture, should I feed (R128, G128, B128) in a 8-bit color picker or (R187, R187, R187)?

Thanks,
Jason

Title: Re: IBL and gray ball lighting calibration issue
Post by Kel Solaar on 01/28/10 at 00:13:54
Hello :)

That's something I would like to see more : Reference Chrome / Gray Balls in HDR / IBL sets so that you can match your plate perfectly.

Your issue is one Christian could reply I think :)

I may be wrong ( like REALLY wrong) but one issue is that when we do an HDR it's basically not "calibrated" : we dump the overall dynamic range of a scene into a file by merging multiple shots, then we estimate the correct exposure by looking at our merged file and setting it at the value that seems good looking, not too dark, not too overblown.

Then we bring that into our rendering package, put a plate and it's not matching : the plate is not really linked to the HDR file exposure wise. And sometime it's even tonemapped, so there is even more bias beetween the plate and the HDR file.

There is another issue regarding the gray ball itself, some ways to find it's CG matching color are either :

- Shoot your ball with a gretagMacbeth card near it, the RGB value of each color squares is available, so you should be able to guess the RGB value of your ball ( http://farm2.static.flickr.com/1234/553511566_19ae5d2e97.jpg ).

- Ask someone with a RGB Spectral Colour Meter to give you the RGB value of your ball by averaging a few sample (http://www.industrial-needs.com/technical-data/colour-meter-pce-rgb.htm or http://scilution.tarad.com/product.detail_378756_en_2529036).

Basically I end up color correcting my HDR / Light rig until I match up the gray ball, then I'm ok to continue with a model. I never got the chance to have a perfectly matching RL gray ball / CG one in the first render,

Though it's strange you have such a gap in your renders.

Anyway, Christian is the way to go for this :D

I'm heading back for some code refactoring, time to remove the dust :)

KS

Title: Re: IBL and gray ball lighting calibration issue
Post by jasonhuang1115 on 01/28/10 at 02:57:41
Hi, Kel,
Thank you for the gretagMacbeth card tip. I have a gray card for white balance and it may be of use.

Although I did try to search some information regarding absolute calibration via some apparatus, I would love to know if I did something obviously wrong on certain component during the whole workflow before I lose my mind and invest on those hardware.

In my calibration process, the actual BRDF of the real-world gray ball is a big unknown. Also, how I should define the material for the CG gray ball is another unknown to me. But I was thinking (maybe totally wrong) if I can keep using the same real-world gray ball, lock down the CG material, and make sure scene full DR is stored (not talking about direct sun-lit scene) in my HDRI, then maybe I can indirectly derive a setting that links between real-world luminance and scene luminance. It will be great to know exactly how professional VFX artist set up the scene for calibrating the scene luminance.

Don't get me wrong. Bloch will probably tell me: it is art. If it is all that rocket science, where is the fun? I totally buy that. But, again, I don't want to miss an obvious point and then just "art" it out. That would be so wrong....


Kel Solaar wrote on 01/28/10 at 00:13:54:
Though it's strange you have such a gap in your renders.


I would love to know the reason... ;D I found that cranking the default exposure of HDRI 1 stop up will usually bring my CG gray ball into ballpark, and I cannot figure out what is causing this gap??

BTW, I have tried to evaluate several sIBL sets and find no consistent relationships on the mid-tone values between the tone-mapped BG and the HDRI. Bloch ever said that back in days, some stock HDRI baked gamma into their HDRI so the render looks brighter. I find no this situation in the sIBL sets.

Back to experiments.....

- Jason

Title: Re: IBL and gray ball lighting calibration issue
Post by Blochi on 01/28/10 at 04:29:21
Hey Kel, good time to dive into the code, I'm currently working on it as well... ;)

Regarding the mismatch - you're absolutely right, there's no direct link between the exposure of a backdrop plate and the HDR. Which is a pity. Just had a long discussion about this here: http://www.hdrlabs.com/cgi-bin/forum/YaBB.pl?num=1261857570

However, your workflow sounds very correct. All I can think of is that your Nuke grading isn't quite there. You gotta make sure to keep it linear during that process, and not flatten it accidentally by burning in the viewing LUT. Essentially, all that should be done is an exposure shift and a white balance. Maybe holding them side-by-side in another program, like PS or Picturenaut?

Mid-grey is really 18%, and that does transfer to 128, 128, 128 in a color picker.

To be honest, I never hit it out of the ballpark right away either. But that's not so important, because when you render into EXR you're doing the final color match in comp anyway. Even IF the white balance in your HDR is way off, what really counts is that it has the correct relative relationships between all colors. So it all falls together when you match the render in Nuke...

However, here's a great color checker that I just got myself for Christmas:
http://www.xritephoto.com/ph_product_overview.aspx?id=1257
It nicely fits in the set bag, and is in a plastic protective case. And especially the swatches that are slightly off-white are awesome, they are the best white balance picker I've ever seen....

Title: Re: IBL and gray ball lighting calibration issue
Post by Gerardo on 01/31/10 at 09:07:46
Yes, color (hues) relationships is a key aspect. This is why it's advisable a similarity between the working color space gamut and the output medium gamut. When their gamuts are very different in shape, size and center, it's very difficult to avoid clipping and shifts in the hues relationships later in post.  This is why some CG elements don't match with the BG plate in some cases, even when the lighting artists and colorist are excellent and the color grading system is high-end. And in those cases, it's better to complete the CG work with some kind of 3DLUT or color profiles conversions.  But when these gamuts are similar, the hues/colors relationships are kept and this is easily solved in post as Blochi has already mentioned. 
 
Besides the diffuse/reflection shading and lighting acquisition/reconstruction aspects (and probably  the need of a kind of spatial IBL in some cases), something that is worth to consider about the 18% middle-grey is that some digital cameras are calibrated to a middle-grey reflectivity of about 12.5% - not 18% (!) as old analog cameras. I'm posting this here too, because it's something commonly overlooked. Some people deny this, some others claims that this is an inaccuracy of digital cameras hystogram or their builtin lightmeters.  However even Kodak recommends now to increase the exposure by a half f-stop ( 0.5 compensation factor) when using the 18% middle-grey card. The percentage is not also a consensus, some people says 12%, some others 13% and there's also people reporting 10% for some digital cameras (which would increase the compensation factor). In HDRI photography, we would need to re-adjust our film speed accordingly - let's say from ISO 100 to ISO 80 - or even less - to try to compensate Kodak's recommendation.     
 
After this compensation, in the cheater's workflow (or inverse linear workflow), the middle-grey would be RGB 128 again (unless you compensate in the lighting reconstruction process), and in the linear workflow the linearization value depends on the working color space gamma. 



Gerardo

Title: Re: IBL and gray ball lighting calibration issue
Post by jasonhuang1115 on 02/01/10 at 22:41:09
Bloch, thank you for confirming the workflow and sharing experience.


Blochi wrote on 01/28/10 at 04:29:21:
However, here's a great color checker that I just got myself for Christmas:
http://www.xritephoto.com/ph_product_overview.aspx?id=1257
It nicely fits in the set bag, and is in a plastic protective case. And especially the swatches that are slightly off-white are awesome, they are the best white balance picker I've ever seen....


May I ask how this color checker can help you on the HDR imaging? Does it help more on the HDR photography (white balancing per se, or lighting for CGI works, or both? I checked the link and the accompanying CAMERA CALIBRATION SOFTWARE really interests me. :)

Thanks,
Jason

Title: Re: IBL and gray ball lighting calibration issue
Post by cateye on 05/04/10 at 17:48:13
Hi Jason,

I'm wondering where did you purchase the gray ball? Did you paint it by yourself? If yes, is there any standard or method to match the color of paint? Thanks.

Title: Re: IBL and gray ball lighting calibration issue
Post by jasonhuang1115 on 05/07/10 at 00:11:26

wrote on 05/04/10 at 17:48:13:
Hi Jason,

I'm wondering where did you purchase the gray ball? Did you paint it by yourself? If yes, is there any standard or method to match the color of paint? Thanks.


I paint the gray ball myself. The sphere is just a $4 Christmas ornament ball and I brought my 18% gray card to a local paint store and ask them to make the color.

HTH.
Jason H.

Title: Re: IBL and gray ball lighting calibration issue
Post by FlashPhoto on 04/01/11 at 18:58:38

wrote on 01/26/10 at 20:29:56:
It's all about white balance!

There is no material (except a 100% reflective mirror) which doesn't tint the reflections - on the other hand the white balance of a digicam pano can give better results, but can also lead to wrong results with artificial lightsources.

btw, the error of the camera WB can be corrected when you compile your image set to an HDR image.

The FG issue have probably to do with the key/sunlight, because you need at least one or two bounces to get a good result. If we are talking about MR in 3ds max, you also can handle the WB in the MR photographic exposure dialogue.

btw .. the reason why i always loved the idea of sIBL is that you can get good results from images with less dynamic range, because hdri's with less fstops always tint the renderings.



White Balance might be the hardest thing to learn in photography, because you start off thinking it is so basic, and it is in reality so very technical. This thread is a great example. Recently I was working on a design for a professional still motion video and I had to start over because of my misjudgment on the white balance. It was very frustrating seeing what happened when we put the image files on to a dvd with dvd burning software. It really proves how sure you need to be ahead of time.

Title: Re: IBL and gray ball lighting calibration issue
Post by spittle on 01/20/14 at 07:16:32
Regarding the grey paint - is there anywhere online to order the right colour paint?

I just bought an X-rite color passport - I took it to my local hardware store to try and get a match - I could see the screen as she was scanning it - the result was really different each time and she was trying to eyeball it.

She also scratched a nice shiny mark down the centre of my grey swatch, and then tried to wipe it with a rag with paint all over it until I politely told her to hand it back.


Title: Re: IBL and gray ball lighting calibration issue
Post by Rork on 02/05/14 at 12:46:15
if you have the cash: http://akromatic.com/gadgets-shop/

Title: Re: IBL and gray ball lighting calibration issue
Post by spittle on 02/11/14 at 08:39:36
I'd love to but can't really justify it at the moment. Anyway, I managed to get a paint match and have made my grey ball.


Title: Re: IBL and gray ball lighting calibration issue
Post by spittle on 05/17/14 at 13:51:41
EDIT (I messed up)...

I'm still trying to figure out how to calibrate my HDRIs,

I shot a grey ball, mirror ball, and colorchecker within my HDRI pano to simplify things, and I'm using one of the source images as my reference/backplate (one that includes the probes and checker).

Because I included the CC in the pano it was easy to scale the pano to match my reference exposure in HDRshop.

I've calculated the mirror ball reflectancy and plugged that into vray/Max (about 55%), I stuck a grey ball in too (I took the linearized value), which is (more or less) as per my color checker.

As per Jason, I'm experiencing a mismatch. My CG objects are rendering too bright. This requires me to adjust the multiplier on the HDRI, which to me makes the 'calibration' to the reference exposure (as mentioned in other forum posts on here) not worthwhile.

Also I've been reading HDR imaging, acquisition, display and IBL. This has a chapter on this process. However there was no mention of exposure or grading to match a reference image.

They were also using their grey balls to calculate the missing sun intensity of an exterior pano, but I can't understand how that could be possible without first aligning to real world values.

Am I missing a trick?

I could start calculating the difference between my render/real grey balls and adjust to suit, but as I mentioned before, the 'HDRI godfarthers' book didn't do this. And it is my understanding that it would be impossible to calculate the missing sun intensity of an exterior pano with an arbitrarily scaled HDRI.

Title: Re: IBL and gray ball lighting calibration issue
Post by spittle on 05/17/14 at 23:27:33
Also - just to add - I've calibrated my response curves and everything has been done in linear space.

Title: Re: IBL and gray ball lighting calibration issue
Post by Kel Solaar on 05/25/14 at 07:52:24
You shouldn't have any issues matching your reference color rendition chart provided you captured the whole dynamic range of your scene and worked linearly all along, from raw conversion to final merge. Now no DSLR will be able to capture the full dynamic range of a bright summer sun even shooting at 1/8000 f10 or f12 it won't happen. It means you have to use a ND filter, and a very big one. Problem using those is that you will hit some serious image color degradation.

The color rendition chart is the only thing you can trust, and should be your reference while calibrating everything: whitebalancing and setting your HDRI base exposure.

KS

Title: Re: IBL and gray ball lighting calibration issue
Post by spittle on 05/25/14 at 12:23:53
Hi KS

I'm first trying to calibrate HDRIs with no clipped pixels. Once I've figured that out it's onto capturing the sun.


Based on what others have posted, I'm interested to know if this approach is working for some:

1) Grade the HDRI so that the color checker in the HDRI matches the color checker in the backplate.
2) place HDRI in environment slot in the renderer
3) Select camera exposure settings as per those used to shoot backplate
4) enable exposure to 'affect background' in your renderer.
5) render.

The render looks as per your backplate?

From reading various posts the above seems to be the common workflow - correct me if I'm wrong.

To have a controlled test I did the following:

1) I rendered out a 32bit vray sky environment map from 3ds max; I disabled exposure to 'affect background' for this - this gave me a perfectly linear HDRI - and a HDRI that I know is scaled correctly.

2) I did a regular camera perspective render with exposure settings enabled - this is equivalent of my backplate.

So after a side by side inspection, there is absolutely no correlation between the values in the environment map and those in my perspective render. The environment map is WAY brighter with no values under 1.

And if I load the rendered environment map back into my environment slot, the result is identical.

So to me something is not right with this workflow. Or maybe I've been thinking about this way too much and my head's turned to putty!  :D

HDRI Community » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2021. All Rights Reserved.