Board index FlightGear Development Effects and shaders

Stars and Milky Way visiblity

An exciting "new" option in FlightGear, that includes reflections, lightmaps, the particle system etc.. A lot is yet to be discovered/implemented!

Stars and Milky Way visiblity

Postby eatdirt » Thu Dec 02, 2021 9:12 pm

Although the original idea is to make ALS filters working in space, I ended up coding a few things onto our night sky in between.

I suggest you have a look in full screen mode and in darkness, the purpose of it is to be realistic :)
(and, it is not well tested yet on different screens yet).

Everything depends on one prop:

Code: Select all
/environment/darksky-brightness-magnitude


which is the darkest sky brightness magnitude in V band at zenith in magnitude per arcsecond^2. Best skies on Earth go up to 22, that's the setting in the pictures.


In space, no atmosphere, high enough to be above the ionosphere, the moon is around but the Cygnus region is glowing:

Image

Back into the atmosphere, nothing left to see with the moon around... (although it you really looking at carefully, we actually see the dark parts of the Milky Way where stars are hidden by interstellar dust)
Image

But if you wait a bit for the moon to go under the horizon, the glowing is slightly back:
Image



What is going on is that the shaders compute the relative contrast between the intrinsic Milky Way brightness and the dark sky brightness due to moon light diffusion in air as well as airglow from ionosphere.


Examples, the red color traces the darkest regions on the sky:

Half moon just rising. Only towards the zenith the contrast is big enough to see the Milky Way:
Image


A small moon is far less damaging and the sky brightness is really bad only in a halo around the moon:

sky darkness in red:
Image

the same without the red, Milky Way is a bit visible right from the Moon and high enough from the horizon:
Image

Yet some things to improve!
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Stars and Milky Way visiblity

Postby benih » Fri Dec 03, 2021 8:28 am

Based on what i have witnessed in reality in nice summer nights in the alps, i would have expected to see way more in the "pristine conditions" image.
OTOH this rapidly changes if there are light sources (cockpit etc) nearby, so, it is probably not bad at all for our purposes.
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Stars and Milky Way visiblity

Postby eatdirt » Fri Dec 03, 2021 10:11 am

i would have expected to see way more in the "pristine conditions" image.


I guess this is hardware related, I'll certainly should add some gamma correction somewhere to compensate for different settings. Thanks for the feedback.
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Stars and Milky Way visiblity

Postby benih » Fri Dec 03, 2021 12:45 pm

Could very well be my monitor!
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Stars and Milky Way visiblity

Postby MariuszXC » Fri Dec 03, 2021 1:46 pm

Which reminds me of an idea of mine..

The idea is to include a 'standard' greyscale test pattern as one of menu options. This would allow users to fine tune their monitors for brightness and contrast.
INOP
MariuszXC
 
Posts: 1061
Joined: Tue May 18, 2021 5:38 pm
Location: Europe
Callsign: SP-MRM
Version: 2020.4
OS: Ubuntu 16.04

Re: Stars and Milky Way visiblity

Postby wkitty42 » Fri Dec 03, 2021 2:13 pm

eatdirt wrote in Thu Dec 02, 2021 9:12 pm:the same without the red, Milky Way is a bit visible right from the Moon and high enough from the horizon:
Image

i see Cassiopeia on the left of the UFO below the moon and the Dolphin below and right of the UFO (kids diamond kite with a tail) but i'm not sure of what else i'm seeing in there... it looks great, though!
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Stars and Milky Way visiblity

Postby eatdirt » Fri Dec 03, 2021 9:24 pm

All right, I have just tested my screen with http://www.lagom.nl/lcd-test/contrast.php, I am good. But, the FG's snapshopt seems to be quite less contrasted that the rendering.

Before everyone is assuming that I am hallucinated, I just post this one, which is level edited on gimp and that wrongly enhances what you should be seeing :)

