Re: blackbody and daylight functions

Larry Gritz

The "sky color by temperature" function is just a model that sort of relates color temperature to a plausible overall color of the sky integrated over all directions. In a rendering context, I'm not sure how or why you would use this. You certainly wouldn't want the sky to be this color, because it would be the same in all directions. What you really want is the correct directional radiance function.

Hosek/Wilkie "An Analytic Model for Full Spectral Sky-Dome Radiance" from SIGGRAPH 2012 is usually the go-to on this topic. That paper, and some other work from the same researchers, can be found here:  I think most studios have an in-house shader that implements this paper or some fairly close variant. I believe there are open source implementations in various shading language already out there to be found with a little googling.

The state of the art is likely this year's EGSR 2020 paper from Sebastien Hillaire, "A Scalable and Production Ready Sky and Atmosphere Rendering Technique," which describes what's implemented in Unreal Engine. Here's the paper: and here's the code (MIT licensed):

-- lg

On Jan 11, 2021, at 5:40 AM, chrisbrejon@... wrote:

And just for the record, it looks like there is a CIE standard for sky values :

This web app generates sky luminance and radiance distributions using the updated Perez All-Weather Sky model, as defined in ISO 15469:2004(E) and CIE S 011/E:2003. You can dynamically adjust each of the Perez sky coefficients individually, choose any of the 16 CIE Standard General Skies, set your own direct and diffuse illuminance/irradiance values, or use annual hourly weather data for dynamic simulations or cumulative sky distributions. It also provides a range of different sky subdivision techniques and resolutions, including Tregenza’s 145 patch sky and Reinhart’s extensions.

The Commission Internationale de l’Éclairage (CIE) has defined a set of 15 standard sky types for modelling the radiance/luminance distribution under a wide range of weather conditions from overcast to cloudless, and with or without direct sunlight. The 16th varient corresponds to a much simpler mathematical model for overcast skies defined and used by CIE prior to this standard.

The various sky types are generated using different values for each of the 5 sky coefficients shown in the panel above.

Quite cool !  ;-)

Larry Gritz

Join to automatically receive all group messages.