Using OSM Vector Data in FlightGear: Difference between revisions

Jump to navigation Jump to search
Soitanen: added description of my converter
m (→‎osgEarth (poweroftwo): http://sourceforge.net/p/flightgear/mailman/message/31779992/)
(Soitanen: added description of my converter)
Line 233: Line 233:
Here is an example: [http://www.youtube.com/watch?v=TK85iSeLrGY]
Here is an example: [http://www.youtube.com/watch?v=TK85iSeLrGY]


=== OSM2FG (Saitonen) ===
=== OSM2FG (Soitanen) ===
This is script, which helps to automate convert landuse, lines, waterway etc data from OSM to FG.
Git repository located here: [https://github.com/soitanen/osm2fg]
Also it needs to have custom materials for textured roads and railroads from Project Russia: [https://github.com/soitanen/Project-Russia]
Currently, this converter works only for Russia and CIS countries.
 
Workflow:
Converter must be run from commandline. No GUI is presented. In commandline bounding box for generation is set. Then it automatically download heights (from the same source, as World Scenery 2.0), automatically downloads freshest X-Plane airport base, downloads full world coastlines and regional shapes for different regions of Russia, depending on BBOX. So, if select to generate some terrain outside of Russia, then scenery will be generated as land with normal coastlines and airports. No roads, no landuse.
In case of acceptable region it automatically makes textured roads and railroads. Mostly number of lines on roads will match real one (if presented in OSM data). Forests, water polygons, water lines - all will be converted good. Also, some simplification will be done for shapes to reduce number of polygons and generating time. If scenery tile is too complex and bugs are appearing, LOD level can be set for generating to reduce number of generated features (on low LOD levels roads with low majority level are not generated, the same for low majority landuse).
And after all automatic preparations it just runs standard Terragear routine to generate final scenery.
 
In earlier version there was building generator, that generates each building as single object, but that was too bad for FPS.
Better way to use osm2city from radi, but I can't automate it because of need to run FG and get elevations for the tile.
 
using OBJECT_STATIC_AGL gives big slowdown in FG working. So precalculation is much better. How you program gets elevation? Does it use the same data, as TerraGear use for terrain generation?
using OBJECT_STATIC_AGL gives big slowdown in FG working. So precalculation is much better. How you program gets elevation? Does it use the same data, as TerraGear use for terrain generation?


2

edits

Navigation menu