Image
Last edited by eatdirt on Fri Dec 03, 2021 10:06 pm, edited 1 time in total.
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Stars and Milky Way visiblity

Postby merspieler » Fri Dec 03, 2021 9:45 pm

Looks amazing... just feels a bit too bright with the lights.

I've tried to calibrate my screen using your linked site but then my dark colors get washed out...
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Stars and Milky Way visiblity

Postby benih » Fri Dec 03, 2021 9:57 pm

Hm, why is it so green?
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Stars and Milky Way visiblity

Postby eatdirt » Fri Dec 03, 2021 10:11 pm

Because it is level saturated in that precise level edited picture, and also because it is supposed to mimic night vision. To get that greenish color, I actually computed it using some recipe: https://github.com/eatdust/spectroll
Then desaturated it over the red as this color cannot be represented in sRGB, it has less red than 0. All in all, the green may look weird at high luminosity, but it won't be displayed at high luminosity, and at low lumi, it is actually looking fine and not so crazily far from the real thing (although, that's very much subjective, per definition)
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Stars and Milky Way visiblity

Postby Thorsten » Sun Dec 05, 2021 8:43 am

There's actually lots of viewing contrast involved - the very first pic looks like a pretty bright milky way to me when I see it fullscreen, but I can hardly make out anything when I see it next to the white forum backgrund in embedded form.

So I'd say it's pretty much spot-on for me!
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Stars and Milky Way visiblity

Postby eatdirt » Sun Dec 05, 2021 4:21 pm

i would have expected to see way more in the "pristine conditions" image.

So I'd say it's pretty much spot-on for me!


Plus, these pictures were now, December! The brightest parts are actually under the horizon for the northern hemisphere, and, indeed, they are quite less bright than what we see in summer and pristine conditions.

I've also tested the Magellan clouds, they look good to me, but I've seen them for real only during some vacations in Polynesia. So, I'll take some comments from the guys living head down ;)

I am doing another round of cleaning up, thanks to your comments and the coding mistakes spotted on the forum. There will be an extra prop
Code: Select all
/environment/galaxy-bulge-brightness-magnitude

that would allow to compensate for some bad screen rendering if needed. Also, the ALS filters will work on it, and as far as I've tested, the brightness of the ALS normal filter is really doing a good job at enhancing it if needed.
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Stars and Milky Way visiblity

Postby Thorsten » Mon Dec 06, 2021 8:03 am

It'd be nice if you plan a provision for the aircraft to report the current ambient light level in cockpit. Our favourite use case for spaceflight actually has a lighting model and can give you the number how much the illumination level inside the cockpit is - based on summing direct sun light through windows, Earth light through windows, plasma glow through windows as well as the various in-cockpit lights and the instrument background lighting.

It'd be a shame not to be able to use that feature... say you just dim the cockpit illumination near completely, you should see a lot from space :mrgreen:
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Stars and Milky Way visiblity

Postby benih » Mon Dec 06, 2021 8:21 am

Good Idea, Thorsten,
but to be compatible to most aircraft this should also take the Standard properties into account automatically:

https://wiki.flightgear.org/Aircraft_properties_reference#Controls wrote:/controls/lighting/panel-norm
/controls/lighting/instruments-norm
/controls/lighting/dome-norm

or aren't these standard?
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Stars and Milky Way visiblity

Postby eatdirt » Mon Dec 06, 2021 9:56 pm

can give you the number how much the illumination level inside the cockpit is


Oh yea :D In the merge request, I've been also retouching the stars rendering such that they are compatible with galaxy visibility and do honor

Code: Select all
/environment/darksky-brightness-magnitude


You write a number there saying which maximal magnitude / arsec^2 we can see, bang, more faint stars get loaded, or removed, as well as parts of the Milky Way. That's very basic, and could be improved with the ambient lux brightness in a more fashionable manner, but using simple relations on aircraft side should make it work straight away!
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Next

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 3 guests