This evening I've been playing around with Sun.class, adding two additional routines for calculating moonlight illumination. These are selectable via a conf.ini entry in the [Mods] section. At the moment, the values to set are 0, 1 and 2, for dark, moderate and bright, respectively.
The moderate brightness scheme is from stock 4.12/B.A.T.
The darker scheme is adapted from HSFX7. The original construction had the illumination remain at essentially fixed brightness, and furthermore be at about the same level for all phases! Meaning that at midnight the illumination would not be like that in the upper right frame, but rather still like that in the upper left frame. I added an intermediate degree of illumination change with elevation, and a more sensible difference based on the phase as well. The HSFX7 overall darkness being maintained toward the full phase seems so wrong to me. If one wants a dark night, set the mission date accordingly.
The bright scheme is the stock 4.12/B.A.T. routine but with an additional exponential to boost illumination whenever the Moon is above the horizon. It is biased toward the 'lesser' phases and lower Moon elevation angles, thus resulting in brighter nights when the Moon is present (but not ridiculously so!).
In the image below are 6 captures on a night of a full Moon on agracier's New Georgia map (low latitude, to get the Moon to ride high in the sky).
The top row of two are the darkest, the middle row of two are intermediate, and the lowest row of two are the brightest.
The left column of three is just about 2 hours after sunset, when the Moon was fairly low in the east (to the left). The right column of three are at midnight, when the Moon was about directly overhead.
The algorithms are such that for the brighter illumination scheme the difference in illumination for a low Moon versus a high Moon (same phase) is SMALLER. Note how the top row pair of images exhibit a larger difference than does the bottom row pair. Furthermore, for Moon phases nearer to new Moon the increase in brightness is greater, meaning the difference in illumination between a crescent and Full Moon is smaller, making for brighter nights when the Moon is not near full phase.
I was inspired to do this upon reading a comment RABIZO had made in a very recent video of his. He expressed the desire to have brighter moonlight illumination. Hence my new scheme which boosts such for all phases and angular elevations.
I plan to release this as an isolated mod, which should be compatible back to at least 4.12, which includes vp modpack, I believe.
[click for larger]
