Board index FlightGear Development Spaceflight

Ground haze from high altitude

Discussion about development and usage of spacecraft

Ground haze from high altitude

Postby eatdirt » Fri Jun 21, 2019 11:48 pm

Hello,
I have been playing with standard FG scenery from high altitude with the X-15 and the Shuttle, and with advanced weather, I've noticed that the ground haze is producing some artificial square tiles, they are visible only from some high enough altitude. Here an example of two shots during a STS launch close to SRB separation:

Image

Image

I have been searching on other topics in the forum and found that the "ground haze factor" could be used to mitigate haze on the ground, so I have set it to "6" and passed it to command line with this (metar and snow are discussed here: https://forum.flightgear.org/viewtopic.php?f=87&t=35758)

Code: Select all
--prop:/local-weather/config/ground-haze-factor=6.0
--prop:/environment/params/metar-updates-snow-level=false
--prop:/environment/snow-level-m=100000


As you can see in the above 2 shots, even though it is correctly set to "6" (see the property editor), it has no effect.

Now, if I just click on "Set" with the mouse during the simulation, it really gets into effect, the following shot is what I get just after clicking on Set with the mouse:
Image

It seems that the actual value of "ground haze factor" passed by the command line is actually not used afterwards in the sim. I have tried to disable real weather fetch, but that is not solving the issue. I wondering if that is a bug, or, if that is not, could we have some option to actually force the value we pass on the command line?

PS: I guess we could also try to smooth the tiles, but that sounds much more complicated

Any ideas?
Cheers,
Chris.
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Ground haze from high altitude

Postby Thorsten » Sat Jun 22, 2019 11:55 am

I wondering if that is a bug, or, if that is not, could we have some option to actually force the value we pass on the command line?


AW doesn't allow you to set any visibility in-sim because it brings its own visibility model interfaced with the rest of the weather. You have to use BW to affect visibility via commandline/key command/...

Given Earthview, my personal view is that my time is poorly spent trying to make the default terrain engine work well at > 100.000 ft - its not what it's for, performance is poor,...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Ground haze from high altitude

Postby eatdirt » Sat Jun 22, 2019 1:48 pm

Given Earthview, my personal view is that my time is poorly spent trying to make the default terrain engine work well at > 100.000 ft - its not what it's for, performance is poor,...


Thanks for the explanation, I understand that Earthview is made for high altitude; but for the X-15, and even the Shuttle in manual mode after TAEM, it is quite nice to keep the FG scenery to have a visual on the runways.
I think it is a bit a pity to give-up AW and its nice clouds just for not being able to force the ground-haze-factor on the command-line. I understand you don't want to spend time on this though, but I'll be happy to have a look, I just need a bit of advice on where to start?
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Ground haze from high altitude

Postby Thorsten » Sat Jun 22, 2019 7:15 pm

To say this bluntly - I think fixing the 'blocky' appearance of faraway haze is not a good use of my time, but allowing the user to explicitly set certain weather parameters in AW is something else - that is completely against the whole construction principle of AW. AW is an integrated weather engine that tells you what the visibility at your altitude and position to a given point is given the general weather situation. Allowing the output as input is something that wrecks the whole design idea and hence something I have and will always veto as addition to AW.


You can force large visibilities in general at the simple expense of specifying them as part of the weather situation (aka a suitable hand-entered METAR string) but you can't force visibility at your particular position or to a definite value.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Ground haze from high altitude

Postby eatdirt » Sat Jun 22, 2019 8:06 pm

Mmm, that's a quite extreme point of view, but okay for your arguments!

Two points though:

1) This ground-haze-factor currently exists and can be set in the simulation by hand. So, right now, this already breaks you desiderata of not allowing the user to set it, we can do it. So, I don't see any more harm done onto your AW philosophy by allowing the command-line option to actually work.

2) The AW looks is ugly at high altitude only due to this, that's a fact, and this should be improved, unless you enjoy to be pissed off again and again by V12 and its sims comparison ;)
Then, let's find another way if you don't like the user to set some settings, but please propose some solutions, I'll be happy to try my best implementing them. That would certainly be more productive than saying "don't use it" or "don't touch it". Because, for sure, the real haze seen from 100000 fts is clearly not a chess game :)

No offence of course!
Cheers,
Chris.
Last edited by eatdirt on Sun Jun 23, 2019 10:04 am, edited 1 time in total.
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Ground haze from high altitude

Postby wkitty42 » Sun Jun 23, 2019 1:23 am

FWIW: i generally have my properties set this haze-factor to the same distance my other visual settings are set to... then i start the sim with AW, go into the property tree, locate the property which has my desired setting, click on it and then click the [SET] button which makes it take effect... that's all part of my initial startup routine that i do before i even start doing anything for the flight...
"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: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Ground haze from high altitude

Postby Thorsten » Sun Jun 23, 2019 9:05 am

Mmm, that's a quite extremist point of view, but okay for your arguments!


I do not think so - BW was an existing weather system in which the user could manually adjust all parameters as desired, AW was conceived as something different, an engine which would generate a consistent set of parameters based on a general weather situation specified.

So the correct mode of operation is to use BW if you want to manually adjust weather to a certain situation (and register more cloud types with BW if you want better visuals). To ask to turn AW into a second BW is not useful.

To give you another (somewhat humorous) example - I don't expect my washing machine to solve numerical integrals for me. Clearly the control chip would be theoretically up to the task these days, but the device is for washing clothes, so that's what I use it for.

1) This ground-haze-factor currently exist and can be set in the simulation by hand.


The factor exists because a weather-engine-agnostic interface with the effect system (which needs weather info to render the amount of sunlight and visibility) needs to be there. You can't set it in AW, because it sets visibility parameters itself, they're an output of the AW engine, not an input.

This is similar to parameters which are an output of the FDM computation - you can pause FG and set them and see your plane change in response, but as soon as you unpause, JSBSim overwrites them and you're back to where you were. It's not useful either to ask to be able to set the FDM output manually - you are supposed to set the input and let the FDM compute the output.

So the mere fact that a property exists in FG is not an indication that it should be configurable - there's plenty of properties which are output of FG rather than input.

2) The AW looks is ugly at high altitude only due to this, that's a fact, and this should be improved, unless you enjoy to be pissed off again and again by V12 and its sims comparison ;)


For anything up to and including the X-15, it does 'well enough'

Image

Again, AW is not designed for large-scale weather patterns as seen from sub-orbital altitude, it can't conceptually do them well - rendering that plausibly would need a different weather engine - if people insist in using stuff outside of their design specs, then that's their problem.

Then, let's find another way if you don't like the user to set some settings, but please propose some solutions,


1) Use Earthview - it actually starts to look superior even from Concorde altitude (52.000 ft) to the default terrain in my view
2) If you want to control weather parameters, use BW, register more cloud types with better textures with BW
3) If you want large visibility in AW, enter a METAR string that says so in manual METAR mode and large visibility will be part of the general weather situation
4) Write a sub-orbital weather engine (which is reasonably easy, since you only use it in the stratosphere which is very quiet generally and you only need to focus on visual cloud patterns
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Ground haze from high altitude

Postby eatdirt » Sun Jun 23, 2019 10:04 am

Thanks Thorsten for the detailed explanations and suggestions.

If really AW could produce the X-15 picture you have posted, I'll be pleased to know how it has been configured, that's just what I am looking for!
I was never be able to remove the chess board effect without tweaking the ground-haze-factor, I find it hard to believe this picture has been made without doing so!
Unless people have some METAR to share?

Cheers.
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Ground haze from high altitude

Postby GinGin » Sun Jun 23, 2019 12:09 pm

To have those kind of screenshot, you have to use Basic Weather with no clouds ( or set clouds visibility to a high range, but impact is huge on ram)

Here my settings for a 500 km visibility ( you can adjust ground haz factor at high altitude to decrease visibility and loading of textures)
Those parameters are ok for a 16 go ram

Code: Select all
--prop:double:/sim/rendering/static-lod/detailed=1500
--prop:double:/sim/rendering/static-lod/rough=15000
--prop:double:/sim/rendering/static-lod/bare=500000
--visibility=500000
--prop:/local-weather/config/ground-haze-factor=500000
--prop:/sim/rendering/clouds3d-vis-range=300000
--prop:double:/sim/rendering/static-lod/ai-detailed=0
--prop:double:/sim/rendering/static-lod/ai-range-mode-pixel=1
--prop:/sim/rendering/multithreading-mode=AutomaticSelection
--prop:/sim/rendering/camera-group/zfar=500000




metar

Image


Image


Image


With snow line adjusted ( forgot that one earlier)

Image


At 70 Nm ( there you would need a visibility of 1.5 millions km to get rid of ground haze )

Image
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: Ground haze from high altitude

Postby eatdirt » Sun Jun 23, 2019 2:46 pm

Thanks Gingin, perfect!
I am happy to see haze from space is fine, provided it does not look like a chess game!
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Ground haze from high altitude

Postby wkitty42 » Sun Jun 23, 2019 4:13 pm

GinGin wrote in Sun Jun 23, 2019 12:09 pm:At 70 Nm ( there you would need a visibility of 1.5 millions km to get rid of ground haze )

hunh???

there's 6000 feet in one nautical mile...
70 nautical miles is 420000 feet...
that says the distance to the horizon is 798 miles...
not sure if that's statute miles or nautical miles, though...

i used a horizon calculator on the web as well as the simple formula of

distance-to-horizon = square root (1.5 times height)

both give 798 miles (1478KM) as the distance to the horizon at 70NM elevation...

if i use the "no refraction" formula from here, i get about 745NM (1380KM)...

OG = square root (2 R h)

where "R" is the radius of the earth (roughly 3963) and "h" is the given height (70)...

at that height, the 40 mile difference between the two answers isn't going to make a lot of difference in what you see in the distance...
"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: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Ground haze from high altitude

Postby GinGin » Sun Jun 23, 2019 4:17 pm

Typo error , 1.5 millions meters of course :)

Which give 1500 km ie. 800 nm ish like your calculations
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: Ground haze from high altitude

Postby wkitty42 » Sun Jun 23, 2019 11:45 pm

HA! ok... i was wondering there! :lol:
"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: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Ground haze from high altitude

Postby V12 » Fri Sep 06, 2019 10:14 am

Problem with chessboard I solved with simple script containing timer for periodical set /local-weather/config/ground-haze-factor based on observer's altitude. On evening I will post that script. That thing works to my complete satisfaction.

EDIT :
Code: Select all
var ght=maketimer(10,func{
var ghf=getprop("/position/altitude-ft")/10000+1;
if (ghf<1){ghf=1};
setprop("/local-weather/config/ground-haze-factor",ghf);
clvis=getprop("/environment/effective-visibility-m");
if (clvis>120000){clvis=120000};
setprop("/sim/rendering/clouds3d-vis-range",clvis);
});
ght.start();
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: Ground haze from high altitude

Postby eatdirt » Thu Sep 12, 2019 10:39 am

containing timer for periodical set /local-weather/config/ground-haze-factor based on observer's altitude


Woo, thanks, that's nice. I'll try that!!!!
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Next

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 6 guests