Project3000: Difference between revisions
m (→requirements) |
Red Leader (talk | contribs) (Do some cleanup) |
||
Line 1: | Line 1: | ||
'''Project3000''' is a project to automatically improve [[scenery]] at many [[airports]] using position data (.dsf) from the [http://gateway.x-plane.com/ 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 | * gateway_pull.py | ||
* dsf2stg.py | * dsf2stg.py | ||
Line 17: | Line 14: | ||
* translation table: library.txt | * translation table: library.txt | ||
== | == How to use == | ||
< | <syntaxhighlight lang="bash"> | ||
git clone https://github.com/mherweg/d-laser-fgtools.git | git clone https://github.com/mherweg/d-laser-fgtools.git | ||
</ | </syntaxhighlight> | ||
or "Download zip" on https://github.com/mherweg/d-laser-fgtools | or "Download zip" on https://github.com/mherweg/d-laser-fgtools | ||
Line 28: | Line 25: | ||
(be patient, fgelev is slow ) | (be patient, fgelev is slow ) | ||
< | <syntaxhighlight lang="bash"> | ||
export FG_ROOT= YOUR FG_ROOT PATH | export FG_ROOT= YOUR FG_ROOT PATH | ||
export FG_SCENERY= YOUR TERRASYNC PATH | export FG_SCENERY= YOUR TERRASYNC PATH | ||
time echo "foo 8.56256161 50.04758962 " | fgelev | time echo "foo 8.56256161 50.04758962 " | fgelev | ||
</ | </syntaxhighlight> | ||
a good result example(107m above MSL) | a good result example(107m above MSL) | ||
foo: 107.910 | |||
a bad result example (approx 0m MSL) | a bad result example (approx 0m MSL) | ||
foo: -0.34 | |||
prepare a custom scenery folder: | prepare a custom scenery folder: | ||
< | <syntaxhighlight lang="bash"> | ||
mkdir -p /home/YOURUSERNAME/scenery/test/Objects | mkdir -p /home/YOURUSERNAME/scenery/test/Objects | ||
cp -r Models /home/YOURUSERNAME/scenery/test/ | cp -r Models /home/YOURUSERNAME/scenery/test/ | ||
</ | </syntaxhighlight> | ||
write your paths into parameters.py: | write your paths into parameters.py: | ||
< | <syntaxhighlight lang="python"> | ||
PATH_TO_SCENERY = "/home/YOURUSERNAME/.fgfs/TerraSync" | PATH_TO_SCENERY = "/home/YOURUSERNAME/.fgfs/TerraSync" | ||
PATH_TO_OUTPUT = "/home/YOURUSERNAME/scenery/test" | PATH_TO_OUTPUT = "/home/YOURUSERNAME/scenery/test" | ||
</ | </syntaxhighlight> | ||
you might also have to change the fg_root in fgelev.py: | you might also have to change the fg_root in fgelev.py: | ||
< | <syntaxhighlight lang="python"> | ||
fg_root = "/usr/share/games/flightgear" | fg_root = "/usr/share/games/flightgear" | ||
</ | </syntaxhighlight> | ||
unpack dsf_txt_collection2000.tgz | unpack dsf_txt_collection2000.tgz | ||
populate 1 airport: | populate 1 airport: | ||
< | <syntaxhighlight lang="bash"> | ||
./dsf2stg.py -i dsf_txt_collection2000/EDDF.txt | ./dsf2stg.py -i dsf_txt_collection2000/EDDF.txt | ||
</ | </syntaxhighlight> | ||
populate all airports(takes a few hours and only makes sense if you have terrain for most of them): | populate all airports(takes a few hours and only makes sense if you have terrain for most of them): | ||
< | <syntaxhighlight lang="bash"> | ||
./populate.sh > populate.log | ./populate.sh > populate.log | ||
</ | </syntaxhighlight> | ||
getting a new airport: | getting a new airport: | ||
< | <syntaxhighlight lang="bash"> | ||
cd dsf_txt_collection2000 | cd dsf_txt_collection2000 | ||
./gateway_pull.py -i ICAO | ./gateway_pull.py -i ICAO | ||
</ | </syntaxhighlight> | ||
testing the result: | testing the result: | ||
< | <syntaxhighlight lang="bash"> | ||
fgfs --aircraft=ufo --airport=EDDF --fg-scenery=/home/YOURUSERNAME/scenery/test | fgfs --aircraft=ufo --airport=EDDF --fg-scenery=/home/YOURUSERNAME/scenery/test | ||
</ | </syntaxhighlight> | ||
== | == 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. | 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. | ||
Line 90: | Line 85: | ||
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. | 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. | ||
== Advantages == | |||
== | |||
* many formerly empty airports will become "alive" - worldwide - with a download of only 20MB | * 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. | * 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. | * 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. | * 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 | * 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: | the tools are here: | ||
https://github.com/mherweg/d-laser-fgtools | https://github.com/mherweg/d-laser-fgtools | ||
Line 108: | Line 102: | ||
http://media.lug-marl.de/flightgear/project3000.tgz (21MB) | http://media.lug-marl.de/flightgear/project3000.tgz (21MB) | ||
== | == Support == | ||
please post on the forum: | please post on the forum: http://forum.flightgear.org/viewtopic.php?f=5&t=27688 | ||
or use the discussion tab of this page | or use the discussion tab of this page | ||
== | == Credits == | ||
* Thanks to everyone who makes 3D airports and uploads them to the gateway. | * Thanks to everyone who makes 3D airports and uploads them to the gateway. | ||
* Thanks to everyone who makes 3D scenery models and uploads them to http://scenemodels.flightgear.org/ | * Thanks to everyone who makes 3D scenery models and uploads them to http://scenemodels.flightgear.org/ |
Revision as of 13:09, 28 October 2015
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.
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.
- Thanks to everyone who makes 3D scenery models and uploads them to http://scenemodels.flightgear.org/
- Thanks to Martin Spott and others for making, running & supporting http://scenemodels.flightgear.org/
- Thanks to Laminar Research for making, running and supporting the gateway server
- Thanks to all authors of osm2city.py (radi,vanosten, ...) - I use a lot of their code
- Thanks to Texnicer, HerbyW, 3m, D-07007 for brainstorming and testing