Board index FlightGear Development Weather

A unified weather system?

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

Re: A unified weather system?

Postby Thorsten » Tue Sep 10, 2013 2:56 pm

So far no one else could reproduce this, so it's probably specific for your setup.

The worst are the type that look like an overcast of packed cumulae (i call them horrible clouds). I think the reason these clouds have such an impact is that every individual cloud is calculated very precise. If this is the case, could there not be a bit less calculation, since these clouds are actually one big pack?


The system is designed such that the worst case (75 km cloud visibility for Stratocumuli, that's your horrible clouds) stays above 20 fps on a modern graphics card like my GTX 670M. There's no way different cloud scenes will have the same impact, few will always be much much lighter than overcast, and one of them will by definition be the worst - so you have to do performance management youself - cloud visibility as well as cloud sprite density are user-configurable from the menu, cloud LOD ranges can be set in the tree, there's even an impostor option there,... so you just have to use the options provided. The weather system can't really know if you're willing to accept 10 fps or if you need to stay at 60 fps - just like with the terrain shaders, you need to manage quality level to your needs.
Thorsten
 
Posts: 12048
Joined: Mon Nov 02, 2009 8:33 am

Re: A unified weather system?

Postby KL-666 » Sun Oct 06, 2013 11:18 pm

Hello Thorsten,

Since 2.12 that weather settings "tricks" make no difference anymore. Unfortunately for the worse. With any setting i get horrendous framerates, especially with those stratocumili. And i am not on the worst gpu, i think. It is a geforce gtx 670mx.

Another thing i wanted to talk to you about is programmers attitude. Please forgive me if i am crude, for one it is my nature to be direct and second english is not my native language.

I myself am a programmer for maybe 20 years now (unfortunately i know nothing about fg programming). And i know how easy it is to tell customers to buy more hardware, instead of me programming more efficiently. In the past i just did not know how to program more efficiently, later on i was just too lazy. But nowadays i find it for myself not honourfull to tell people to buy more hardware, while i know i could do better. Especially if i see examples of others that actually do better. These examples drive me mad and i want to achieve at least the same speed.

Now for fg clouds. These stratocumili are really horrendous for framerates, and they do not need to be. The competitor does a much better job. Great visibility at high alt (fl 330+) and with lots of clouds, with good framerates. Just have a look at it and be amazed and want to do better than you do now.

The competitor is x-plane. You can download a demo with 15 minutes joystick working. That is not a problem for longer flight. Just learn the autopilot quickly, and you can fly for hours manipulating the autopilot by mouse. Fly to fl 330+ and look and compare the view and the framerate. Be amazed and want to do better.

Where x-plane gives you good views at good framerates, fg needs to hide distance behind fog and have still bad framerates. Compare, be amazed and want to do better! (do not hide behind: "buy more hardware")

This is my message to you from programmer to programmer.

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

Re: A unified weather system?

Postby Thorsten » Mon Oct 07, 2013 5:36 am

Then kindly fly the competitor.

I'm a physicist, not a programmer, the algorithms are as good as I can make them (and I've spent months on optimization and making it work on my old 8600M), this is my hobby, I do not have a graphics department to help me, I do not get paid to focus on this 24 hours/day.

I don't know what precisely you tried for optimization, there are about four different techniques coded which you could try from impostors to reduced sprite density - and if it doesn't work, then at some point it doesn't, so be it. If X-plane is better for you, fly X-plane.

(Note that I didn't even actually change anything relevant from 2.10 to 2.12 - so whatever your problem is, I doubt it's my cloud code).
Thorsten
 
Posts: 12048
Joined: Mon Nov 02, 2009 8:33 am

Re: A unified weather system?

Postby Hooray » Mon Oct 07, 2013 1:08 pm

KL-666 wrote in Sun Oct 06, 2013 11:18 pm:Now for fg clouds. These stratocumili are really horrendous for framerates, and they do not need to be. The competitor does a much better job. Great visibility at high alt (fl 330+) and with lots of clouds, with good framerates. Just have a look at it and be amazed and want to do better than you do now.
This is my message to you from programmer to programmer.


