Board index FlightGear Development Effects and shaders

Light scattering on hazes

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

Re: Light scattering on hazes

Postby bugman » Fri Dec 04, 2015 4:47 pm

Thorsten wrote in Fri Dec 04, 2015 4:22 pm:The book is 'Ilmakehä ja sää' by Karttunen, Koistinen, Saltikoff and Manner - it's an older one from the local library.


Ok, I don't know that one. The Halot book is known outside of Finland for its spectacular images. He really should translate it to English and make some more money out of it!

The problem with this is that if I'd actually render it, everyone will claim that this can never be real.

I think lots of the more spectacular ones are fairly common in Antarctica, but for instance the Parry occurs perhaps once per year in Finland. So I'll confine myself to the more simple ones. Perhaps I'll add circumhorizontal and circumzenithal rings - they also seem to be reasonably common (i.e. more than ten days a year here).


It might be interesting for winter flying in northern Scandinavia, or over Antarctica. I have once seen the 46 degree halo in an aircraft before, but it was very, very faint. The super rare 120 degree halo would also be cool to see one day. I remember seeing a partial one from the moon a long time ago, together with the 22 and partial 46 and some common moon dogs!

The sun dogs are actually already done, it's what I referred to above as 'side sun' (I translated 'sivuaurinko' directly - that's the problem when you read not in English - you tend to pick up odd nomenclature...)


Like this:

Image

The sun dogs are pretty clear in your two images above! Especially the top one where it's sitting on the 22 degree halo, or is that a cloud causing that effect? I meant that I look forward to seeing it while flying in FG :) Anyway, could they be made a little more triangular? With the edges on the 22 degree and 120 degree halos? They tend to stretch and fade out along the halo lines.

Are you also considering glories? These tend to be a much more common sight in an aircraft.

Regards,
Edward


Some post following this one were moved to the new topic Implementing moonlight (or not).
Last edited by Johan G on Sat Dec 05, 2015 6:10 pm, edited 1 time in total.
Reason: Some post following this one were moved to the new topic "Implementing moonlight (or not)".
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: Light scattering on hazes

Postby Lydiot » Fri Dec 04, 2015 5:38 pm

Thorsten wrote in Fri Dec 04, 2015 12:50 pm:I couldn't resist to persuade ALS to do some of the more common ones, so here we go:-)


Looks AWESOME!
Lydiot
 
Posts: 1016
Joined: Tue Oct 22, 2013 11:50 pm

Re: Light scattering on hazes

Postby wkitty42 » Fri Dec 04, 2015 6:07 pm

bugman wrote in Fri Dec 04, 2015 2:58 pm:Wow, this sounds like it's going to be amazing!!! I look forward to seeing sun dogs :D

i was looking to see if i could see them in the "22 degree circle"... they can be hard to see unless one has sunglasses on... then you get to see the rainbow colors coming off of them too...

and don't forget about moon dogs... they're the same but at night from the moon with the same type of circle and effects...

speaking of that, shouldn't it be possible, since fgfs shows the different phases of the moon, for fgfs to handle the moon light brightness slider automatically so we don't have to increase and decrease the moon light brightness manually?
"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: 9125
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Light scattering on hazes

Postby bugman » Fri Dec 04, 2015 6:16 pm

wkitty42 wrote in Fri Dec 04, 2015 6:07 pm:
bugman wrote in Fri Dec 04, 2015 2:58 pm:Wow, this sounds like it's going to be amazing!!! I look forward to seeing sun dogs :D

i was looking to see if i could see them in the "22 degree circle"... they can be hard to see unless one has sunglasses on... then you get to see the rainbow colors coming off of them too...

and don't forget about moon dogs... they're the same but at night from the moon with the same type of circle and effects...


I've seen many moon dogs before :) But sun dogs are also quite easy to see, when there are high atmosphere ice crystals, as they are so far apart from the sun (a little outside of the 22 degree halo). They are a bit harder to see when it's caused by low ice clouds or snow flakes near the ground, as it can get quite bright, but they are still far enough apart.

speaking of that, shouldn't it be possible, since fgfs shows the different phases of the moon, for fgfs to handle the moon light brightness slider automatically so we don't have to increase and decrease the moon light brightness manually?


The moon is currently not a real OSG light source, so this limits what we can do in FG a LOT!

Regards,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: Light scattering on hazes

Postby Thorsten » Fri Dec 04, 2015 7:00 pm

Okay, let me start with a word of caution here.

This is rendering, i.e. performance-critical. The various phenomena like sun-dogs, pillars etc. are generated in the skydome fragment shader (the vertex shader doesn't have a fine enough mesh to do it properly).

I can implement every phenomenon in existence, get all the shapes improved, and implement it all for the moon (and even the bright planets if so desired - yes, Venus can also have a halo).

The functions necessary to make the shapes 'just right' get complex quickly. So do the selection routines for determining which phenomenon or which combination to render. Doing it for the moon doubles the effort. GLSL being GLSL, if-statements aren't going to help much in reducing performance overhead, i.e. you pay the computational cost regardless if you see these phenomena or not. You also pay for every sky pixel, not just the ones which light up, because the shader can't know in advance.

So far, the implementation is half based on utilizing things we know anyway because they're computed for other purposes. That limits the accuracy. The relevant question is - how much framerate loss would you accept to be able to render a phenomenon which you're only going to see perhaps once every year in Antarctica?

The moon is currently not a real OSG light source, so this limits what we can do in FG a LOT!


A second real light source will drag framerate though... it costs whether you use it or not.

Rendering is a bitch.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Light scattering on hazes

Postby Thorsten » Mon Dec 21, 2015 12:52 pm

A first version of this is now pushed. Currently only AW tries to determine what kind of ice crystals form a haze

To see:

22 deg ring - fairly common, really any weather with high haze should do, try 'Warm Sector' tiles, they do this reliably.

sundogs - they require cold low haze, so use temperature offset/METAR to get temperature well below -10 degC. Too much haze and you won't see anything because the phenomenon is fogged, too little and you won't see anything either. Close to the upper haze boundary you see them relatively reliable

light pillar - conditions as with sundogs, make sure the sun is low

rainbows - use a low sun in your back, looking right into a rain front - thunderstorm works well

The relative amount of sundogs / light pillar has to do with the form of the ice crystals, which depends on temperature and how dry the air is - having a large spread biases the distribution towards flat rather than column ice crystals and gives more sundogs.

If you want to check by hand, don't run AW and change /environment/scattering-phenomena/ice-* to your liking

Merry Christmas to all of FG :-)
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Light scattering on hazes

Postby legoboyvdlp » Mon Dec 21, 2015 2:43 pm

A very fitting presentnfor the season, but I'd prefer a cup of hot chocolate ;) Thanks anyway!

(Or rather, I would, if I still lived innthe UK.... it is absolutely boiling here in Venezuela. In that case, I'd have a glass of ice water)
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Light scattering on hazes

Postby Thorsten » Mon Dec 21, 2015 7:17 pm

You can always enjoy a nice flight in the Arctic...

I guess I'll try Northern (and Southern) Lights next, though you probably don't see those either in Venezuela.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Light scattering on hazes

Postby legoboyvdlp » Mon Dec 21, 2015 9:45 pm

Certainly not :)
Though we did get a beautiful total Lunar Eclipse a couple of months ago. Nothing much else happens in the skies here :)
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Light scattering on hazes

Postby MIG29pilot » Mon Dec 21, 2015 10:07 pm

Except sukhois crashing from friendly fire :wink:
User avatar
MIG29pilot
 
Posts: 1465
Joined: Tue May 19, 2015 5:03 pm
Location: 6 feet under Snow
Callsign: MIG29pilot
Version: 2020.1.3
OS: Windows 10

Re: Light scattering on hazes

Postby legoboyvdlp » Mon Dec 21, 2015 11:51 pm

I don't have time to test at the moment, but I am sure it will look spectacular.
Last edited by legoboyvdlp on Sat Mar 02, 2019 2:54 pm, edited 1 time in total.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Light scattering on hazes

Postby vnts » Tue Dec 22, 2015 4:36 am

Screenshots look evocatively beautiful.
Thorsten wrote in Mon Dec 21, 2015 7:17 pm:I guess I'll try Northern (and Southern) Lights next

Thorsten wrote in Mon Dec 21, 2015 12:52 pm:Merry Christmas to all of FG :-)

Merry Christmas/seasons greetings to you and all associated with FG from the very warm southern hemisphere (Impressionistic tone poem by an obscure composer. I'm not aware of others describing the Aurora Borealis from the classical tradition although a lot of the work of northern composers are strongly inspired by the power and majesty of nature in those parts).

Kind regards,
vnts
vnts
 
Posts: 409
Joined: Thu Apr 02, 2015 1:29 am

Re: Light scattering on hazes

Postby Thorsten » Tue Dec 22, 2015 9:38 am

Hm, this is easier than I had expected. It gives this nice eerie back-glow to clouds which slowly changes over time:

Image

Image

and pretty plausible patterns for northern latitudes:

Image

Image

For comparison, last one is real, taken some two months ago in our yard (10 sec exposure time, but captures the visual impression reasonably well):

Image
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Light scattering on hazes

Postby MIG29pilot » Tue Dec 22, 2015 4:01 pm

:shock:h my...
User avatar
MIG29pilot
 
Posts: 1465
Joined: Tue May 19, 2015 5:03 pm
Location: 6 feet under Snow
Callsign: MIG29pilot
Version: 2020.1.3
OS: Windows 10

Re: Light scattering on hazes

Postby Johan G » Fri Dec 25, 2015 3:17 pm

Thanks again Thorsten! Impressive work as always, and I never thought I would see any of the effects of this topic in FlightGear. :D
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6625
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest