Board index FlightGear Development Weather

New thunderstorm AI scenario alpha release

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

Re: New thunderstorm AI scenario alpha release

Postby HHS » Tue Mar 02, 2010 11:02 am

Thorsten wrote:(If I may be permitted a private interlude - I honestly feel like screaming <censored> from the top of my lungs, wiping Flightgear from the harddisk, and getting X-Plane instead and throw the whole cloud work into garbage. Thanks for indulging.)

Well, I'm out of ideas, and I'm simply down to asking for help. Hooray has already indicated that he might be willing to give it a try on the C++ side - if anyone else has any useful ideas, please let me know, there's a lot of my work in these projects, I believe the concept of AI weather is really powerful and capable of creating better weather effects than the system as it stands (even in 2.0.0) and I'd hate to see everything lost.

Apparently one can now control shaders via an XML tag - maybe that would help (maybe not) - if anyone knows where this is documented, please let me know. Thanks.


A have to admit glasmax.

You have to know that the AI scenarios, especially the weather scenarios are from a time when we had worser weather system than yet.
We have kept them, but I don't think a lot of people used them since 1.0.0 as clouds and the weather system improved. That's why it has been not really supported since last year. And I have to admit: I never liked the AI-Thunderstorms we have right now.

X-plane may have the better weather, but is closed and you will never have this possibility to edit, change and immprove the weather like in FlightGear- you just should be open enough for the way FGFS is sucessfully (!) developed. That means speak with the developers, use the devel-list to discuss your ideas, speak directly with them on the IRC-Chat, be open for the technics we can use now.

And regarding shader documentation: the shader language is GLSL, and the use of it is documentated as everything else in data/ Docs! But I think I've said this already soemwhere. :wink:
Up, up and away
User avatar
HHS
Retired
 
Posts: 3624
Joined: Thu Jul 19, 2007 8:09 am
Version: GIT

Re: New thunderstorm AI scenario alpha release

Postby glazmax » Tue Mar 02, 2010 11:32 am

XXX pilot of the caribbean - bones and porters XXX
User avatar
glazmax
 
Posts: 454
Joined: Sat Jan 27, 2007 10:38 am
Location: Austria
Callsign: jettoo/OE-JTO
Version: cvs

Re: New thunderstorm AI scenario alpha release

Postby Thorsten » Wed Mar 03, 2010 7:32 am

@HHS:

X-plane may have the better weather, but is closed and you will never have this possibility to edit, change and immprove the weather like in FlightGear


That was precisely the point the comment - I wouldn't feel any temptation to tinker with the weather. Wasn't meant to be terribly serious though.

And regarding shader documentation: the shader language is GLSL, and the use of it is documentated as everything else in data/ Docs! But I think I've said this already soemwhere.


Actually, no it isn't. The file README.Effects which glazmax linked is not part of my Docs/ directory. So 'I told you before' is a bit misplaced in this instance.

README.Effects is somewhat helpful, but it doesn't say how to load/unload effects for a model. Still, effects seem to be the cause of my trouble, tinkering with model-default.eff makes some difference. So does switching effects off alltogether - although that gets rid of 3-d clouds and the water effects as well which isn't really what I want.
Thorsten
 
Posts: 10163
Joined: Mon Nov 02, 2009 8:33 am

Re: New thunderstorm AI scenario alpha release

Postby erik » Wed Mar 03, 2010 7:53 am

Thorsten wrote:Flightgear 2.0.0 has very strong shading of surfaces away from the sun, overriding the ambient settings in the Material declaration of the ac model file. As a result, some cloud surfaces (again, this holds for thermal cap clouds as well as the bigstorm demo) appear almost black. Probably worse, also Cirrus cloud models appear black when they are between sun and observer (when in reality they would shine brilliant-white under these conditions).

This is not true, in fact the ambient light setting in the .ac file is being honored for ths first time in the history of FlgithGear. Previously it used the same diffuse values for both diffuse and ambient.

AI objects are now solid (i.e. users can collide with them)

I'm almost sure this can be turned off per model. Try asking at the developers list since I don't know the specifics.

Erik
erik
 
Posts: 1506
Joined: Thu Nov 01, 2007 1:41 pm

Re: New thunderstorm AI scenario alpha release

Postby DFaber » Wed Mar 03, 2010 8:43 am

Thorsten wrote:* AI objects are now solid (i.e. users can collide with them)


This can be changed by adding the following into your models xml file:

Code: Select all
<animation>
    <enable-hot type="bool">false</enable-hot>
</animation>


It works, just tried it.

