Re: [Flightgear-devel] weather-utility.nas
Having a wave state that gets initialized based on the wind in the first METAR, and has a huge rate limiter slowing down the visible effects of any later updates of wind speed, would probably be the most realistic simple approach for ocean waves. Wind takes some time to build waves, more time for greater wave height, and waves from a storm continue even after the wind drops. If you really want to go crazy, maybe you could base everything on NOAA wave forecasts: http://en.wikipedia.org/wiki/Wind_wave_model But interpolating these with a ~1 hour time constant would still be a good idea to avoid big jumps. On Sun, Jan 22, 2012 at 11:21 PM, Curtis Olson curtol...@gmail.com wrote: Are we fixing the right problem? I was observing mach 5 speed waves while the weather wind was changing. On Sun, Jan 22, 2012 at 8:18 AM, Torsten Dreyer tors...@t3r.de wrote: Played around with it a bit. I got reasonable movement sensation with wind-filter-time set at ~1000. The flutter effect might need the wind in realtime though, as flags usualy react imediately to wind direction changes. Huh - that's a huge value. With a filter-time that high, it will take approx one hour for the interpolated wind to match the given input. Maybe a rate-limiter helps here. The exponential filter has a relatively high rate of change in the beginning, dropping to zero in infinity while the rate limiter changes the output at a constant rate of change. Torsten -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- Curtis Olson: http://www.atiak.com - http://aem.umn.edu/~uav/ http://www.flightgear.org - http://gallinazo.flightgear.org -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] weather-utility.nas
On Friday 20 January 2012 16:16:18 Emilian Huminiuc wrote: On Friday 20 January 2012 15:01:35 Torsten Dreyer wrote: The shader scales the texture with windspeed and rotates it to get the right orientation, but the actual rate those change is too quick to look good, and gives the impression of very high speed, that's why I suggested a longer interpolation time for the values passed to the shader, and to avoid doing the interpolations in the shader itself (as that would hit performance). Only the two values of wind-from-north-fps and wind-from-east-fps are the ones that need this applied, as everything else is derived from these. OK - that explains the impression of fast movements during wind-speed changes. I have now added a time based interpolation to the wind vector components in /environment/sea/surface/wind-from-XXX-fps. I made the timing configurable at runtime in /environment/sea/surface/config/wind-filter-time which sets the filter-time for both exponential filters. This is initialized to 60 in FGDATA/Environment/environment.xml and looks reasonable to me. You might want to play around with that value and we can adjust it if desired. Along with this commit, I cleaned up water.eff and flutter.eff files from unused properties wind-from-(heading-)deg which seemed to be unused. Please check if that was correct. The relevant commit is 2071a3297c9bc3a7f8df397fd8acaa71bc110f06 in fgdata. Torsten Hi, Sorry previous reply was written before receiving this, I will play around with the wind-filter-time prop. Emilian Played around with it a bit. I got reasonable movement sensation with wind- filter-time set at ~1000. The flutter effect might need the wind in realtime though, as flags usualy react imediately to wind direction changes.-- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] weather-utility.nas
Are we fixing the right problem? I was observing mach 5 speed waves while the weather wind was changing. On Sun, Jan 22, 2012 at 8:18 AM, Torsten Dreyer tors...@t3r.de wrote: Played around with it a bit. I got reasonable movement sensation with wind-filter-time set at ~1000. The flutter effect might need the wind in realtime though, as flags usualy react imediately to wind direction changes. Huh - that's a huge value. With a filter-time that high, it will take approx one hour for the interpolated wind to match the given input. Maybe a rate-limiter helps here. The exponential filter has a relatively high rate of change in the beginning, dropping to zero in infinity while the rate limiter changes the output at a constant rate of change. Torsten -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- Curtis Olson: http://www.atiak.com - http://aem.umn.edu/~uav/ http://www.flightgear.org - http://gallinazo.flightgear.org -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] weather-utility.nas
The shader scales the texture with windspeed and rotates it to get the right orientation, but the actual rate those change is too quick to look good, and gives the impression of very high speed, that's why I suggested a longer interpolation time for the values passed to the shader, and to avoid doing the interpolations in the shader itself (as that would hit performance). Only the two values of wind-from-north-fps and wind-from-east-fps are the ones that need this applied, as everything else is derived from these. OK - that explains the impression of fast movements during wind-speed changes. I have now added a time based interpolation to the wind vector components in /environment/sea/surface/wind-from-XXX-fps. I made the timing configurable at runtime in /environment/sea/surface/config/wind-filter-time which sets the filter-time for both exponential filters. This is initialized to 60 in FGDATA/Environment/environment.xml and looks reasonable to me. You might want to play around with that value and we can adjust it if desired. Along with this commit, I cleaned up water.eff and flutter.eff files from unused properties wind-from-(heading-)deg which seemed to be unused. Please check if that was correct. The relevant commit is 2071a3297c9bc3a7f8df397fd8acaa71bc110f06 in fgdata. Torsten -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] weather-utility.nas
On Thursday 19 January 2012 00:14:34 Torsten Dreyer wrote: Hi, due to a bug in weather-utility.nas, the wave shader properties were stuck at a constant value for wind-speed zero. There was more unfortunate code in that file, so I refactored it as xml based property rule. This is the relevant commit: http://gitorious.org/fg/fgdata/commit/9b2e72e12d9a07b58d513c688a078f4fce3867 81 The computation of the properties for the wave shader and the snow line now live in FGDATA/Environment/interpolator.xml and FGDATA/Environment/metarinterpolator.xml Please check if the waves now correctly react to the wind and if the snow cover is right. If everything is OK, this should go into release/2.6.0, too. Greetings, Torsten Hi, So far it seems to be working over here, will test more thoroughly today. I had another question, could the wind vectors reported to the shader be interpolated on a longer (10x - 20x or so) time frame, or could they be updated only once a given time (1 minute or so)? I ask this in an attempt to cure the fast moving waves effect that happens each time METAR gets updated. Greetings, Emilian -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] weather-utility.nas
Am 19.01.2012 11:27, schrieb Emilian Huminiuc: I had another question, could the wind vectors reported to the shader be interpolated on a longer (10x - 20x or so) time frame, or could they be updated only once a given time (1 minute or so)? I ask this in an attempt to cure the fast moving waves effect that happens each time METAR gets updated. Thanks for the feedback. Yes - an interpolation over time is no problem at all. I actually thought about implementing this directly but chose to port the current behaviour before changing anything. Probably the same should be done for the snow-line which now jumps which might look silly. But all these are feature changes and will not go into the release branch. Torsten -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] weather-utility.nas
Am 19.01.2012 11:59, schrieb Torsten Dreyer: Am 19.01.2012 11:27, schrieb Emilian Huminiuc: I had another question, could the wind vectors reported to the shader be interpolated on a longer (10x - 20x or so) time frame, or could they be updated only once a given time (1 minute or so)? I ask this in an attempt to cure the fast moving waves effect that happens each time METAR gets updated. Thanks for the feedback. Yes - an interpolation over time is no problem at all. I actually thought about implementing this directly but chose to port the current behaviour before changing anything. Probably the same should be done for the snow-line which now jumps which might look silly. But all these are feature changes and will not go into the release branch. Hmm - actually, the wind properties _are_ interpolated over time if set from METAR which can be easily verified by observing /environment/sea/surface in the property browser and changing the global-weather scenario from, say stormy monday to fair weather. Despite the fact that the properties change slowly, I can see the waves jump in speed and direction. I have no idea why this happens, maybe something the shader itself? Torsten -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] weather-utility.nas
It seems like the wave go into hyperspeed while the interpolation process is happening, and only settle down and look right after the interpolation is complete. Curt. On Thu, Jan 19, 2012 at 3:54 PM, Torsten Dreyer tors...@t3r.de wrote: Am 19.01.2012 11:59, schrieb Torsten Dreyer: Am 19.01.2012 11:27, schrieb Emilian Huminiuc: I had another question, could the wind vectors reported to the shader be interpolated on a longer (10x - 20x or so) time frame, or could they be updated only once a given time (1 minute or so)? I ask this in an attempt to cure the fast moving waves effect that happens each time METAR gets updated. Thanks for the feedback. Yes - an interpolation over time is no problem at all. I actually thought about implementing this directly but chose to port the current behaviour before changing anything. Probably the same should be done for the snow-line which now jumps which might look silly. But all these are feature changes and will not go into the release branch. Hmm - actually, the wind properties _are_ interpolated over time if set from METAR which can be easily verified by observing /environment/sea/surface in the property browser and changing the global-weather scenario from, say stormy monday to fair weather. Despite the fact that the properties change slowly, I can see the waves jump in speed and direction. I have no idea why this happens, maybe something the shader itself? Torsten -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- Curtis Olson: http://www.atiak.com - http://aem.umn.edu/~uav/ http://www.flightgear.org - http://gallinazo.flightgear.org -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] weather-utility.nas
Hmm - actually, the wind properties _are_ interpolated over time if set from METAR which can be easily verified by observing /environment/sea/surface in the property browser and changing the global-weather scenario from, say stormy monday to fair weather. Despite the fact that the properties change slowly, I can see the waves jump in speed and direction. I have no idea why this happens, maybe something the shader itself? Torsten The shader scales the texture with windspeed and rotates it to get the right orientation, but the actual rate those change is too quick to look good, and gives the impression of very high speed, that's why I suggested a longer interpolation time for the values passed to the shader, and to avoid doing the interpolations in the shader itself (as that would hit performance). Only the two values of wind-from-north-fps and wind-from-east-fps are the ones that need this applied, as everything else is derived from these.-- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[Flightgear-devel] weather-utility.nas
Hi, due to a bug in weather-utility.nas, the wave shader properties were stuck at a constant value for wind-speed zero. There was more unfortunate code in that file, so I refactored it as xml based property rule. This is the relevant commit: http://gitorious.org/fg/fgdata/commit/9b2e72e12d9a07b58d513c688a078f4fce386781 The computation of the properties for the wave shader and the snow line now live in FGDATA/Environment/interpolator.xml and FGDATA/Environment/metarinterpolator.xml Please check if the waves now correctly react to the wind and if the snow cover is right. If everything is OK, this should go into release/2.6.0, too. Greetings, Torsten -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel