Board index FlightGear Development Weather

Something to look at during night flights...

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

Re: Something to look at during night flights...

Postby MIG29pilot » Wed Aug 12, 2015 10:47 pm

ooh ooh ooh ooh is it in the repo?
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: Something to look at during night flights...

Postby gsagostinho » Thu Aug 13, 2015 9:25 am

Thorsten wrote in Wed Aug 12, 2015 2:37 pm:Thanks for pointing me to my own work :-)


Oops! :oops: Sorry Thorsten, I just did a git pull and I wasn't even aware those files were new.

As for the last image, that's quite impressive. This is really a great job!
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: Something to look at during night flights...

Postby tigert » Fri Aug 14, 2015 3:26 pm

How is this hooked to the weather engine? Should one see it with Advanced weather when metar contains TSRA? Looks good!
tigert
 
Posts: 106
Joined: Sat Nov 08, 2014 10:57 am

Re: Something to look at during night flights...

Postby MIG29pilot » Fri Aug 14, 2015 4:55 pm

Just tried it and it is jolly brilliant (pun might have been intended). One thing, is there any way to make a bit more flickery?
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: Something to look at during night flights...

Postby wlbragg » Fri Aug 14, 2015 7:33 pm

Really nice!
I haven't looked at the code yet but do or will we have any control on intensity?
Our average storms here are incredibly intense in the frequency of lightning. Sometimes it is constant with no break in the flashing (although most of it is cloud to cloud). Hard to believe it until you see it.
I activated this by selecting thunderstorm from Detailed Weather. I took off at night without going through the checklists and had no panel to keep me horizontal. By the time I searched for the panel light switch it was too late. Unfortunately, I had it set to "realistic" and my poor little c172p didn't last very long in that kind of wind with only VFR references.
Sound would be a wonderful addition, if no one beats me to it maybe I'll work on it.
But none the less, really nice work.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Something to look at during night flights...

Postby Thorsten » Mon Aug 17, 2015 7:16 am

How is this hooked to the weather engine? Should one see it with Advanced weather when metar contains TSRA? Looks good!


Since Cb-clouds are rather large and in general may not overlap with the standard convective clouds without looking silly, thunderstorms are always either branched off to a special routine which adjusts the tile to the presence of a Cb or are part of a front in the offline engine.

Thunderstorm reports in the METAR call the first case.

Information on thunderstorm presence is, when they're created, written to the WXradar code (where it could be visualized if so desired) and registered with a new loop - that loop then goes over all candidates, does housekeeping (i.e. deletes storms too far away) and decides on a probabilistic lightning strike position once per second. The lightning strike itself is written to properties and picked up by a select animation for the bold and by the shader for cloud illumination.

So the easiest way to see it is to simply select the 'Thunderstorms' weather scenario of AW.

One thing, is there any way to make a bit more flickery?


I suspect so, but based on what?

I haven't looked at the code yet but do or will we have any control on intensity?


The code does take an intensity argument when registering the storm, i.e. lightning frequency can be made more intense or less intense, but it's not clear to me how this should be selected automatically. Right now the numbers match roughly typical central-European storms, I have seen tropical ones on occasion and I know they're quite different.

There's an intrinsic limitation that we only may have one lightning strike at a time, right now they last about a tenth of a second, so I don't think we can do more than four or five per second easily without adding more uniforms to the shader code. At this point, I would argue for 'not so urgently needed'.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Something to look at during night flights...

Postby erik » Mon Aug 17, 2015 9:17 am

FYI: You can generate a reasonable set of lightning bolts using The Gimp and the Lava Filter-Renderer using the following settings:

Gradient: Caribbean Blues
Roughness: greater than 40
Size: 100

Update: example

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Something to look at during night flights...

Postby tigert » Mon Aug 17, 2015 12:38 pm

Oh yeah!

This is definitely adding to the feeling of getting tossed around in the turbulence!

Image

//T
tigert
 
Posts: 106
Joined: Sat Nov 08, 2014 10:57 am

Re: Something to look at during night flights...

Postby gsagostinho » Tue Aug 18, 2015 11:36 am

@Thorsten I read this in the current newsletter:

