Project3000

From FlightGear wiki
Revision as of 21:29, 2 November 2015 by Laserman (talk | contribs) (→‎Credits)
Jump to navigation Jump to search

Project3000 is a project to automatically improve scenery at many airports using position data (.dsf) from the X-Plane Scenery Gateway and shared models from FlightGear.

The project started in October 2015, and is so named because the Scenery Gateway website stated roughly 3,000 scenery packs with 3D objects. Some airports have more than one pack to choose from, so at the moment we can populate 2,260 airports.

Requirements

  • Python 2.x (Python 3 will not work)
  • Some knowledge of the command line.

Tools

  • gateway_pull.py
  • dsf2stg.py
  • populate.sh
  • shared models in the Models/lib folder
  • translation table: library.txt

How to use

git clone https://github.com/mherweg/d-laser-fgtools.git

or "Download zip" on https://github.com/mherweg/d-laser-fgtools

make sure that you have downloaded terrain of the airports that you want to make, otherwise elevation probing will fail and all objects will be at sea level.

Test if fgelev is working on your computer: (be patient, fgelev is slow )

export FG_ROOT= YOUR FG_ROOT PATH
export FG_SCENERY= YOUR TERRASYNC PATH
time echo "foo 8.56256161 50.04758962 " | fgelev

a good result example(107m above MSL)

foo: 107.910

a bad result example (approx 0m MSL)

foo: -0.34

prepare a custom scenery folder:

mkdir -p /home/YOURUSERNAME/scenery/test/Objects
cp -r Models /home/YOURUSERNAME/scenery/test/

write your paths into parameters.py:

PATH_TO_SCENERY = "/home/YOURUSERNAME/.fgfs/TerraSync"
PATH_TO_OUTPUT = "/home/YOURUSERNAME/scenery/test"

you might also have to change the fg_root in fgelev.py:

fg_root = "/usr/share/games/flightgear"

unpack dsf_txt_collection2000.tgz

populate 1 airport:

./dsf2stg.py -i dsf_txt_collection2000/EDDF.txt

populate all airports(takes a few hours and only makes sense if you have terrain for most of them):

./populate.sh > populate.log

getting a new airport:

cd dsf_txt_collection2000
./gateway_pull.py -i ICAO

testing the result:

fgfs --aircraft=ufo --airport=EDDF --fg-scenery=/home/YOURUSERNAME/scenery/test

Modifying and contributing

Let's say you want different light-posts, no jetways, no static aircraft, no trees or whatever you like/dislike. You can control what will be generated by changing lines in library.txt. Put a # at the beginning of a line to disable a model. Change the second path (it starts with Models ) in a line to choose a different model. The number at the end of some lines are offsets and heading. the first 2 numbers are not used, the third is elevation offset in meters,the last value is the heading offset in degrees. Let's say a model is pointing north in WED and your replacement model is pointing up (positive y) in Blender's top view, then the required heading offset is 90.

At the end of library.txt you find a list of models where we don't have a Flightgear replacement yet, sorted by popularity. Pick stuff that you would like to have (shed, factory, ...) open WED to see how it looks and find or make a model that fits.

If you don't want to run the tools yourself, you can still "disable" or change models by renaming/moving/replacing the .ac and .xml files in you Models folder.

To Do

  • organize the library.txt into chapters so that we can easily enable or disable a class of objects(all light, all cars, all jetways, all static aircraft..)
  • maybe trigger svn ("terrasync") to make sure we have terrain elevation data before starting elevation probing with fgelev
  • choose & resize models from http://scenemodels.flightgear.org/ -> more than 200 models can be converted now, some are still missing
  • auto-generate .ac models as a replacement for X-Plane's "facade" buildings -> osm2city does the job, but roof texture needs to be fixed.
  • generate params.ini for osm2city and call osm2city from dsf2aptdat.py
  • fight the Z-fight (remove one lamp when 2 lamps are too close together)
  • not all Cessnas & cars are red! -> a random chooser for cars and (GA) aircraft
  • write jetways to ICAO.jetways.xml and not into stg files

Advantages

  • many formerly empty airports will become "alive" - worldwide - with a download of only 20MB
  • while learning how to convert the source data I found bugs and reported them to the gateway team. That improves the source data and tools like WED.
  • now we can place many shared objects with WED. If we do that, both the FlightGear and also the X-Plane Community will benefit from it.

Disadvantages

  • too many scenery objects will have a negative impact on your framerate. How bad that is depends on your hardware and the airport. Please help to analyze and optimize the shared models that we use.
  • at airports which are already nicely equipped in FlightGear you'll see duplicate things like: jetways from Terrasync and jetways from the project3000 custom scenery. you can exclude those airports by deleting their ICAO.txt from the dsf_txt_collection2000 folder.


Download

the tools are here: https://github.com/mherweg/d-laser-fgtools

and the first version of a world wide custom scenery pack is here: http://media.lug-marl.de/flightgear/project3000.tgz (21MB)

Support

please post on the forum: http://forum.flightgear.org/viewtopic.php?f=5&t=27688 or use the discussion tab of this page

Credits

Thanks to..

  • everyone who makes 3D airports and uploads them to the gateway.
  • everyone who makes scenery models and uploads them to http://scenemodels.flightgear.org/
  • Martin Spott and others for making, running & supporting http://scenemodels.flightgear.org/
  • Laminar Research for making, running and supporting the gateway server
  • all authors of osm2city.py (radi,vanosten, ...) - I use a lot of their code
  • Texnicer, HerbyW, 3m, D-07007 for brainstorming and testing
  • IAHM-COL for uploading project3000 shared models to http://scenemodels.flightgear.org/