That's as unhelpful as it gets - especially coming from a fellow programmer - you are comparing apples and oranges here, yes, X-Plane performance is often superior in comparison to FlightGear - however, you cannot simply attribute this to a fellow contributor like Thorsten or "inefficient" programming - keep in mind that, as far as I know, Thorsten has never touched a single line of C++ code in FlightGear, however that's exactly what the FlightGear architecture and design are made of - so Thorsten is restricted to scripting space (Nasal) and shaders (GLSL) - he cannot magically solve deeper problems that are part of the FlightGear code base, and that have been there for over a decade.
Thorsten has repeatedly brought up a bunch of optimization ideas, but these are out not available, because he is working in Nasal and GLSL space.

Given Thorsten's background, you can safely assume that algorithms are efficient, probably even more efficient than components added by some developers who don't have a similarly strong background in maths or physics.

I suggest to check out the wiki to make some more informed postings and provide additional background information, so that we help you troubleshoot what's going - in my opinion, a GTX670M should definitely be able to run FG 2.12+ including LW/AW.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12259
Joined: Tue Mar 25, 2008 8:40 am

Re: A unified weather system?

Postby stuart » Mon Oct 07, 2013 7:59 pm

Hi KL-666,

As the person who did the C++ programming for the clouds, I can assure you I've spent quite a lot of time making the clouds as efficient as possible.

I'm pretty sure we're as efficient as we can be while retaining good quality visuals. X-Plane for example makes more compromises in the types of clouds it can render to achieve better performance.

We're limited to some extent by the underlying graphics library (OpenSceneGraph, aka OSG). For example, a common method to improve performance is to use Impostors. These basically render part of the graphics to memory, and use that for a number of frames until the direction of view changes sufficiently to require a re-rendering. We have these implemented in FG, using the underlying OSG Impostor function. Unfortunately it doesn't seem to make much difference in performance. I'd recommend enabling them to see if it makes any difference for you: The property is somewhere under /sim/rendering/ and you'll need to restart the simulator to see any effect.

Thanks,

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1591
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: A unified weather system?

Postby KL-666 » Mon Oct 07, 2013 10:31 pm

Oh boy, i was already worried that my words might offend. I am really sorry if i did. My goal was to inspire, not to offend. The flightgear project is something i find really sympathetic, and i admire the level of achievement already made. So i am not going to fly another simulator just like that.

Stuart said: "X-Plane for example makes more compromises in the types of clouds it can render to achieve better performance"

That is the kind of comparison i was looking for when asking you to look at x-plane. So they seem to trade nicest in favour of usability. Is that a bad choice? I asked you guys to have a look and judge if those less nice clouds are really that bad. Are they? Or is it worth to take the framerate drop and have the nicest clouds like in fg?

In programming often some trade between nicest and usability needs to be made. What good is it if you made nicest, but almost no-one can use it? From my experience i notice that many pilots do not use 3d clouds at all. And those that do, often turn them off inflight when framerates drop too much. As far as i know, i am the only diehard that lands with 3 fps.

About the properties i can say that i have had them all in different configs. Nothing actually makes much difference. When a dense field of stratocumili pops up, i hang. The often mentioned impostors actually worsen the situation initially. After a while it settles to the situation like impostors are off. I would really love a setting that could make a dense field of stratocumili less nice looking and keep the framerates going.

From this conversation i learned that the risk for inefficiency is not in one person, but in the cooperation of men of different trades, like Thorsten being a physician and Stuart being a programmer. I do hope you guys communicate a lot while developing. For me, i can not be of much help, because i am neither an physician nor a C programmer. But i try where i can in reporting what i observe. Then you guys can do with it what you can and want. The ultimate goal should be that everyone tries to help to achieve an even better fg where they can, i think.
KL-666
 
Posts: 784
Joined: Sat Jan 19, 2013 1:32 pm

Re: A unified weather system?

Postby Thorsten » Tue Oct 08, 2013 5:51 am

That is the kind of comparison i was looking for when asking you to look at x-plane. So they seem to trade nicest in favour of usability. Is that a bad choice? I asked you guys to have a look and judge if those less nice clouds are really that bad. Are they? Or is it worth to take the framerate drop and have the nicest clouds like in fg?


There are two different weather systems in Flightgear, they can be rendered with two different rendering frameworks, that's four different levels of performance consumption. In addition, there's legacy support for the 2d clouds which adds a 5th level.

All 3d cloud using performance levels have adjustable rendering range, sprite density, LOD level (where sprites are dropped beyond a certain distance) and impostor functionality. That gives you a grand total of 17 different modes (more if you include Rembrandt and combinatorics...) in which you can set the system, all trading visuals against performance. What precisely is it you're asking for? That we make the choice for you?

The design goal is that the system with all detail sliders maxed out and clouds drawn to max. range under worst overcast conditions in hires terrain delivers still acceptable framerate on a high-end GPU. Nobody is forced to max all options out - it goes a long long way down from there.

3d clouds in Advanced Weather and default rendering run with 70+ fps on my now 7 year old previous laptop in default scenery. Just don't tell me there's no consideration of older systems, it's just not true.

I run a GeForce 670M on my new machine, I'm getting above 20 fps under almost any condition with all eye candy features maxed out, most of the time 60 in default, 30 in custom scenery with good visibility (=60 to 120 km). If you don't get this with the same card, and if you get weird behavior with restarting the system, or dramatic performance differences between 2.10 and 2.12 without any major code change, I would consider the possibility that something in your system setup/driver/... may not be right.
Thorsten
 
Posts: 12048
Joined: Mon Nov 02, 2009 8:33 am

Re: A unified weather system?

Postby stuart » Tue Oct 08, 2013 11:45 am

Hi Vincent,

Don't worry - I'm certainly no feeling offended.

Addressing your points in a different order: Thorsten and myself have worked together for quite a while on the clouds (a couple of years?), so I don't think communication is a major issue. I've also implemented quite a few of his ideas during that period.

In the opinion of both Thorsten and myself, we're making the right trade-off of quality versus performance. IIRC the X-Plane clouds are quite good for Cu, but not very realistic for stratus layers.

I'm surprised by your statement that "From my experience i notice that many pilots do not use 3d clouds at all. ". That's certainly contrary to the screenshots I've seen on the forum. However, note that to be able to display _any_ form of 3d clouds you need to have a graphics card that supports vertex and fragment shaders. Perhaps these users simply don't have hardware with that level of OpenGL support, which is why they have to use 2d clouds? (note that this is a subtly different argument from "buy more hardware to get better frame-rates" - there are absolute minimum requirements for 3D clouds to run at any frame-rate)

Going back on topic, it is somewhat surprising that reducing the cloud density slider has no effect. What about very low values (0.1)?

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1591
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: A unified weather system?

Postby KL-666 » Fri Oct 11, 2013 7:46 pm

Thanks for all the input. This made me think of some scenarios to test.

All scenarios have:
- 3d clouds on
- atmospheric light scattering on
- automatic metar feed on

Scenario 1)
- advanced weather
- cloud visibility: 20 mi
- cloud density: max
- flight level: 50
- fps: around 20

Scenario 2)
- advanced weather
- cloud visibility: 80 mi
- cloud density: near 0.1
- flight level: 330
- fps: 5-10

Scenario 3)
- basic weather
- cloud visibility: 80 mi
- cloud density: max
- flight level: 330
- fps: 30+ (i capped it on 30)

My conclusion is that advanced weather is very beautiful for low level flying with short cloud visibility distance. Then the fps are reasonable good. If you fly too high you'll see the border of the cloud field which is not so nice. Maxing out the cloud visibility distance is not an option, because then the fps are getting unflyable.

Basic weather is great for flying high. Every setting can be maxed out with still blazing framerates. The clouds are less nice, but you do not need maximum detail at a distance from height.

So my mistake is to try to fly high with advanced weather. Scenario 3) is what i was asking for. Less detailed clouds as a tradeoff for long distance sight (else you see no clouds at fl330, which is not realistic).

BUT, the sole reason why i started using advanced weather is the extra dimension of realism from turbulence. Basic weather has no air mass movement whatsoever with live metar. So i will miss that very much if i go to basic whether.

To the developer of basic weather (i do not know who you are), please look into the possibility of developing turbulence into basic weather with live metar. Maybe some code from advanced weather can be reused. This would make the basic weather complete and perfect for people that fly airlines high.

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

Re: A unified weather system?

Postby Thorsten » Sat Oct 12, 2013 5:54 am

My conclusion is that advanced weather is very beautiful for low level flying with short cloud visibility distance. Then the fps are reasonable good. If you fly too high you'll see the border of the cloud field which is not so nice. Maxing out the cloud visibility distance is not an option, because then the fps are getting unflyable.


As I tried to explain above - these are various options which you need to select dependent on what your system can render and what the weather situation is.

better visuals + more realism = lower framerate :D
Thorsten
 
Posts: 12048
Joined: Mon Nov 02, 2009 8:33 am

Re: A unified weather system?

Postby KL-666 » Thu Nov 28, 2013 1:17 am

Hi,

Recently i have been able to test between 2.10 and 2.12 with the "horrible clouds" i spoke about earlier. These are the advanced weather clouds that bring down frame rates most. With exactly the same hardware and settings, the results are:

fg 2.10: 10 fps
fg 2.12: 1 fps

That is a diff of factor 10.

This info is FYI, so please do not come with change this or that setting.

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

Re: A unified weather system?

Postby Hooray » Thu Nov 28, 2013 1:39 am

sorry, but it's not just that simple - we need some additional info to put some context around it, including your settings, but also your hardware specs - just saying "factor 10 worse" is not constructive or helpful at all unfortunately - simply because we cannot use that info to tell what's going on. If you are running FG on old hardware, I suggest to check out this: http://wiki.flightgear.org/index.php?ti ... xtreme_lag

This should allow you to get a usable framerate beyond just 10 fps even on hardware from ~2006
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12259
Joined: Tue Mar 25, 2008 8:40 am

Re: A unified weather system?

Postby KL-666 » Thu Nov 28, 2013 3:23 am

Come on hooray, it is a end last year top level gaming laptop asus g75vx. I am not going to talk here if i had old hardware. You can do the trick of same hardware, same settings. Settings are maxed out. Especially cloud visibility is 80000.

Regards, Vincent
KL-666
 
Posts: 784
Joined: Sat Jan 19, 2013 1:32 pm

Re: A unified weather system?

Postby Thorsten » Thu Nov 28, 2013 7:30 am

This info is FYI, so please do not come with change this or that setting.


The Advanced Weather code hasn't substantially changed between 2.10 and 2.12 with regard to the clouds you're referring to, neither has the cloud shader code, neither am I aware that Stuart modified the cloud generating API. I've been almost exclusively busy with terrain shaders.

So it stands to reason that whatever causes the difference has nothing to do with the weather code.
Thorsten
 
Posts: 12048
Joined: Mon Nov 02, 2009 8:33 am

Re: A unified weather system?

Postby KL-666 » Thu Nov 28, 2013 11:44 am

Hi Thorsten,

You could be right. I just want you to be aware of this, so maybe some day, someone stumbles on a piece of code and remembers this. There is no hurry to solve anything.

Talking only about possible improvements, i think i never told how i find this advanced weather extremely well done and realistic. If i go outside and look at the skies, i often think: These clouds are as good as in flightgear.

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

PreviousNext

Return to Weather

Who is online

Users browsing this forum: No registered users and 1 guest