Re: [Flightgear-devel] Shared Scenery Objects
On Sun, 22 Sep 2002 07:53:34 -0400 David Megginson [EMAIL PROTECTED] wrote: For a while now, FlightGear has had support for adding static scenery objects (like buildings) to *.stg scenery files using the syntax OBJECT_STATIC file lon lat elevation-m heading The file is always loaded relative to the current scenery directory (such as /usr/local/scenery/w080n40/w077n45), which is great for one-off objects like the Golden Gate Bridge or the Empire State Building, but not so useful for objects like radio towers, barns, etc. that can be used over and over. I have just added a new directive, OBJECT_SHARED, that works exactly like the above except that it loads the object relative to $FG_ROOT rather than the current scenery directory. For example, I have my $FG_ROOT at /usr/local/FlightGear/ and my $FG_SCENERY at /usr/local/Scenery. If I add this line to w080n40/w077n45/1696211.stg OBJECT_STATIC red-barn.ac -76.022499 45.319500 200 0 FlightGear will attempt to load /usr/local/Scenery/w080n40/w077n45/red-barn.ac On the other hand, if I have OBJECT_SHARED Models/Buildings/red-barn.ac -76.022499 45.319500 200 0 FlightGear will attempt to load /usr/local/FlightGear/Models/Buildings/red-barn.ac Excellent! Hopefully this will work for texture files referenced by the object. FWIW I'm working on importing XPlane custom objects and many of them share textures. I already have the SFO terminal and Golden Gate bridge loading. The big challenge right now is figuring out what tile to add an object to -- I will try to whip up a Perl script to help with this. Once that's working, we can automatically add all NDB towers and VOR transmitters from our current data and populate the world a little more; one user has a copy of the FAA obstacle database, and that would allow us even more detail in the U.S. The following c++ program prints the tile name given a lat/lon. [bbright@proton FlightGear-0.7]$ cat latlon.cxx #include iostream #include cstdlib #include simgear/bucket/newbucket.hxx using std::cout; int main( int argc, char* argv[] ) { if (argc != 3) { cout Usage: argv[0] lat lon\n; return 1; } double dlat = atof( argv[1] ); double dlon = atof( argv[2] ); SGBucket b( dlon, dlat ); cout b.gen_base_path() / b.gen_index_str() \n; return 0; } ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Shared Scenery Objects
Bernie Bright writes: Excellent! Hopefully this will work for texture files referenced by the object. OBJECT_SHARED does work with textures; OBJECT_STATIC does not, yet. I have Frederic Bouvier's patch in my TODO queue, but I want to study it closely before I commit it. FWIW I'm working on importing XPlane custom objects and many of them share textures. I already have the SFO terminal and Golden Gate bridge loading. Are those redistributable? All the best, David -- David Megginson, [EMAIL PROTECTED], http://www.megginson.com/ ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Shared Scenery Objects
Bernie Bright writes: FWIW I'm working on importing XPlane custom objects and many of them share textures. I already have the SFO terminal and Golden Gate bridge loading. Are those redistributable? They are freeware and may be redistributed as long as it is not for commercial purposes. That's too bad -- it would have been nice to include them in FlightGear. Unfortunately, we cannot put anything in the base package with such a restrictive license -- we need GPL or freer (i.e. LGPL, MPL, Perl Artistic, BSD, or Public Domain). If we want to include them with FG (or as a separate download) then I will drop a line to the author. But before that happens I should get the loader into plib. It would be nice to set them up as a separate download, but we will need these in the base package soon, so unless the author is willing to change the terms, we'll have to reproduce them outselves. I think that we need to add the Bay-area bridges before anything else; next could be a few obvious landmarks like the Cow Palace, the TransAmerica building, and Alcatraz, then the KSFO terminal buildings. All the best, David -- David Megginson, [EMAIL PROTECTED], http://www.megginson.com/ ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Shared Scenery Objects
On Sun, 22 Sep 2002 11:00:18 -0400 David Megginson [EMAIL PROTECTED] wrote: It would be nice to set them up as a separate download, but we will need these in the base package soon, so unless the author is willing to change the terms, we'll have to reproduce them outselves. I think that we need to add the Bay-area bridges before anything else; next could be a few obvious landmarks like the Cow Palace, the TransAmerica building, and Alcatraz, then the KSFO terminal buildings. The package I downloaded includes the following bridges: ggbridge - Golden Gate wobbridge eobbridge smbridge srbridge tnbridge dunbridge I'm not familiar with the names or positions of the Bay-area bridges but hopefully this includes them all. The package contains terminals for Oakland and Seatac. It also contains generic control towers, hangars, buildings, a prison and the space needle. I will contact the author and see if he will allow us to repackage some of these objects and textures under a different, compatible, license. Bernie ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel