Loading [MathJax]/extensions/Safe.js

Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: Experimenting with selectable moonlight landscape illumination  (Read 864 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6231
Experimenting with selectable moonlight landscape illumination
« on: October 21, 2024, 09:22:48 PM »

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]
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

RABIZO

  • Modder
  • member
  • Offline Offline
  • Posts: 531
Re: Experimenting with selectable moonlight landscape illumination
« Reply #1 on: October 22, 2024, 08:53:21 AM »

Thank you for watching "Glenn".

I darkened the room when making a gameplay video.
Making it dark made it difficult to see where the keys were.
I made it with a setting of around 6:30 in the evening, but I got comments saying "it was too dark to see."

I'm looking forward to the new mod.
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6231
Re: Experimenting with selectable moonlight landscape illumination
« Reply #2 on: October 22, 2024, 09:38:59 AM »

My image above should be viewed on the same monitor one uses during play. Of course, if you use an after effects app such as Reshade and which notably alters the brightness and/or contrast, the results will not be directly comparable. I use Reshade--which was in effect during the screen captures--but my selected effect does not make a particularly significant change in brightness/contrast.

As a way to compare my three results with your current game, do this for a QMB mission.

Select a map near the equator (DECLIN value no larger than about 20 or so), set the mission date to Sept 24, 1942 (24.09.1942) and the time to 00 hours (midnight). Set the weather to no worse than Hazy. The map should have both land and water; if you have my modded version of agracier's New Georgia map, that would be good (although I have since made some small changes to my own.)

Take a screenshot and compare it against the image in my previous post, looking at the three captures in the right column, which were made at midnight. If my bottom right image is obviously brighter than your screen capture, my alteration should offer a brighter moonlit night if needed for some particular purpose.

Again, one can easily change this by making the relevant change in conf.ini.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

BMS

  • member
  • Offline Offline
  • Posts: 65
Re: Experimenting with selectable moonlight landscape illumination
« Reply #3 on: October 22, 2024, 12:45:00 PM »

DBW has varying moons and light at night. Once a month its light enough to fly and land. try 3/11/1941
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6231
Re: Experimenting with selectable moonlight landscape illumination
« Reply #4 on: October 22, 2024, 01:11:40 PM »

DBW has varying moons and light at night. Once a month its light enough to fly and land. try 3/11/1941

The issue under consideration is not that there is no variance in the Moon's illumination. The game has always treated the Moon with a decent enough consideration of reality.

It's more that the level of illumination can be affected very significantly by such things as the room lighting one is playing in, or the monitor performance for dark imagery, or the user's monitor settings for brightness and contrast, or the impact of image after processing utilities like Reshade.

It's quite tough--probably impossible--to render the nighttime in just a single way that will be satisfactory in all situations for all players. Hence my idea to offer a means to select from additional options.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6231
Re: Experimenting with selectable moonlight landscape illumination
« Reply #5 on: October 22, 2024, 04:50:29 PM »

Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

RABIZO

  • Modder
  • member
  • Offline Offline
  • Posts: 531
Re: Experimenting with selectable moonlight landscape illumination
« Reply #6 on: October 22, 2024, 06:34:11 PM »

Thank you, "Glenn".
I tried it.

8/15, 6:30 PM. View of Rabaul.

Same as before.



After adding "!_0_WxTech_Sun-class".


Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6231
Re: Experimenting with selectable moonlight landscape illumination
« Reply #7 on: October 22, 2024, 07:00:44 PM »

RABIZO,
Did you add the entry I supplied to your conf.ini [Mods] section and make sure the field is set to the value of 2?

If the entry is missing, the game default brightness is used, which is the value of 1 (0 is dark and 2 is bright.)

Another thing to be aware of is that the Sun should be far enough below the horizon for the moonlight to dominate. Try again with the time set about 1 hour later, to ensure it's full dark of night.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6231
Re: Experimenting with selectable moonlight landscape illumination
« Reply #8 on: October 22, 2024, 07:06:18 PM »

I forgot to add that a mod must reside above any other folder which contains the same resource file. If you have the handy little utility, classcheck.exe, you could easily determine if any classfile conflict is occurring.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

gunny0134

  • Modder
  • member
  • Offline Offline
  • Posts: 1357
  • no skill just simple, but seek the best beauty !!
Re: Experimenting with selectable moonlight landscape illumination
« Reply #9 on: October 22, 2024, 08:22:48 PM »

There's no change in me either.

I set the folder location in this mod very high to avoid conflict between class files.

 - 4.12.2m, BAT 4.1_WAW
 - time_20:00
 - Mission name: Glenn_invadesB

And...why is the mod name Sun.class ?  Moon.class is not intuitive ?
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6231
Re: Experimenting with selectable moonlight landscape illumination
« Reply #10 on: October 22, 2024, 08:40:24 PM »

Hmmm... It *might* be necessary for QMB mission files to have a [SEASON] section in order for the Moon to be properly handled, like this example. Without it the completely wrong Moon phase texture tends to be selected. Such as these fairly thin crescent phase images when the correct one would be at least near to full.

[SEASON]
Year 1941
Month 7
Day 22

There is a MoonPhase.class in which the astronomical calculations are performed.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

gunny0134

  • Modder
  • member
  • Offline Offline
  • Posts: 1357
  • no skill just simple, but seek the best beauty !!
Re: Experimenting with selectable moonlight landscape illumination
« Reply #11 on: October 22, 2024, 09:46:07 PM »

All of the missions being tested include the [SEASON] section.

 - 1941.07.22
   QMB_New Georgia map : no moon
   FMB_Single mission_Glenn invadesB : no moon

By the way, I think it is bright enough even without Sun.class mod, from the original date presented in the New Georgia map.


Logged
Pages: [1] 2   Go Up
 

Page created in 0.049 seconds with 23 queries.