I also changed the ambient values in your ac3d file to read "amb 1.0 1.0 1.0" instead of "amb 0.2 0.2 0.2". This resembles the ambient value of 1.9.1 which ignored these values completely as erik already said. This fixed the clouds appearence for me.

Two problems remain, the fading of the thunderclouds in the distance and the disappearence of the cloud with a low cloud layer (which may be the case in 1.9.1 too?). This might be better asked on the dev-list. If you like I can forward it there.

Greetings
Detlef Faber
FlightGear Development:
http://flightgear-de.net

German FlightGear Forum
http://forum.flightgear-de.net
DFaber
 
Posts: 686
Joined: Fri Dec 01, 2006 7:51 pm
Location: Aachen, Germany
Version: GIT
OS: Linux

Re: New thunderstorm AI scenario alpha release

Postby Thorsten » Wed Mar 03, 2010 9:47 am

Two problems remain, the fading of the thunderclouds in the distance and the disappearence of the cloud with a low cloud layer (which may be the case in 1.9.1 too?).


Thanks! I tried the amb setting of the file as well, but I didn't see any effect yesterday - works now, so apparently I forgot to copy the modified model to the correct location, my mistake.

I tracked the distance fading to the fact that Effects/model-default.eff is applied to each model per default. Switching off shader effects restores the previous behaviour - but kills other clouds and rain.

Tinkering with the model-default-eff file does the trick - but applies to all models. So I'd need a solution to switch off shader effects for a specific model.

The low cloud layer problem occurs all over the place - I get it also with the normal 3-d clouds when looking down through the high Cirrus layer, so it's not specific for my scenario. It's just not that common to look down from 25.000 ft - whereas for the storm it's immediately obvious. Maybe there is an answer though.

If you like I can forward it there.


I'd appreciate that.
Thorsten
 
Posts: 10163
Joined: Mon Nov 02, 2009 8:33 am

Re: New thunderstorm AI scenario alpha release

Postby Zan » Fri Mar 05, 2010 6:58 am

Thorsten wrote:Tinkering with the model-default-eff file does the trick - but applies to all models. So I'd need a solution to switch off shader effects for a specific model.


This is a simple one. Just copy the model-default.eff to some other name, like thunderstorm.eff, then change the <name> in it to Effects/Thunderstorm, and do the modifications into that.

Then, in your model's xml file, add the following:

Code: Select all
<effect>
  <inherits-from>Effects/Thunderstorm</inherits-from>
  <object-name>Cloud</object-name>
</effect>


The object name should be the name of the object in the .ac to which you want to apply the modified effect.

Lauri
Zan
 
Posts: 121
Joined: Tue Oct 20, 2009 10:28 am

Re: New thunderstorm AI scenario alpha release

Postby Thorsten » Fri Mar 05, 2010 7:17 pm

Thanks for all the help! I can't say that I have acquired a deep understanding of what the shader effect system does, but I have learned a few rather interesting and useful things on the way, and I have it up and working properly for me in FlightGear 2.0.0 now - updated download link in first post.
Thorsten
 
Posts: 10163
Joined: Mon Nov 02, 2009 8:33 am

Re: New thunderstorm AI scenario alpha release

Postby statto » Fri Mar 05, 2010 7:32 pm

Thank you for your work on this.
Custom Scenery available from http://www.stattosoftware.com/flightgear
statto
 
Posts: 2093
Joined: Fri Jan 25, 2008 9:57 pm

Re: New thunderstorm AI scenario alpha release

Postby HHS » Mon Mar 08, 2010 3:41 pm

I tested it.

It is nice to see that the cloud is still visible even more than 50nm away from it. That is realistic and wonderful to see.

But I also see still some graphical problems which should be sorted out.

- too few sprites. The cloud doesn't have any volume. So more sprites should be used.
- Red-Sea-phenomenon. I think Stuart solved it in the shader with fading out of the sprites in front and near of the camera.
- inside the cloud the 3d-rain disappeard. Make the 3d-object double-sided. But now the shader-clouds outside are flickering here. No idea If I only have this.

I really would like to see such clouds beside the one we have. Makes it more realistic and exciting!
Up, up and away
User avatar
HHS
Retired
 
Posts: 3624
Joined: Thu Jul 19, 2007 8:09 am
Version: GIT

Re: New thunderstorm AI scenario alpha release

Postby Thorsten » Mon Mar 08, 2010 5:46 pm

But I also see still some graphical problems which should be sorted out.

- too few sprites. The cloud doesn't have any volume. So more sprites should be used.


Will try - the problem is that Cumulonimbus towers are quite characteristic - with Cumulus clouds it's much easier to find texture layers which combine in a plausible way than for Cumulonimbus.

- Red-Sea-phenomenon. I think Stuart solved it in the shader with fading out of the sprites in front and near of the camera.


What the heck is a Red Sea phenomenon?

- inside the cloud the 3d-rain disappeard. Make the 3d-object double-sided. But now the shader-clouds outside are flickering here. No idea If I only have this.


The way this is supposed to look (and looks for me) is that the visibility inside the cloud is 100 m - so you aren't supposed to see anything except rain and fog. Notably, the model itself as it appears from the outside should not be seen from inside. Apparently that doesn't happen for you - did the Nasal report any errors?
Thorsten
 
Posts: 10163
Joined: Mon Nov 02, 2009 8:33 am

Re: New thunderstorm AI scenario alpha release

Postby HHS » Mon Mar 08, 2010 6:20 pm

Thorsten wrote:
What the heck is a Red Sea phenomenon?


The clouds are turning away from you when you come closer. There there is a path free of clouds. (like you are running through a crowd of people...)
Also described here: http://ofb.net/~niniane/clouds-jgt.pdf

The way this is supposed to look (and looks for me) is that the visibility inside the cloud is 100 m - so you aren't supposed to see anything except rain and fog. Notably, the model itself as it appears from the outside should not be seen from inside. Apparently that doesn't happen for you - did the Nasal report any errors?


No idea, but the first flight I had this problem. It is gone now. So it seems now to work as you described it here.
Up, up and away
User avatar
HHS
Retired
 
Posts: 3624
Joined: Thu Jul 19, 2007 8:09 am
Version: GIT

Re: New thunderstorm AI scenario alpha release

Postby Thorsten » Tue Mar 09, 2010 11:04 am

The clouds are turning away from you when you come closer. There there is a path free of clouds. (like you are running through a crowd of people...)


Ah, the fly-by problem (that's the name I gave it)... I have a few ideas to improve that. My current favourite would be to change gradually with distance from a position-vector based rotation to a view-axis based rotation - effectively the cloud would then never turn much except when you're close and move the view axis wildly - in many cockpits, that wouldn't even be visible. Another possibility would be to lock the rotation at some distance - would be okay, except when you circle the cloud within that distance. See the wiki for a few more comments in the transformations... I don't think fading to transparent is an option for a Cb cloud - they would always appear opaque.

With the trafos, I was sort of hoping to get a helping hand from someone from the C++ side, e.g. as an extension of the billboard animation. I think that's where they are most efficiently done.

Thanks for testing and your comments in any case! That was useful!
Thorsten
 
Posts: 10163
Joined: Mon Nov 02, 2009 8:33 am

Re: New thunderstorm AI scenario alpha release

Postby HHS » Tue Mar 09, 2010 1:42 pm

Thorsten wrote:
The clouds are turning away from you when you come closer. There there is a path free of clouds. (like you are running through a crowd of people...)


Ah, the fly-by problem (that's the name I gave it)... I have a few ideas to improve that. My current favourite would be to change gradually with distance from a position-vector based rotation to a view-axis based rotation - effectively the cloud would then never turn much except when you're close and move the view axis wildly - in many cockpits, that wouldn't even be visible. Another possibility would be to lock the rotation at some distance - would be okay, except when you circle the cloud within that distance. See the wiki for a few more comments in the transformations... I don't think fading to transparent is an option for a Cb cloud - they would always appear opaque.

With the trafos, I was sort of hoping to get a helping hand from someone from the C++ side, e.g. as an extension of the billboard animation. I think that's where they are most efficiently done.

Thanks for testing and your comments in any case! That was useful!


Now I understand- well, on tower view in KSFO I noticed that the thunderstorm cloud looked different than from the aircraft. That looks sometimes a bit strange. So it must be due to the position-vector based rotation.

The fading would only work if you have enough sprites. The fading of each sprite is based in the distance to the aicraft. That means the sprite is getting less opaque with less than 200 (?)m (?)
Up, up and away
User avatar
HHS
Retired
 
Posts: 3624
Joined: Thu Jul 19, 2007 8:09 am
Version: GIT

Re: New thunderstorm AI scenario alpha release

Postby Thorsten » Tue Mar 09, 2010 3:25 pm

Now I understand- well, on tower view in KSFO I noticed that the thunderstorm cloud looked different than from the aircraft. That looks sometimes a bit strange. So it must be due to the position-vector based rotation.


Good point - I should probably base the transformation on the position of the view rather than on the aircraft position. As it is, the angle is calculated with respect to the aircraft, so from the tower view it can appear strange, I didn't think of that. Will fix in next version.
Thorsten
 
Posts: 10163
Joined: Mon Nov 02, 2009 8:33 am

Previous

Return to Weather

Who is online

Users browsing this forum: No registered users and 1 guest