Since the simulation writes the position and range of the lightning strike relative to the current eye position into the /environment/lightning node of the Property Tree (lightning-pos-x, lightning-pos-y, and lightning-range), aircraft modellers can use this information to trigger a thunder sound after a delay.


So if I understand correctly, the thunder sound must be implemented by each aircraft designer, right? I just want to confirm this because I plan to work on it for the c172p, and then if you judge the sound sample is good enough we can then copy it to fgdata's sound folder as to make it easy for other developers to use it.

@tigert fantastic shot, by the way!!
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: Something to look at during night flights...

Postby Thorsten » Tue Aug 18, 2015 11:59 am

So if I understand correctly, the thunder sound must be implemented by each aircraft designer, right?


To my knowledge, that's true for all sounds in FG.

It also makes sense, because only the aircraft designer knows what you can actually hear in the cockpit. The Space Shuttle has sound-proofing designed to cope with a rocket engine 30 meters away (which is, I gather, some 180 dB) - I doubt you would hear something like thunder. Likewise, the ambient noise level in a GA aircraft with engine on is really high, while the noise level in an airliner cockpit is pretty modest. From a glider cockpit on the other hand, you hear extremely well all ambient sounds. So it wouldn't make any sense to implement sounds system-wide.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Something to look at during night flights...

Postby erik » Tue Aug 18, 2015 1:41 pm

It's not entirely true though, network models do generate their own sounds.
Update: And looking at the sound menu so do AI models.

This makes me wonder how rain sound is implemented.
I do know wind is aircraft specific but that also depends on the shape of the hull.

Maybe it's a good idea to think this through a bit before every aircraft modeller starts to implement it by their own.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Something to look at during night flights...

Postby Thorsten » Tue Aug 18, 2015 2:54 pm

Okay, let me make a normative statement then: I think it would be correct design to leave it up to the aircraft designer to determine what you can hear from what aircraft-specific view for the aforementioned reasons.

But making a stronger statement, the specific weather system running should in my view not set any sounds just as it should not directly set any rendering properties - if anything it should talk via a property interface and leave it up to other subsystems to do something with the information (or not).

(Which is to say, I think the way the water shaders specifically use Basic Weather config properties to determine scene lighting is something we should strive to avoid in the future).

So we might define an ambience sound system which can optionally be used for such things, but this should not be driven by the weather system directly but pick up information set by weather.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Something to look at during night flights...

Postby Hooray » Tue Aug 18, 2015 3:59 pm

Indeed, that's looking pretty cool - anybody got any videos of the whole thing in action (for those of us not able to run FG ATM) ?
Besides, Thorsten is right about what he said in his last posting - and he ended up re-defining the terms "information hiding" and "encapsulation" along the way - there's no other way to ensure that there's a single abstraction layer in place to deal with complexity/feature scaling or even just "realism" ass long as people end up hard-coding such stuff per aircraft. Just like "aircraft" (boats, the walker, vehicles etc) should never manipulate rendering/audio settings directly, they also shouldn't hard-code other stuff that may need to be managed in a holistic fashion using a single front-end/mechanism. Equally, that means that an API (e.g. the property tree) is preferable over aircraft-specific stuff like Canvas/PUI dialogs, which would fail to work for people wanting to use any of the newer/upcoming front-ends (think Phi/Qt5 or other options).
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Something to look at during night flights...

Postby gsagostinho » Tue Aug 18, 2015 4:33 pm

Thorsten wrote in Tue Aug 18, 2015 11:59 am:
So if I understand correctly, the thunder sound must be implemented by each aircraft designer, right?

So it wouldn't make any sense to implement sounds system-wide.


Great Thorsten, thanks a lot! I will work on it straight away for the c172p :)
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: Something to look at during night flights...

Postby erik » Wed Aug 19, 2015 7:18 am

Thorsten wrote in Tue Aug 18, 2015 2:54 pm:So we might define an ambience sound system which can optionally be used for such things, but this should not be driven by the weather system directly but pick up information set by weather.


I think I agree but wonder how for instance the waterfall animation work for the scenery. I think the same principle could be used for ambient sounds for, say, waterfall (and thunder) sounds.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

PreviousNext

Return to Weather

Who is online

Users browsing this forum: No registered users and 2 guests