Re: [Flightgear-devel] Repeatable random seeds
Am 15.09.2011 22:24, schrieb Stuart Buchanan: [...] This is a bit trickier to fix in concept, because we want there to be variation in the clouds between runs rather than generating exactly the same set of clouds if you start in the same location with the same weather. yes, this is very desirable. [...] Unfortunately that will differ if a METAR update takes place between the different FG instances being started. Perhaps those running multiple FG instances on different machines could comment on whether this restriction would be acceptable? Up to now, I have been running without real weather fetch, so METAR updates are no problem at all. For the project here, we'll probably only need to use fixed weather scenarios. However, the sg_srandom_time_10() function also looks appealing. That would give the same random seed for all processes started within the same 10 minute interval, yet also vary every 10 minutes even with the same METAR. Maybe even METAR updates are possible if an update re-seeds from that function. Best regards, Andreas -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA http://p.sf.net/sfu/rim-devcon-copy2 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Repeatable random seeds
On Fri, Sep 16, 2011 at 10:35 AM, Andreas Gaeb a.g...@web.de wrote: However, the sg_srandom_time_10() function also looks appealing. That would give the same random seed for all processes started within the same 10 minute interval, yet also vary every 10 minutes even with the same METAR. Maybe even METAR updates are possible if an update re-seeds from that function. Ideally, we want MP to be synchronized too, and also if you restart FG on one of the machines it should pick up the same random stream again. -- Csaba/Jester -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA http://p.sf.net/sfu/rim-devcon-copy2 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Repeatable random seeds
On Fri, 2011-09-16 at 13:22 +0200, Csaba Halász wrote: On Fri, Sep 16, 2011 at 10:35 AM, Andreas Gaeb a.g...@web.de wrote: However, the sg_srandom_time_10() function also looks appealing. That would give the same random seed for all processes started within the same 10 minute interval, yet also vary every 10 minutes even with the same METAR. Maybe even METAR updates are possible if an update re-seeds from that function. Ideally, we want MP to be synchronized too, and also if you restart FG on one of the machines it should pick up the same random stream again. sg_srandom_time_10() divides the time in chunks of 10 minutes, so if there is a mismatch the first time it will get corrected the next time. Erik -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA http://p.sf.net/sfu/rim-devcon-copy2 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Repeatable random seeds
On Wed, 2011-09-14 at 11:18 +0200, Andreas Gaeb wrote: Hello everybody, lately I've been working on a multiscreen setup driven by multiple host machines. In order to get the same random scenery objects, all machines need to use the same random seed. Up to now, the random seed is taken from system time, which leads to inconsistencies. Is this broken.. again? Sigh. I've been pushing this behavior various times and scenery objects should always be positioned at the same location over and over again. This has been fixed a number of times with a proper solution. This patch is not a proper solution, sorry. Erik -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Repeatable random seeds
On Wed, Sep 14, 2011 at 10:43 AM, Erik Hofman wrote: Is this broken.. again? Sigh. I've been pushing this behavior various times and scenery objects should always be positioned at the same location over and over again. This may just be broken in the default 3D clouds code. I'll take a look. I know how to fix it properly ;) Thorsten Renk - If this something we need to be thinking about for the Local Weather as well? -Stuart -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Repeatable random seeds
Thorsten Renk - If this something we need to be thinking about for the Local Weather as well? We've been tossing the idea around in the forum that Local Weather stops using the rand() function from Nasal and uses its own internal random number generator. In this way, it could be initialized in a well-defined state on different machines, the sequence could not be messed up by other Nasal scripts running and you'd generate a predictable configuration. I haven't done anything in that direction though... * Thorsten -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Repeatable random seeds
On Wed, Sep 14, 2011 at 11:18 AM, Thorsten Renk wrote: Thorsten Renk - If this something we need to be thinking about for the Local Weather as well? We've been tossing the idea around in the forum that Local Weather stops using the rand() function from Nasal and uses its own internal random number generator. In this way, it could be initialized in a well-defined state on different machines, the sequence could not be messed up by other Nasal scripts running and you'd generate a predictable configuration. I haven't done anything in that direction though... OK. We've got something similar already in the C code for exactly this purpose. Might be more efficient to simply expose that over Nasal, but I'm not sure how easy that would actually be. -Stuart -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Repeatable random seeds
On Wed, 2011-09-14 at 13:33 +0200, Andreas Gaeb wrote: Am 14.09.2011 11:43, schrieb Erik Hofman: I've been pushing this behavior various times and scenery objects should always be positioned at the same location over and over again. To clarify things up a bit, not all is broken: - Houses etc. are the same - Trees are at the same location and same size, but sometimes have different textures. Looks like this is called by a rand() call in TreeBin.cxx:256, which is probably there because sg_random doesn't have an integer rand function. - both 2D and 3D clouds differ, and as far as I can tell, both in position and texture. Ah ok, then I guess it's better to address those different items instead of trying to create a reproducible wind gust (for instance) ;-) Erik -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Repeatable random seeds
On 14 Sep 2011, at 12:00, Stuart Buchanan wrote: OK. We've got something similar already in the C code for exactly this purpose. Might be more efficient to simply expose that over Nasal, but I'm not sure how easy that would actually be. Pretty trivial, for a function such as sg_random, unless I'm missing something really subtle. Basically add a f_random wrapper in NasalSys.cxx, add an entry to the static table at the bottom of the file, and you should be done. Oh, except you need to pick a name that doesn't clash with any internal Nasal rand/random. James -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel