Good morning all,
CIE skies are a great set of benchmarks for lighting analysis, but do not offer the same aesthetic richness as in real-life. One way of solving this is by using image based lighting to light the environment. The downside is that most of these HDR images do not offer appropriate luminance values. For example, a simple test of using ximage to look at a bunch of HDRs downloaded online and checking the luminance values of various pixels show me that they are nowhere close to the numbers that you get if I render out a HDR of a blank scene with a a gensky-created sky and ground.
I'd like to be able to "calibrate" the HDR so that it offers the same luminous effect as a CIE sky, plus the various objects around it. Here's the current approach I'm using, but I'm questioning whether it is good enough or if I missed something.
1. I use a blank scene with gensky to serve as a benchmark. The environment is basically the same as the one in the gensky manpage. However, I do not use the skyfunc modifier. This'll give me a floating solar disk, but a totally flat sky. I will attempt to match this base luminance with the HDR map before applying skyfunc.
2. Keep the light source definitions that gensky generates that represents the sun. This will provide the necessary sharp shadows and is hard to merge into the calibrated HDR image, which is inevitably going to have clipped luminance values.
3. Use pcomb to multiply the luminance values of the HDR image such that the average luminance values (thanks Greg for the tip last month! pvalue -h -d -b | total -m) of the empty parts of sky roughly match the luminance of my flat gensky environment. This happened to be around 160L in my winter test in Sydney.
4. Then modify the HDR image so that I delete all the sky and replace it with a flat 160L sky. This will give me a flat base upon which the skyfunc can work its magic. Keep the rest of the HDR intact (trees, buildings). I have the flatten it otherwise the existing suns in most HDRs will artificially multiply the skyfunc unrealistically.
5. Define a colorpict for the HDR map, with the skyfunc modifier applied to it. I.e:
skyfunc colorpict myhdrmap[... Stuff...]
myhdrmap glow skyglow 04 0.9 0.9 1 0 <-- unsure about this
skyglow source skyandground04 0 0 1 360
6. Render it out, when comparing a few random scenes with falsecolor, I find that the results of a HDR calibrated sky vs a CIE sky is very, very similar. The differences largely are due to things like the HDR having a much darker ground (black asphalt) or dark reflections (of trees, for example). In addition, the actual image aesthetically looks much richer with nicer reflections, but with the knowledge that the daylight (skyfunc) and sun are from the CIE definitions.
How does this approach sound? A few things I am unsure about:
1. The colorpict modifies Rgb reflectivity, the skyfunc modifies Rgb luminance, and the glow defines Rgb radiance? Is the way I have combined these three correct?
2. I haven't mentioned anything about colour accuracy. How would this be approached for a HDR map that doesn't have any benchmark colour checkers captured in it?
Would be interested in your feedback.
Kind regards, Dion
Good morning all,