Commit 7366608c authored by Rick Gruber-Riemer's avatar Rick Gruber-Riemer

Updating usage and parameters information.

parent 591b4205
......@@ -4,9 +4,86 @@
Parameters
##########
FIXME generate ini file
FIXME check ini file for unused parameters
FIXME link to minimal parameters
FIXME all decimals need to be with "." - i.e. local specific decimal separators like "," are not accepted.
Please consider the following:
FIXME: Note  Python does not recognize environment variables, please use full paths in the parameters file (no $HOME etc).
* Python does not recognize operating system environment variables, please use full paths in the parameters file (no ``$HOME`` etc).
* These parameters determine how syenery objects are generated offline as described in chapter :ref:`Scenery Generation <chapter-generation-label>`. There are no runtime parameters in FlightGear, which influence which and how ``osm2city`` generated scenery objects are shown — or how many [#]_.
* All decimals need to be with "." - i.e. local specific decimal separators like "," are not accepted.
* Some of the
=========================
View a List of Parameters
=========================
The final truth about parameters is stored in ``parameters.py`` — unfortunately the content in this chapter might be out of date (including default values).
It might be easiest to read ``parameters.py`` directly. Phython code is easy to read also for non-programmers. Otherwise you can run the following to see a listing:
::
/usr/bin/python2.7 /home/vanosten/develop_vcs/osm2city/parameters.py -d
If you want to see a listing of the actual parameters used during scenery generation (i.e. a compination of the defaults with the overridden values in your ``params.ini`` file, then you can run the following command:
::
/usr/bin/python2.7 --file /home/pingu/development/osm2city/parameters.py -f LSZS/params.ini
.. _chapter-param-minimal-label:
==================================
Detailed Description of Parameters
==================================
-----------
Minimal Set
-----------
See also :ref:`Setting a Minimal Set of Parameters <chapter-setting-parameters-label>`
============================================= ======== ======= ==============================================================================
Parameter Type Default Description / Example
============================================= ======== ======= ==============================================================================
PREFIX String n/a Name of the scenery project. Do not use spaces in the name.
PATH_TO_SCENERY Path n/a Full path to the scenery folder without trailing slash. This is where we will
probe elevation and check for overlap with static objects. Most likely you'll
want to use your TerraSync path here.
PATH_TO_OUTPUT Path n/a The generated scenery (.stg, .ac, .xml) will be written to this path. If empty
then the correct location in PATH_TO_SCENERY is used. Note that if you use
TerraSync for PATH_TO_SCENERY, you MUST choose a different path here.
Otherwise, TerraSync will overwrite the generated scenery. Unless you know
what you are doing, there is no reason not to specify a dedicated path here.
While not absolutely needed it is good practice to name the output folder
the same as ``PREFIX``.
OSM_FILE String n/a The file containing OpenStreetMap data. See chapter
:ref:`Getting OpenStreetMap Data <chapter-getting-data-label>`.
BOUNDARY_NORTH, BOUNDARY_EAST, Decimal n/a The longitude and latitude in degrees of the boundaries of the generated
BOUNDARY_SOUTH, BOUNDARY_WEST scenery.
The boundaries should correspond to the boundaries in the ``OSM_FILE``
(open the \*.osm file in a text editor and check the data in ca. line 3).
The boundaries can be different, but then you might either miss data
(if the OSM boundaries are larger) or do more processing than necessary
(if the OSM boundaries are more narrow).
NO_ELEV Boolean False Set this to ``False``. The only reason to set this to ``True`` would be for
developers to check generated scenery objects a bit faster not caring about
the vertical position in the scenery.
ELEV_MODE String n/a Choose one of "FgelevCaching", 2Fgelev", "Telnet", "Manual". See chapter
:ref:`Available Elevation Probing Mode<chapter-elev-modes-label>` for more
details.
============================================= ======== ======= ==============================================================================
-----
.. [#] The only exception to the rule is the possibility to adjust the :ref:`actual distance of LOD ranges <chapter-lod-label>`.
......@@ -121,20 +121,22 @@ Create a ``params.ini`` file with your favorite text editor. In our example it w
A few comments on the parameters:
PREFIX
Needs to be the same as the specific folder ``fg_customscenery/projects/``. Do not use spaces in the name.
Needs to be the same as the specific folder below ``fg_customscenery/projects/``. Do not use spaces in the name.
PATH_TO_SCENERY
Full path to the scenery folder without trailing slash. This is where we will probe elevation and check for overlap with static objects. Most
likely you'll want to use your TerraSync path here.
PATH_TO_OUTPUT
The generated scenery (.stg, .ac, .xml) will be written to this path. If empty the correct location in PATH_TO_SCENERY is used. Note that if you use TerraSync for PATH_TO_SCENERY, you MUST choose a different path here. Otherwise, TerraSync will overwrite the generated scenery. Unless you know what you are doing, there is no reason not to specify a dedicated path here. While not absolutely needed it is good practice to name the output folder the same as ``PREFIX``.
The generated scenery (.stg, .ac, .xml) will be written to this path. If empty then the correct location in PATH_TO_SCENERY is used. Note that if you use TerraSync for PATH_TO_SCENERY, you MUST choose a different path here. Otherwise, TerraSync will overwrite the generated scenery. Unless you know what you are doing, there is no reason not to specify a dedicated path here. While not absolutely needed it is good practice to name the output folder the same as ``PREFIX``.
OSM_FILE
The file containing OpenStreetMap data. See previous chapter :ref:`Getting OpenStreetMap Data <chapter-getting-data-label>`.
BOUNDARY_*
The longitude and latitude of the boundaries of the generated scenery. The boundaries should correspond to the boundaries in the ``OSM_FILE`` (open the \*.osm file in a text editor and check the data in ca. line 3). The boundaries can be different, but then you might either miss data (if the OSM boundaries are larger) or do more processing than necessary (if the OSM boundaries are more narrow).
NO_ELEV
Set this to ``False``. The only reason to set this to ``True`` would be for developers to check generated scenery objects a bit faster not caring about the vertical position in the scenery.
ELEV_MODE
See chapter :ref:`Available Elevation Probing Mode<chapter-elev-modes-label>`.
.. _chapter-generating-elevation-data-label:
......@@ -158,6 +160,7 @@ Please be aware that the scenery data needed for your area might not have been d
.. _TerraMaster: http://wiki.flightgear.org/TerraMaster
.. _chapter-elev-modes-label:
---------------------------------
Available Elevation Probing Modes
......
......@@ -5,6 +5,108 @@ Using Generated Scenery
#######################
FIXME: Add to path
FIXME: change material for urban
FIXME: consider sharing
FIXME: copy texture stuff
.. _chapter-lod-label:
=======================================
Adjusting Visibility of Scenery Objects
=======================================
The ``osm2city`` related programs and especially ``osm2city.py`` itself are using heuristics and parameters to determine at what level of detail (LOD) scenery objects should be visible. This is done by adding the objects to one of the three FlightGear LOD schemes: "bare", "rough" and "detailed".
In ``osm2city.py`` you can influence into which of the three LOD ranges the objects are placed by using the following :ref:`Parameters <chapter-parameters-label>`:
* LOD_ALWAYS_DETAIL_BELOW_AREA
* LOD_ALWAYS_ROUGH_ABOVE_AREA
* LOD_ALWAYS_ROUGH_ABOVE_LEVELS
* LOD_ALWAYS_BARE_ABOVE_LEVELS
* LOD_ALWAYS_DETAIL_BELOW_LEVELS
* LOD_PERCENTAGE_DETAIL
In FlightGear you can influence the actual distance (in meters) for the respective ranges by one of the following ways:
#. In The FlightGear user interface use menu ``View`` > menu item ``Adjust LOD Ranges`` and then change the values manually.
#. Include command line options into your fgfsrc_ file or `Properties in FGRun`_ like follows:
::
--prop:double:/sim/rendering/static-lod/detailed=5000
--prop:double:/sim/rendering/static-lod/rough=10000
--prop:double:/sim/rendering/static-lod/bare=15000
.. _fgfsrc: http://wiki.flightgear.org/Fgfsrc
.. _`Properties in FGRun`: http://wiki.flightgear.org/FlightGear_Launch_Control#Properties
(Note: previously there was also a osm2city specific LOD range "roof", however that has been abandoned since clustering was introduced. An therefore setting ``--prop:double:/sim/rendering/static-lod/roof=2000`` is not necessary anymore.)
=========================================
Disable Urban Shader and Random Buildings
=========================================
There is no point in having both OSM building scenery objects and dynamically generated buildings in FlightGear. Therefore it is recommended to turn off the ranom building and urban shader features in FlightGear. Please be aware that this will also affect those areas in FlightGear, where there are no generated scenery objects from OSM.
There are two possibilities to disable random buildings:
#. Use command line option ``--disable-random-buildings`` in your fgfsrc_ file — and while you are at it ``--disable-random-objects``.
#. Use the FlightGear menu ``View``, menu item ``Rendering Options``. Tick off ``Random buildings`` and ``Random objects``.
.. image:: fgfs_rendering_options.png
In the same dialog press the ``Shader Options`` button and set the slider for ``Urban`` to the far left in order to disable the urban shader.
.. image:: fgfs_shader_options.png
.. _chapter-hide-urban-textures-label:
=======================================
Change Materials to Hide Urban Textures
=======================================
FlightGear allows to change the texture used for a given landclass. More information is available in ``$FG_ROOT/Docs/README.materials`` as well as in the FlightGear Forum thread regarding `New Regional Textures`_. There is not yet a good base texture replacing the urban textures. However many users find it more visually appealing to use a uniform texture like grass under the generated buildings etc. instead of urban textures.
E.g. for the airport ``LSZS`` in Engadina in Switzerland you would have to go to ``$FG_ROOT/Materials/regions`` and edit file ``europe.xml`` in a text editor: add name-tags for e.g. ``BuiltUpCover``, ``Urban``, ``Town``, ``SubUrban`` to a material as shown below and comment out the existing name-tags using ``<!-- -->``. Basically all name-tags, which relate to a material using ``<effect>Effects/urban</effect>``. The outcome before and after edit (you need to restart FlightGear in between!) can be seen in the screenshots below (for illustration purposes the buildings and roads do not have textures).
::
...
<material>
<effect>Effects/cropgrass</effect>
<tree-effect>Effects/tree-european-mixed</tree-effect>
<name>CropGrassCover</name>
<name>CropGrass</name>
<name>BuiltUpCover</name>
<name>Urban</name>
<name>Town</name>
<name>SubUrban</name>
<texture>Terrain/cropgrass-hires-autumn.png</texture>
<object-mask>Terrain/cropgrass-hires.mask.png</object-mask>
...
...
<material>
<!-- <name>Town</name> -->
<!-- <name>SubUrban</name> -->
<effect>Effects/urban</effect>
<texture-set>
...
.. image:: fgfs_materials_urban.png
.. image:: fgfs_materials_cropgrass.png
Depending on your region and your shader settings you might want to search for e.g. ``GrassCover`` in file ``global-summer.xml`` instead (shown in screenshot below with ALS_ and more random vegetation). However be aware that you still need to outcomment in e.g. ``europe.xml`` and within ``global-summer.xml``.
.. image:: fgfs_materials_grass.png
.. _`New Regional Textures`: http://forum.flightgear.org/viewtopic.php?f=5&t=26031
.. _ALS: http://wiki.flightgear.org/Atmospheric_light_scattering
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment