Project3000

From FlightGear wiki
Jump to navigation Jump to search
project 3000

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.

Status & Gallery

Status: alive and kicking ;-)

March 2017:

  • 4097 airports with 3D objects
  • 421 airports with AI jetways
  • >120 different 3D models
  • 558356 objects
  • 71697 apron-lamps & streetlights
  • 62000 trees
  • 7500 cessnas


Gallery: http://www.23hq.com/laserman/album/21871264

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
  • DSFTool --dsf2text +34+135.dsf RJBB.txt

Download the software and shared models

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

How to use (as a pilot)

download and unpack this:

http://fresh-scenery-for-flightgear.sourceforge.net/project3000/project3000-March2017.tgz (19MB)

older versions:

then use it like any custom scenery.

--fg-scenery=/path/to/project3000

How to use (as an airport scenery creator)

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 (or download your own collection of ICAO.txt files - see below)

populate 1 airport:

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

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

before you do that it is a good idea to download the latest 3D scenery packages from the gateway:

wget -O airports http://gateway.x-plane.com/apiv1/airports
cd dsf_txt_collection2000
../find3d.py
./populate.sh > populate.log

getting a new airport:

cd dsf_txt_collection2000
../gateway_pull.py -i ICAO

testing the result (of running dsf2stg.py):

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

high priority

  • auto-generate .ac models as a replacement for X-Plane's "facade" buildings. osm2city does the job, but we have to tell it the airport bounding box.
  • generate params.ini for osm2city and call osm2city from dsf2aptdat.py
  • write jetways to ICAO.jetways.xml and not into stg files DONE

normal priority

  • 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..)
  • choose & resize models from http://scenemodels.flightgear.org/ -> more than 200 models can be converted now, some are still missing
  • fight the Z-fight (remove one lamp when 2 lamps are too close together)
  • DONE: not all Cessnas & cars are red! -> a random chooser for cars and (GA) aircraft
  • generate 3D airport fence - they are like osm2city buildings but with double sided walls and without a roof

low priority

  • trigger svn ("terrasync") to make sure we have terrain elevation data before starting elevation probing with fgelev

Advantages

  • many formerly empty airports will become "alive" - worldwide - with a download of only 10MB
  • 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.



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/ and including project3000 in terraGIT