Board index FlightGear Development Weather

Ground haze

Everything related to weather simulation, visuals should be discussed in the shader subforum.

Re: Ground haze

Postby MIG29pilot » Mon Aug 17, 2015 10:06 pm

tigert wrote in Mon Aug 17, 2015 9:23 pm:It is confusing to me too .
//T

Seems a very hazy issue.
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: Ground haze

Postby Johan G » Tue Aug 18, 2015 7:11 pm

It depends very much on the visual range. I for one have a a computer with rather limited performance (see my forum profile).

To get decent rendering performance I have among other things set down the visual range to 10 km. That in turn means that I start getting ground haze slightly before that range to cover up those ugly edges at the end of the loaded tiles. At the other hand I have relatively good looking visuals even on my computer and with decent fps (in the areas I am usually flying about 10-30 fps depending on scenery and weather).

In real life you may, depending on where in the world you fly, get a lot longer visual range than that. But setting FlightGear to say 100 km, would on my machine probably yield performance measured in seconds per frame rather than frames per second. ;)
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: 6629
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

Re: Ground haze

Postby KL-666 » Wed Aug 19, 2015 3:07 am

It is correct that what you can set, depends on the strength of the system you have. But even if you can set LOD and max visibility to say 100 km, then at altitude you will still have no visibility due to ground haze. To fix that the ground haze factor must be altered from 1 to 2 or 2.5, as i have explained in a previous post.

Kind regards, Vincent
KL-666
 
Posts: 781
Joined: Sat Jan 19, 2013 2:32 pm

Re: Ground haze

Postby Thorsten » Wed Aug 19, 2015 7:27 am

Okay, show of hands - who thinks visibility is a simple issue?

It most assuredly is not. Simple example - you have a reported visibility of 16 km at your position. Why do you see the Sun - it's a few hundred million kilometers away after all, so if you could only see 16 km, you shouldn't see it.

Answer: Because the reported visibility refers to a horizontal ray, if the ray is vertical, the reported value doesn't really mean that much.

So we can see that visibility really depends on view direction.

Now, imagine you're outside a small thunderstorm - you see the rain pouring down, and you know that there's an airfield with a weather station right underneath, but you can't see it. You can readily see 50 km beyond the thunderstorm though, and you're only some eight km away from the airfield. The weather station at the airfield though reports a visibility of 100 m. So - should the visibility at your position be 100 m?

Answer: Of course not, because even looking horizontally, the visibility can be strongly different dependent on where you are.

So we can see that visibility really depends also strongly on position.

In fact, combining the two above, it internally makes no sense to characterize a scene by 'visibility' - I don't know what that means.

In reality, there is a density distribution rho (x,y,z,t) of fog in the scene, and view rays are attenuated by exp(-I) where I is the integral along the view ray

\int rho(x,y,z) sigma(lambda) dr

(with dr being a line element along the ray and sigma the wavelength dependent absorption cross section). In a fairly constant rho environment, we can simplify the integral as rho * sigma * L and we call 'visibility' the value of L for which exp(-I) assumes a value smaller than some threshold (physicists would use 1/e, but meteorologists rather use something like 0.1 in practice, though it's most assuredly not well-defined).

If you know anything about integral equations, you might deduce that a single value of visibility at one location tells you close to nothing about rho(x,y,z) (in the above example in the thunderstorm, the 100 m don't tell you anything of the value at your location, nor where in altitude it changes because the rain stops, nor anything else). So visibility needs to be described by a more complicated model (the ALS one is described here.

In FG, we have the additional complication that visibility affects number of scene vertices loaded, so there are several measures of artificially restricting how large it can become for the scene. Note that vertically upward you almost always have trillions of kilometers visibility because you can see stars at night.

So:

* METAR sets the horizontal visibility at the weather station, i.e. the assumed density of haze on the ground.
* whatever the weather system sets for /environment/visibility-m is treated as the horizontal visibility at your current position AND as restriction for how far out tiles are loaded

These act in conjunction, i.e. if you're *not* looking horizontally, you see a mixture of the two dependent on view angle and altitude of the vertex you're observing. Thus 50 km visibility at your altitude entitle you to see something at your altitude that is 50 km away, but say nothing about whether you can see something that is lower than your altitude - you may or may not be able to see it, the value doesn't say.

* LOD bare sets a second restriction how far terrain is loaded - if you're find with seeing a hard terrain edge, you can have visibility beyond LOD bare and see nearby terrain less hazy
* the far plane clipping (forgot the property name) sets where the renderer culls the scene, so even if you extend everything else beyond that value, it won't be rendered (note that the actual position of sun and stars in FG coordinates is *not* the real position but *very much closer*)

* since METAR tends to not report values above 10 NM, METAR users typically get rather small ground visibilities (which aren't always real). The weather system conservatively tries to work around that and based on other weather parameters opens up a bit further, but this may not fit in every instance. In such cases, changing ground-haze-factor to a value >1 is a good procedure (we can't do this automatically because the real visibility on the ground for a reported 10 NM may be 10 NM just as well as 60 NM and we don't know this).

* since METAR says nothing at all about aloft visibility, AW tries to understand the weather situation and opens up aloft visibility automatically based on that.

Thus: Feeding AW a reported 100 NM visibility via METAR will give you clear skies all around. Feeding AW a reported 10 NM visibility will give you gradually clear skies at high altitude but haze at the ground - changing ground-haze-factor will clear the ground up to matching your value at current altitude (ground visibility inside the renderer may never exceed visibility to avoid all sorts of bugs - you can set it higher but it won't do anything). In patchy weather situation (rainfall, T-storms), local visibility may always be worse than average visibility if you happen to be inside the patch - this will disregard METAR values). That is to say, if the METAR reports 10 km ground visibility and T0-storms and you happen to spawn inside the storm rain zone, you'll get 400 m and the 10 km only if you leave the storm or wait for it to pass.

* the air pollution slider in addition allows to dial in some amount of (bluish) dry haze - since that has visually different fading properties, it might alter your perception of visibility (details fade in bluish fog faster than in greyish fog).

How far you can actually see is hence a function of where you are, how the vertical visibility model of the weather situation is, whether you're looking upward and downward, how patchy the weather situation is and what the mixture of dry vs. wet haze is.

So please give up on the idea that there's a single slider to do all the job which we'd just need to adjust - visibility is complicated, and the model in AW / ALS is fairly sophisticated.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Ground haze

Postby tigert » Wed Aug 19, 2015 8:53 pm

Thanks for the explanation, this was very interesting to read - and answered my questions :-)

Weather is complex stuff in real life too, and I am very impressed how FG creates its version of it.
tigert
 
Posts: 106
Joined: Sat Nov 08, 2014 10:57 am

Previous

Return to Weather

Who is online

Users browsing this forum: No registered users and 2 guests