This script is meant to produce beautiful natural color images. It uses global tonemapping to pack very bright values into the upper part of the spectrum. Resulted images should never have clipped values on bright objects like clouds or snow, while keeping other surfaces like soil or vegetation properly exposed, achieving a photographic look, because most modern cameras do this type of processing.I took inspiration and my experience from real-time 3d graphics in modern video games, as most of them now use High dynamic range for lighting calculations.
The script is perfect for complex scenes with vastly varying surfaces like volcanoes with dark volcanic soils, sunlit icecap slopes and smoke clouds. Even allowing creation of multi-seasonal time lapse with changing snow cover without adjusting parameters along the way. Cumulus clouds will look so tasty, you’ll want to leave them on your image.
Several tonemapping functions are provided:
0 - Simple Reinhard. C/(1+C) formula applied to each of the channels. May cause slight desaturation.
1 - Luma based Reinhard, applied to luminance only. More accurate representation of colors.
2 - Unhcarted 2 Filmic tonemapping. It’s curve has a kind of an S-shape, producing darker shadows. Trying to mimic analog film behavior.
3,4 - tonemapping in ACES color space (Academy Color Encoding System).
Because different channels have vastly different luminance (blue color being darkest, and green - brightest), they also overflow at different rate, when with growing luminance one channel reached its maximum before others distortions in hue and luminance may occur. Applying tonemapping in ACES color space fixes it by preserving luminance and desaturating very bright values. It is probably an overkill, as changes are subtle, visible only on very bright and saturated colors.
Improved luma based saturation function is also provided.
Author took the atmosphere correction from Color correction with Sentinel Hub script and Solar irradiance indexes from Natural color script. He tried to make it applicable to different scenes without too much of manual adjustments, but it is not always the case. Deserts, for example, may look too yellowish and ugly. He recommends in that case disabling atmospheric and solar corrections and switching to L2A. Unfortunately L2A for some reason have lower dynamic range, and sunlit snowy slopes and some clouds are clipped, and may show no detail anyway (along with some other artifacts).
1) Shiveluch volcano eruption. Smoke plume lit with low sun.
2) Uda river delta in April. Patches of green land are seen while Baikal lake is still covered with ice.
3) Florida keys and beautiful cumulus clouds.
4) Sun beams and beautiful weather patterns near southern Ireland shore. Date is very close to winter solstice, making sun beams particularly long.
5) Eastern Bosphorus strait Vladivostok year-around time-lapse.