Commit b4152789 authored by Rick Gruber-Riemer's avatar Rick Gruber-Riemer

Migrating static data like shaders and effects to osm2city-data

parent 02ed28c8
......@@ -369,9 +369,6 @@ def write_xml(path: str, file_name: str, buildings: List[building_lib.Building],
has_lod_rough = False
has_lod_detail = False
# -- lightmap
# FIXME: use Effect/Building? What's the difference?
# <lightmap-factor type="float" n="0"><use>/scenery/LOWI/garage[0]/door[0]/position-norm</use></lightmap-factor>
if parameters.LIGHTMAP_ENABLE:
xml.write(textwrap.dedent("""
<effect>
......@@ -498,7 +495,7 @@ if __name__ == "__main__":
tools.init(coordinates.Transformation(center, hdg=0))
prepare_textures.init(util.get_osm2city_directory(), args.create_atlas)
prepare_textures.init(args.create_atlas)
logging.info("reading elevation data")
elev = tools.get_interpolator(fake=parameters.NO_ELEV)
......@@ -1101,7 +1098,6 @@ if __name__ == "__main__":
# -- write .ac and .xml
building_lib.write(path_to_stg + file_name + ".ac", cl.objects, elev, tile_elev, tools.transform, offset)
write_xml(path_to_stg, file_name, cl.objects, offset)
tools.install_files(['cityLM.eff', 'lightmap-switch.xml'], path_to_stg, True)
if args.uninstall:
for f in files_to_remove:
......
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>cityLM</name>
<inherits-from>/Effects/model-combined-deferred</inherits-from>
<parameters>
<!-- Light Map -->
<lightmap-enabled type="int">1</lightmap-enabled>
<lightmap-multi type="int">1</lightmap-multi>
<texture n="3">
<image>tex/atlas_facades_LM.png</image>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
</texture>
<lightmap-factor type="float" n="0"><use>/scenery/osm2city/lightmap-factor</use></lightmap-factor>
<lightmap-color type="vec3d" n="0"> 1. 0.88 0.6 </lightmap-color>
<lightmap-factor type="float" n="1"><use>/scenery/osm2city/lightmap-factor</use></lightmap-factor>
<!--
<lightmap-color type="vec3d" n="1"> 0.941 0.682 0.086 </lightmap-color>
<lightmap-color type="vec3d" n="1"> 0.941 0.682 0.286 </lightmap-color>
-->
<lightmap-color type="vec3d" n="1"> 0.564 0.409 0.172 </lightmap-color>
<lightmap-factor type="float" n="2">0</lightmap-factor>
<lightmap-factor type="float" n="3">0</lightmap-factor>
<!--
<lightmap-factor type="float" n="3">1</lightmap-factor>
<lightmap-color type="vec3d" n="3"> 1 1 1 </lightmap-color>
-->
</parameters>
</PropertyList>
......@@ -3,6 +3,7 @@
"""
import argparse
from distutils.dir_util import copy_tree
import logging
import os
import shutil
......@@ -12,7 +13,7 @@ import parameters
import utils.utilities as util
def main():
def main(copy_fg_data: bool) -> None:
scenery_path = parameters.get_output_path()
scenery_path += os.sep + "Objects"
......@@ -31,18 +32,38 @@ def main():
logging.error("The scenery path does not seem to have necessary sub-directories in %s", scenery_path)
sys.exit(1)
else:
orig_tex_dir = util.get_osm2city_directory() + os.sep + "tex"
tex_content_list = os.listdir(orig_tex_dir)
if not os.path.exists(orig_tex_dir):
logging.error("The original tex dir seems to be missing: %s", orig_tex_dir)
data_dir = util.assert_trailing_slash(parameters.PATH_TO_OSM2CITY_DATA)
# textures
source_dir = data_dir + "tex"
content_list = os.listdir(source_dir)
if not os.path.exists(source_dir):
logging.error("The original tex dir seems to be missing: %s", source_dir)
sys.exit(1)
for level_two_dir in level_two_dirs:
tex_dir = level_two_dir + os.sep + "tex"
if not os.path.exists(tex_dir):
os.mkdir(tex_dir)
logging.info("Copying texture stuff to sub-directory %s", tex_dir)
for content in tex_content_list:
shutil.copy(orig_tex_dir + os.sep + content, tex_dir)
for content in content_list:
shutil.copy(source_dir + os.sep + content, tex_dir)
# light-map effects
source_dir = data_dir + "lightmap"
if not os.path.exists(source_dir):
logging.error("The original lightmap dir seems to be missing: %s", source_dir)
sys.exit(1)
for level_two_dir in level_two_dirs:
logging.info("Copying lightmap stuff directory %s", level_two_dir)
content_list = os.listdir(source_dir)
for content in content_list:
shutil.copy(source_dir + os.sep + content, level_two_dir)
if copy_fg_data:
fg_root_dir = util.get_fg_root()
logging.info("Copying fgdata directory into $FG_ROOT (%s)", fg_root_dir)
source_dir = data_dir + "fgdata"
copy_tree(source_dir, fg_root_dir)
else:
logging.error("The scenery path must include a directory 'Objects' like %s", scenery_path)
sys.exit(1)
......@@ -50,14 +71,14 @@ def main():
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
parser = argparse.ArgumentParser(description="Copies texture related data in directory 'tex' into the scenery folders.")
parser = argparse.ArgumentParser(description="Copies texture and effects related data in directory 'tex' \
into the scenery folders.")
parser.add_argument("-f", "--file", dest="filename",
help="Mandatory: read parameters from FILE (e.g. params.ini)", metavar="FILE", required=True)
parser.add_argument("-a", action="store_true",
help="also copy effects etc. in fgdata to $FG_ROOT", required=False)
args = parser.parse_args()
if args.filename is not None:
parameters.read_from_file(args.filename)
else:
logging.error("The filename argument is mandatory")
sys.exit(1)
main()
parameters.read_from_file(args.filename)
main(args.a)
......@@ -37,6 +37,8 @@ osm2city uses the following Python extension packages, which must be installed o
Please make sure to use Python 3.5 compatible extensions. Often Python 3 compatible packages have a "3" in their name. Most Linux distributions come by default with the necessary packages — often they are prefixed with ``python-`` (e.g. ``python-numpy``). On Windows WinPython (https://winpython.github.io/) together with Christoph Gohlke's unofficial Windows binaries for Python extension packages (http://www.lfd.uci.edu/~gohlke/pythonlibs/) works well.
.. _chapter-osm2city-install:
========================
Installation of osm2city
========================
......@@ -49,8 +51,17 @@ There is no installer package - neither on Windows nor Linux. ``osm2city`` consi
Do the following:
#. Download the packages either using Git_ or as a zip-package.
#. Add the ``osm2city`` directory to your ``PYTHONPATH``. You can read more about this at https://docs.python.org/3.5/using/cmdline.html#envvar-PYTHONPATH.
#. Create soft links between as described in the following sub-chapter.
#. Add the ``osm2city`` directory to your ``PYTHONPATH`` (see :ref:`below <chapter-set-pythonpath-label>`).
#. Make sure that you have :ref:`set $FG_ROOT <chapter-set-fgroot-label>`
You might as well check your installation and :ref:`create a texture atlas <chapter-create-texture-atlas>` — doing so makes sure your installation works and you do not run into the problem of having an empty texture atlas.
.. _chapter-set-pythonpath-label:
------------------
Setting PYTHONPATH
------------------
You can read more about this at https://docs.python.org/3.5/using/cmdline.html#envvar-PYTHONPATH.
On Linux you would typically add something like the following to your ``.bashrc`` file:
......@@ -63,26 +74,13 @@ On Linux you would typically add something like the following to your ``.bashrc`
.. _Git: http://www.git-scm.com/
.. _chapter-texture_data-label:
-----------------------------------
Creating Soft Links to Texture Data
-----------------------------------
Many of the ``osm2city`` programs must have access to texture data in ``osm2city-data``. The following assumes that both the ``osm2city`` and ``osm2city-data`` are stored within the same directory.
.. _chapter-set-fgroot-label:
On a Linux workstation do the following:
-------------------------------------
Setting Environment Variable $FG_ROOT
-------------------------------------
The environment variable ``$FG_ROOT`` must be set in your operating system or at least your current session, such that ``fgelev`` can work optimally. How you set environment variables is depending on your operating system and not described here. I.e. this is NOT something you set as a parameter in ``params.ini``!
::
You might have to restart Windows to be able to read the environment variable that you set through the control panel. In Linux you might have to create a new console session.
$ cd osm2city
$ ln -sf ../osm2city-data/tex.src
$ ln -sf ../osm2city-data/tex
On a Windows computer do the following (path may differ):
::
> mklink /J C:\development\osm2city\tex.src C:\development\osm2city-data\tex.src
> mklink /J C:\development\osm2city\tex C:\development\osm2city-data\tex
You might as well check your installation and :ref:`create a texture atlas <chapter-create-texture-atlas>` — doing so makes sure your installation works and you do not run into the problem of having an empty texture atlas.
`$FG_ROOT`_ is typically a path ending with directories ``data`` or ``fgdata`` (e.g. on Linux it could be ``/home/pingu/bin/fgfs_git/next/install/flightgear/fgdata``).
......@@ -62,6 +62,10 @@ PATH_TO_OUTPUT Path n/a The generat
While not absolutely needed it is good practice to name the output folder
the same as ``PREFIX``.
PATH_TO_OSM2CITY_DATA Path n/a Full path to the folder with osm2city-data. See chapter
:ref:`Installation of osm2city <chapter-osm2city-install>` (e.g.
"/home/user/osm2city-data").
OSM_FILE String n/a The file containing OpenStreetMap data. See chapter
:ref:`Getting OpenStreetMap Data <chapter-getting-data-label>`.
......@@ -111,6 +115,27 @@ LOD_PERCENTAGE_DETAIL Decimal 0.5 Of the rema
============================================= ======== ======= ==============================================================================
.. _chapter-parameters-light:
-------------
Light Effects
-------------
Parameters for some light effects / shaders.
============================================= ======== ======= ==============================================================================
Parameter Type Default Description / Example
============================================= ======== ======= ==============================================================================
TRAFFIC_SHADER_ENABLE Boolean False If True then the traffic shader gets enabled, otherwise the light-map shader.
These effects are only for roads, not railways. The traffic shader has moving
cars, however it only works with the default renderer — ALS/Rembrandt must be
off.
OBSTRUCTION_LIGHT_MIN_LEVELS Integer 15 Puts obstruction lights on buildings >= the specified number levels.
LIGHTMAP_ENABLE Boolean True Creates simulated light effects on buildings from street lights.
============================================= ======== ======= ==============================================================================
.. _chapter-parameters-clipping:
---------------
......@@ -154,14 +179,11 @@ Parameters for roads, railways and related bridges. One of the challenges to sho
============================================= ======== ======= ==============================================================================
Parameter Type Default Description / Example
============================================= ======== ======= ==============================================================================
TRAFFIC_SHADER_ENABLE Boolean False If True then the traffic shader gets enabled, otherwise the lightmap shader.
These effects are only for roads, not railways.
BRIDGE_MIN_LENGTH Decimal 20. Discard short bridges and draw roads or railways instead.
MIN_ABOVE_GROUND_LEVEL Decimal 0.01 How much a highway / railway is at least hovering above ground
HIGHWAY_TYPE_MIN Integer 5 The lower the number, the smaller ways in the highway hierarchy are added.
HIGHWAY_TYPE_MIN Integer 4 The lower the number, the smaller ways in the highway hierarchy are added.
Currently the numbers are as follows (see roads.py -> HighwayType).
motorway = 12
trunk = 11
......@@ -186,8 +208,8 @@ POINTS_ON_LINE_DISTANCE_MAX Integer 1000 The maximum
MAX_SLOPE_ROAD, MAX_SLOPE_* Decimal 0.08 The maximum allowed slope. It is used for ramps to bridges, but it is also
used for other ramps. Especially in mountainous areas you might want to set
higher values (e.g. 0.15 for roads works fine in Switzerand). This leads to
steeper ramps to bridges, but give much fewer residuals with embankements.
higher values (e.g. 0.15 for roads works fine in Switzeland). This leads to
steeper ramps to bridges, but give much fewer residuals with embankments.
============================================= ======== ======= ==============================================================================
......
......@@ -192,10 +192,9 @@ The next chapters describe each elevation probing mode and link to a :ref:`detai
---------------------------
ELEV_MODE = "FgelevCaching"
---------------------------
In this mode elevation probing happens while running ``osm2city`` related scenery generation — instead of a data preparation task. There are 2 pre-requisites:
In this mode elevation probing happens while running ``osm2city`` related scenery generation — instead of a data preparation task. There is only one pre-requisite:
#. :ref:`Setting parameter FG_ELEV <chapter-set-fgelev-path-label>`
#. :ref:`Setting environment variable FG_ROOT <chapter-set-fgroot-label>`
.. _chapter-elev-fgelev-label:
......@@ -208,7 +207,6 @@ This elevation probing mode and the next modes generate a file ``elev.out``, whi
#. :ref:`Setting parameter FG_ELEV <chapter-set-fgelev-path-label>`
#. :ref:`Setting parameters ELEV_RASTER_* <chapter-set-elev-raster-label>`
#. :ref:`Setting environment variable FG_ROOT <chapter-set-fgroot-label>`
#. :ref:`Run tools.py to generate elevation data <chapter-run-tools-label>`
......@@ -281,17 +279,6 @@ Setting Parameter FG_ELEV
Set parameter ``FG_ELEV`` to point to the full path of the executable. On Linux it could be something like ``FG_ELEV = '/home/pingu/bin/fgfs_git/next/install/flightgear/bin/fgelev'``. On Windows you might have to put quotes around the path due to whitespace e.g. ``FG_ELEV = '"D:/Program Files/FlightGear/bin/Win64/fgelev.exe"'``.
.. _chapter-set-fgroot-label:
+++++++++++++++++++++++++++++++++++++
Setting Environment Variable $FG_ROOT
+++++++++++++++++++++++++++++++++++++
The environment variable ``$FG_ROOT`` must be set in your operating system or at least your current session, such that ``fgelev`` can work optimally. How you set environment variables is depending on your operating system and not described here. I.e. this is NOT something you set as a parameter in ``params.ini``!
`$FG_ROOT`_ is typically a path ending with directories ``data`` or ``fgdata`` (e.g. on Linux it could be ``/home/pingu/bin/fgfs_git/next/install/flightgear/fgdata``).
.. _chapter-set-elev-raster-label:
++++++++++++++++++++++++++++++++
......@@ -379,10 +366,9 @@ Change the work directory to e.g. ``fg_customscenery/projects`` and then run pre
$ cd fg_customscenery/projects
$ /usr/bin/python3 /home/pingu/development/osm2city/prepare_elev.py --fg_root=/home/pingu/bin/fgfs_git/next/install/flightgear/fgdata
$ /usr/bin/python3 /home/pingu/development/osm2city/prepare_elev.py -f LSZS/params.ini
...
The command-line option ``--fg_root`` is essential and points to `$FG_ROOT`_ (see also :ref:`Setting environment variable $FG_ROOT <chapter-set-fgroot-label>`).
.. _chapter-elev.nas-label:
......@@ -390,7 +376,7 @@ The command-line option ``--fg_root`` is essential and points to `$FG_ROOT`_ (se
Adapt File elev.nas
+++++++++++++++++++
The root directory of ``osm2city`` contains a file ``elev.nas``. First copy the file into the ``Nasal`` directory in `$FG_ROOT`_ (see also :ref:`Setting environment variable $FG_ROOT <chapter-set-fgroot-label>`).
The root directory of ``osm2city-data`` contains a file ``nasal/elev.nas``. First copy the file into the ``Nasal`` directory in `$FG_ROOT`_ (see also :ref:`Setting environment variable $FG_ROOT <chapter-set-fgroot-label>`).
Then open ``elev.nas`` in a text editor. Change the ``in`` variable as well as the ``out`` variable to a directory with write access (e.g. $FG_HOME/Export). See IORules_ and `$FG_HOME`_.
......
......@@ -19,20 +19,22 @@ If you followed the :ref:`directory structure <chapter-creating-directory-struct
.. _chapter-copy-textures-label:
=============
Copy Textures
=============
=====================================
Copy Textures, Effects and Other Data
=====================================
If you are using ``buildings.py`` to generate buildings or ``roads.py`` to generate roads, then you need to have the content of the ``tex`` linked from ``osm2city-data`` copied or linked into all scenery sub-folders, where there are ``*.stg`` files. There are two possibilities:
#. Do it manually. In this case you can choose whether to create links or hard copies. If you want to distribute the generated scenery objects, then you must copy the whole directory. E.g. ``/home/pingu/fg_customscenery/LSZS/Objects/e000n40/e009n46/tex`` in the example used previously.
#. Use ``copy_texture_stuff.py`` to do it automatically. E.g.
#. Use ``copy_data_stuff.py`` to do it automatically. E.g.
::
/usr/bin/python3 /home/pingu/development/osm2city/copy_texture_stuff.py -f LSZS/params.ini
/usr/bin/python3 /home/pingu/development/osm2city/copy_data_stuff.py -f LSZS/params.ini
There is also a third possibility of copying the ``tex`` directory into ``$FG_ROOT``. However you would not be able to distribute thegenerated scenery objects and it might interfer with other scenery objects using a potentially different texture map.
If ``copy_data_stuff.py`` is called with the optional ``-a`` argument, then also the effects and shaders in directory ``fgdata`` in ``osm2city-data`` are copied to ``$FG_ROOT``. This is necessary if you set parameter ``TRAFFIC_SHADER_ENABLE`` to ``True`` (see chapter :ref:`Light Effects <chapter-parameters-light>`).
There is also a third possibility of copying the ``tex`` directory into ``$FG_ROOT``. However you would not be able to distribute the generated scenery objects and it might interfere with other scenery objects using a potentially different texture map.
.. _chapter-lod-label:
......@@ -93,7 +95,7 @@ In the same dialog press the ``Shader Options`` button and set the slider for ``
Change Materials to Hide Urban Textures
=======================================
FlightGear allows to change the texture used for a given land-class. 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 (because urban textures interfere visually with ways, houses etc.). A drawback of using different textures is the absence of trees — however in many regions of the world there are lot of trees / vegetation in urban areas.
FlightGear allows to change the texture used for a given land-class. More information is available in ``$FG_ROOT/Docs/README.materials`` as well as in the FlightGear Forum thread regarding `New Regional Textures <http://forum.flightgear.org/viewtopic.php?f=5&t=26031>`_. 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 (because urban textures interfere visually with ways, houses etc.). A drawback of using different textures is the absence of trees — however in many regions of the world there are lot of trees / vegetation in urban areas.
E.g. for the airport ``LSZS`` in Engadin 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).
......@@ -131,8 +133,6 @@ Depending on your region and your shader settings you might want to search for e
.. 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
......
var get_elevation = func {
#Set via prepare_elev.py
setprop("/osm2city/tiles", 0);
var in = "WILL_BE_SET_BY_PREPARE_ELEV.PY";
var out = "WILL_BE_SET_BY_PREPARE_ELEV.PY";
print( "Checking if tile is loaded");
var lat = getprop("/position/latitude-deg");
var lon = getprop("/position/longitude-deg");
# var info = geodinfo(lat, lon);
print( "Position " ~ getprop("/position/latitude-deg") ~ " " ~ getprop("/position/longitude-deg") );
# if (info != nil) {
# print("the terrain under the aircraft is at elevation ", info[0], " m");
# if (info[1] != nil)
# print("and it is ", info[1].solid ? "solid ground" : "covered by water");
# }
# else {
# print( "Info is nil! Tile not loaded." );
# }
print( "Reading File " ~ in);
var raw_str = io.readfile(in);
var delimitter = "\r\n";
var line = 0;
print( "Splitting File " ~ in);
if (-1 == find(delimitter, raw_str)) delimitter = "\n";
var raw_list = split(delimitter, raw_str);
raw_str = nil;
var allLines = size(raw_list);
print("Read " ~ allLines ~ " records");
var file_out = io.open(out ~ "elev.out", "w");
var header = subvec(raw_list, 0, 1);
print("Writing " ~ allLines ~ " records");
var record = 0;
foreach(var l; raw_list) {
line = line + 1;
var l_list = split(" ", l);
setprop("/osm2city/record", record);
record = record + 1;
if (size(l_list) == 4) {
var terrain_elev = geo.elevation(l_list[1], l_list[0]);
var elev_str = sprintf("%.3f", (terrain_elev));
# print( l_list[0] ~" "~ l_list[1] ~" "~ l_list[2] ~" "~ l_list[3] ~" "~ elev_str);
io.write(file_out, l_list[0] ~" "~ l_list[1] ~" "~ l_list[2] ~" "~ l_list[3] ~" "~ elev_str ~"\n");
} else {
io.write(file_out, l ~"\n");
}
}
# io.write(file_out, "-- END -- ");
io.close(file_out);
print("Wrote " ~ allLines ~ " records");
raw_list = nil;
setprop("/osm2city/tiles", 1);
print("Signalled Success");
}
var get_threaded = func {
thread.newthread(get_elevation);
}
# Make accessible from Telnet
addcommand("get-elevation", get_threaded);
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>Effects/road-high</name>
<inherits-from>Effects/road</inherits-from>
<parameters>
<speed-factor>1.2</speed-factor>
<base-density>3.0</base-density>
</parameters>
</PropertyList>
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>Effects/road-low</name>
<inherits-from>Effects/road</inherits-from>
<parameters>
<speed-factor>0.3</speed-factor>
<base-density>0.2</base-density>
</parameters>
</PropertyList>
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>Effects/road-mid</name>
<inherits-from>Effects/road</inherits-from>
<parameters>
<speed-factor>0.8</speed-factor>
<base-density>0.25</base-density>
</parameters>
</PropertyList>
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>Effects/road</name>
<inherits-from>Effects/terrain-default</inherits-from>
<parameters>
<!-- <texture n="0">
<image>Textures/Terrain/asphalt.png</image>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>-->
<texture n="1">
<image>Textures/Terrain/road_light.png</image>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<!-- <texture n="3">
<image>Textures/Water/water_sine_nmap.png</image>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>-->
<!--<texture n="4">
<image>Textures/Water/water-reflection-grey.png</image>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<texture n="5">
<image>Textures/Water/sea_foam.png</image>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<texture n="6">
<image>Textures/Water/perlin-noise-nm.png</image>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>-->
<speed-factor>
<use>/sim/rendering/shaders/road/speed</use>
</speed-factor>
<base-density>
<use>/sim/rendering/shaders/road/density</use>
</base-density>
<!--<saturation>
<use>/rendering/scene/saturation</use>
</saturation>
<status>
<use>/environment/config/enabled</use>
</status>
<overcast>
<use>/rendering/scene/overcast</use>
</overcast>
<cloud-cover n="0">
<use>/environment/clouds/layer[0]/coverage-type</use>
</cloud-cover>
<cloud-cover n="1">
<use>/environment/clouds/layer[1]/coverage-type</use>
</cloud-cover>
<cloud-cover n="2" >
<use>/environment/clouds/layer[2]/coverage-type</use>
</cloud-cover>
<cloud-cover n="3">
<use>/environment/clouds/layer[3]/coverage-type</use>
</cloud-cover>
<cloud-cover n="4">
<use>/environment/clouds/layer[4]/coverage-type</use>
</cloud-cover>
<windE>
<use>/environment/sea/surface/wind-from-east-fps</use>
</windE>
<windN>
<use>/environment/sea/surface/wind-from-north-fps</use>
</windN>
<WaveFreq>
<use>/environment/wave/freq</use>
</WaveFreq>
<WaveAmp>
<use>/environment/wave/amp</use>
</WaveAmp>
<WaveSharp>
<use>/environment/wave/sharp</use>
</WaveSharp>
<WaveAngle>
<use>/environment/wave/angle</use>
</WaveAngle>
<WaveFactor>
<use>/environment/wave/factor</use>
</WaveFactor>
<WaveDAngle>
<use>/environment/wave/dangle</use>
</WaveDAngle>
-->
<!-- fog include -->
<visibility>
<use>/environment/ground-visibility-m</use>
</visibility>
<avisibility>
<use>/environment/visibility-m</use>
</avisibility>
<lthickness>
<use>/environment/ground-haze-thickness-m</use>
</lthickness>
<scattering>
<use>/rendering/scene/scattering</use>
</scattering>
<ground_scattering>
<use>/environment/surface/scattering</use>
</ground_scattering>
<terminator>
<use>/environment/terminator-relative-position-m</use>
</terminator>
<terrain_alt>
<use>/environment/mean-terrain-elevation-m</use>
</terrain_alt>
<overcast>
<use>/rendering/scene/overcast</use>
</overcast>
<eye_alt>
<use>/sim/rendering/eye-altitude-m</use>
</eye_alt>
<fogtype>
<use>/sim/rendering/shaders/skydome</use>
</fogtype>
<!-- sea colors -->
<!--<sea_r>
<use>/environment/sea/color_r</use>
</sea_r>
<sea_g>
<use>/environment/sea/color_g</use>
</sea_g>
<sea_b>
<use>/environment/sea/color_b</use>
</sea_b> -->
<!-- END fog include -->
</parameters>
<generate>
<tangent type="int">6</tangent>
<binormal type="int">7</binormal>
</generate>
<!--<technique n="8">
<predicate>
<and>
<property>/sim/rendering/shaders/generic</property>
<property>/sim/rendering/rembrandt/enabled</property>
<or>
<less-equal>
<value type="float">2.0</value>
<glversion/>
</less-equal>
<and>
<extension-supported>GL_ARB_shader_objects</extension-supported>
<extension-supported>GL_ARB_shading_language_100</extension-supported>
<extension-supported>GL_ARB_vertex_shader</extension-supported>
<extension-supported>GL_ARB_fragment_shader</extension-supported>
</and>
</or>
</and>
</predicate>
<pass>
<material>
<ambient>
<use>material/ambient</use>
</ambient>
<diffuse>
<use>material/diffuse</use>
</diffuse>
<specular>
<use>material/specular</use>
</specular>
<emissive>
<use>material/emissive</use>
</emissive>
<shininess>
<use>material/shininess</use>
</shininess>
<color-mode>ambient-and-diffuse</color-mode>
</material>
<blend>
<use>transparent</use>
</blend>
<alpha-test>
<use>transparent</use>
</alpha-test>
<shade-model>smooth</shade-model>
<cull-face>back</cull-face>
<render-bin>
<bin-number>
<use>render-bin/bin-number</use>
</bin-number>
<bin-name>
<use>render-bin/bin-name</use>
</bin-name>
</render-bin>
<texture-unit>
<unit>0</unit>
<image>
<use>texture[0]/image</use>
</image>
<filter>
<use>texture[0]/filter</use>
</filter>
<wrap-s>
<use>texture[0]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[0]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[0]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>2</unit>
<image>
<use>texture[2]/image</use>
</image>
<filter>
<use>texture[2]/filter</use>
</filter>
<wrap-s>
<use>texture[2]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[2]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[2]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>3</unit>
<image>
<use>texture[3]/image</use>
</image>
<filter>
<use>texture[3]/filter</use>
</filter>
<wrap-s>
<use>texture[3]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[3]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[3]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>4</unit>
<image>
<use>texture[4]/image</use>
</image>
<filter>
<use>texture[4]/filter</use>
</filter>
<wrap-s>
<use>texture[4]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[4]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[4]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>5</unit>