<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Thorsten</id>
	<title>FlightGear wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Thorsten"/>
	<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/Special:Contributions/Thorsten"/>
	<updated>2026-04-30T04:58:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116187</id>
		<title>ALS technical notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116187"/>
		<updated>2018-09-12T07:03:57Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* The display effect */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Quality level mapping ==&lt;br /&gt;
The rendering quality of ALS effects is controlled by two main sliders, the landmass effects and transition effects. The transition effects slider regulates the quality of overlaid textured, while the landmass effects slider regulates all other aspects of procedural texturing, such as pixel color post-processing (dust, snow or wet terrain effects) and apparent terrain roughness (bump and parallax mapping).&lt;br /&gt;
&lt;br /&gt;
In addition, specific effects for certain terrain types (water, urban, forest, agriculture, etc.) and models in the scene can be switched on separately. In some cases, this may be needed for a consistent visual impression. For example, if a dust effect is used on the terrain, the water needs to be rendered using a separate water shader, otherwise it will appear dusty as well. Likewise, if the Rayleigh haze is used in the highest quality terrain effect, then the highest quality water effect needs to be used to see the same Rayleigh scattering effect on the water.&lt;br /&gt;
&lt;br /&gt;
For technical reasons (landmass and transition control the same shader code) the settings are sometimes mutually dependent, e.g., if the transition quality is set to level 6, it won't have any effect until the landmass quality is also set to level 6.&lt;br /&gt;
&lt;br /&gt;
=== Transition ===&lt;br /&gt;
The mapping of quality to visuals of the transition slider is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| Base texture scheme&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| Alternative hires airport keep effect&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
|&lt;br /&gt;
* Base and overlay texture, runway effect (if landmass is above level 4)&lt;br /&gt;
* Secondary lights on runway and airport keep&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| Base, overlay and hires texture&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Base, overlay, hires, detail, grain, dot and rock texture (if landmass is level 6)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Landmass ===&lt;br /&gt;
{{Note|Quality levels 1 and 2 are reserved to represent fixed pipeline rendering and the &amp;quot;default renderer&amp;quot; in an eventually merged rendering GUI. However, ALS is currently switched on per checkbox and not by quality level, and so they do not have a function.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
| ALS-rendered position-differential haze and light, moonlight&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| &lt;br /&gt;
* Procedural snow cover on terrain&lt;br /&gt;
* Procedural dust and vegetation effects&lt;br /&gt;
* Wet terrain effect with approximate reflection half vector&lt;br /&gt;
* Patchy fog distribution&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Noise bump-mapping and parallax mapping of terrain&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 6&lt;br /&gt;
| (''Requires transition effect level 6'')&lt;br /&gt;
* Wet terrain effect with correct reflection half vector&lt;br /&gt;
* Hires bump mapping and snow patchiness&lt;br /&gt;
* Variable upper haze layer surface&lt;br /&gt;
* Rayleigh haze&lt;br /&gt;
* Secondary lights on all terrain types&lt;br /&gt;
* Slope line and strata effects&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ALS secondary lights ==&lt;br /&gt;
The ALS framework supports a generic implementation of landing lights and a searchlight which are based on a framerate-friendly computation in screen coordinates, i.e., the lights project correctly ''only if the light is close to the viewer'' (typically, that would be from cockpit view). In other words, this is not a full (and rather expensive) computation of light volumes as in Rembrandt, but a much faster test of illuminated screen areas.&lt;br /&gt;
&lt;br /&gt;
[[File:Landing light03.jpg|400px|Cessna 172P using generic ALS landing lights]]&lt;br /&gt;
&lt;br /&gt;
Two landing lights and a searchlight are supported. The landing lights have a fixed position with respect to the aircraft axis (technically, with respect to the default view axis as defined in the respective view), whereas the searchlight follows any offset of the view axis in view mode, i.e., when using the mouse to look around, the searchlight will follow the motion, the landing lights will not. The lights require ALS to run above basic quality level and work on runway and airport keep above transition setting 3 and everywhere else only at highest quality setting. All lights are controlled via properties in &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The names of the properties should be self-explanatory, if for instance if &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/use-searchlight&amp;lt;/code&amp;gt; is set to true, then the searchlight (which always follows the current view axis) is used. &lt;br /&gt;
&lt;br /&gt;
The properties &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light1-offset-deg&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light2-offset-deg&amp;lt;/code&amp;gt; allow to specify angular offsets for the landing light which are then not centered on the view axis. This can be used to simulate one or two landing lights set in the wings.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv2.jpg|400px|Secondary lights vertical offset demo]]&lt;br /&gt;
&lt;br /&gt;
A third offset &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light3-offset-deg&amp;lt;/code&amp;gt; is available which allows for a vertical offset. This is especially useful for tail dagger aircraft.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv.jpg|400px|Secondary lights vertical offset settings]]&lt;br /&gt;
&lt;br /&gt;
The lights can be switched on and off from the [[Property Browser]] for any aircraft without any modifications to the aircraft definition. Implementing them correctly aircraft side thus just involves linking the landing light switches to the ALS control properties and setting the correct angular offsets. Additionally, it is recommended to switch the lights off unless in a cockpit view, as they don't project correctly for any external view.&lt;br /&gt;
&lt;br /&gt;
Range, color, light cone opening angle or intensity of the lights can currently not be configured, and there are no plans to support such a feature in the near future.&lt;br /&gt;
&lt;br /&gt;
All three lights will illuminate fog (if dense enough) and precipitation.&lt;br /&gt;
&lt;br /&gt;
[[File:Als secondary light fog.jpg|400px|ALS generic lights illuminating dense fog]]&lt;br /&gt;
&lt;br /&gt;
== ALS specific features of the model effect ==&lt;br /&gt;
&lt;br /&gt;
In addition to the features supported by the model-combined-deferred effect in all three renderers (normal, light, specular, environment reflection and dirt map), ALS also supports a couple of unique effects (which, if configured, will not have any effect in other renderers.&lt;br /&gt;
&lt;br /&gt;
=== The grain texture  ===&lt;br /&gt;
&lt;br /&gt;
ALS supports a grain texture for models. This is a semi-transparent overlay texture that works just as [[Procedural Texturing#The grain texture|its equivalent for terrain texturing]] and provides the option of generating centimeter-scale details such as rust or discoloration on a surface without having to use huge textures. An example of a surface rendered with grain texture is the image of the USS Vinson flightdeck below:&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain01.jpg|700px|Grain and rain effects on Vinson's flightdeck]]&lt;br /&gt;
&lt;br /&gt;
This is done using the following effect declaration inheriting from '''model-combined-deferred.eff''' as&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt;flightdeck&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;inherits-from&amp;gt;Effects/model-combined-deferred&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
  &amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;image&amp;gt;Models/Geometry/Nimitz/rust_texture.png&amp;lt;/image&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt; &lt;br /&gt;
    &amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
    &amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
    &amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
  &amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The grain texture has the number 7 and needs to be enabled by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the value is set to 1, the grain texture uses the uv-mapping of the underlying surface. If that is very irregular (as in the case of the Vinson flightdeck), alternatively the grain can be mapped in xy-model coordinates if the parameter is set to 2, the uv-mapping of the base texture layer is then discarded.&lt;br /&gt;
&lt;br /&gt;
The resolution of the grain texture with respect to the base coordinate layer is specified by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the number is less than 0, the grain resolution is lower than the base layer. If the parameter is greater than 0, it is higher (note that in the above case, the grain is mapped to (xy) rather than (uv), hence the base size is 1 m, so the grain texture is mapped on a 10x10 m patch on the flightdeck, for which a 1024x1024 pixel texture provides ~1 cm sized details).&lt;br /&gt;
&lt;br /&gt;
=== The rain effect ===&lt;br /&gt;
&lt;br /&gt;
Any number greater than 0 passed to&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
enables the splash effect of raindrops on the surface if it points upward. The surface does not have to be flat for this to work, the effect checks for the surface normal automatically, see the rain enabled for the Citation Bravo.&lt;br /&gt;
&lt;br /&gt;
Thorsten noted about rain splashes: &amp;quot;Works fine here - runway needs to get really wet though before you see them (put the environment slider to max to achieve this quickly, it will take some waiting with just rain on).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain02.jpg|700px|Rain effect on the Citation Bravo]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Glossy surfaces ===&lt;br /&gt;
&lt;br /&gt;
To better treat the environment reflections on a glossy surface, ALS contains two options not present in the other renderers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-type type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/reflection-type&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter can currently be set to 1 or 2 and regulates how the color of the environment reflection is merged with the color of the glossy surface. If set to 1, the shader uses a color mixing as in the other two renderers, if set to 2 it uses a technique called 'grain merge' which gives different weight to the color channels. The reason for introducing type 2 was a grey tint which changed the reflected color in a unrealistic way. With FlightGear 2017.2.0 this will be fixed and  type set to 2 should be obsolete then.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-fresnel-factor type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/reflection-fresnel-factor&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter regulates how strong the Fresnel term of a glossy surface is. Many smooth surfaces reflect much more under shallow angles such that an environment reflection is not very prominent when looking under 90 degrees but dominates the visuals when looking under a grazing angle. The parameter sets the relative strength of a Fresnel reflection with respect to the basic reflection definition which is assumed to hold for vertical viewing (i.e. setting the parameter to 0.8 gives you extra glossiness under shallow angles).&lt;br /&gt;
&lt;br /&gt;
The following comparison shows the default color mixing (upper left) for a reflecting white livery and for grain merge (upper right). In addition, note the enhanced Fresnel reflectivity at the tail and the cowling on the pictures. The lower row shows (left) full reflection with default color mixing and (right) for grain merge. Default color mixing is more physically correct, while grain merge is less correct but preserves white color much better.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model default2.jpg|400px|Effect of color mixing in a reflection]]&lt;br /&gt;
[[File:Reflect Grain merge2.jpg|400px|Effect of grain merge in reflection]]&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model Default Full.jpg|400px|Full reflection with default ]]&lt;br /&gt;
[[File:Reflect Grain Merge Full.jpg|400px|Full reflection with grain merge]]&lt;br /&gt;
&lt;br /&gt;
== The exhaust flame effect ==&lt;br /&gt;
&lt;br /&gt;
Rendering proper flames of e.g. afterburners or rocket thrusters with diffuse edges is notoriously difficult - all solutions based on textured models tend to have unnaturally sharp edges. Usually the particle system is used in such cases, however at high velocities this has other issues - particles become easily separated, making flames look disrupted and detached from the exhaust.&lt;br /&gt;
&lt;br /&gt;
ALS includes a dedicated procedural effect in which the flame is rendered by numerically integrating a 3-dim distribution of glowing emitters inside a bounding box (i.e. re-creates the process by which a real flame would be seen). The function which determines the emitter distribution is partially user-controlled so that a wide range of shapes can be generated.&lt;br /&gt;
&lt;br /&gt;
To use the effect, first the bounding box has to be defined. Note that the shape and alignment of the bounding box needs to be standardized for the effect to work, i.e. you need to use either the default bounding box under Aircraft/Generic/Effects/Thruster/ or make a custom one which fits inside the default box at the same location in model coordinates.&lt;br /&gt;
&lt;br /&gt;
To change position, size and orientation of the bounding box to match with the airplane model, translate, scale and rotate animations or model offsets can later be used.&lt;br /&gt;
&lt;br /&gt;
=== Model definition for effect ===&lt;br /&gt;
This is a standard XML model definition that needs to specify the geometry, all animations and the effect to use. For the geometry you can use the standard ''Aircraft/Generic/Effects/Thruster/thrust_flame.ac'' or make your own. The F-15 uses a slightly different 3D model to allow for the nozzles. The 3D model needs to be big enough to contain the flame, bearing in mind that the flame is drawn as a cylinder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;path&amp;gt;Aircraft/Generic/Effects/Thruster/thrust_flame.ac&amp;lt;/path&amp;gt;&lt;br /&gt;
    &amp;lt;nopreview/&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;scale&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;property alias=&amp;quot;/params/augmentation-alight&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;x-min&amp;gt;0.2&amp;lt;/x-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-min&amp;gt;0.3&amp;lt;/y-min&amp;gt;&lt;br /&gt;
        &amp;lt;z-min&amp;gt;0.3&amp;lt;/z-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-max&amp;gt;1&amp;lt;/y-max&amp;gt;&lt;br /&gt;
        &amp;lt;z-max&amp;gt;1&amp;lt;/z-max&amp;gt;&lt;br /&gt;
        &amp;lt;x-factor&amp;gt;0.472&amp;lt;/x-factor&amp;gt;&lt;br /&gt;
        &amp;lt;y-factor&amp;gt;0.6&amp;lt;/y-factor&amp;gt;&lt;br /&gt;
        &amp;lt;z-factor&amp;gt;0.6&amp;lt;/z-factor&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- on the F-15 we have a property available that controls the ignition of the afterburner. If you do not wish to implement this&lt;br /&gt;
         remove the following animation tag --&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
        &amp;lt;condition&amp;gt;&lt;br /&gt;
            &amp;lt;greater-than&amp;gt;&lt;br /&gt;
                &amp;lt;property alias=&amp;quot;/params/augmentation-ignition&amp;quot;/&amp;gt;&lt;br /&gt;
                &amp;lt;value&amp;gt;0.8&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/greater-than&amp;gt;&lt;br /&gt;
        &amp;lt;/condition&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Aircraft/MyAircraft/Models/Effects/my-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''my-flame.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control how the flame looks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;AB-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
        &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;0.85&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.07&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.15&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.35&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
        &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
        &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
        &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
        &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a detailed version (utilizing 3d noise and a higher sampling resolution) available. This has to be explicitly requested in a derived effect by overriding the default shader choice with the detailed version, i.e. bu inserting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;technique n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;pass&amp;gt;&lt;br /&gt;
     &amp;lt;program&amp;gt;&lt;br /&gt;
         &amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/thrustflame-ALS-detailed.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
     &amp;lt;/program&amp;gt;&lt;br /&gt;
  &amp;lt;/pass&amp;gt;&lt;br /&gt;
  &amp;lt;/technique&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
below the parameter section.&lt;br /&gt;
&lt;br /&gt;
{{Note|The detailed shader uses four times as much performance at least - only use it if you really need it!}}&lt;br /&gt;
&lt;br /&gt;
=== F-15 Afterburner example image === &lt;br /&gt;
The F-15 afterburner flame shown below (at different ambient lighting based on time) uses the parameters above. The main parameters of importance, and therefore to tune, for an aircraft jet engine are the colors, the two densities, the flame radius fraction. The base density is at the start of the flame and this. The F-15 overlays a billboarded image to achieve the diamonds that are interleaved with the ALS drawn flame. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:F-15 afterburner using ALS Thrust Effect.jpg|700px|This shows the F-15 afterburner at different ambient light.]]&lt;br /&gt;
&lt;br /&gt;
The meaning of the parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_shocks&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; and &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_noise&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; are the parameters that control the random noise and the shock diamonds. Both are modestly computationally expensive, i.e. if these effects are not required it is better to switch them off by setting these values to zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(same for the (g,b) channels) set the color. base_flame refers to the part of the flame which is directly attached to the thruster and usually brightest. flame_color_high refers to the high density part of the flame, flame_color_low refers to the low density parts of the flame. (rgb) values always need to be [0:1]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
   &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determine the overall emitter density in the flame and in the base directly at the thruster respectively. There's no formal upper limit for the parameters, but a flame with density 1 already appears fairly opaque.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
governs how much of the bounding box the flame radius at the exhaust nozzle fills. If the flame needs to expand (as for the plume of a thruster operating in vacuum) or needs to bend (as for a flame deflected by the airstream) this parameter needs to be small, if the flame is essentially cylindrical the paramater can be chosen close to 1 to minimize clipping errors. Note that this determines the size of the flame relative to the bounding box - the overall size of the flame should be adjusted by using a scale animation on the bounding box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determined how turbulent the flame looks. noise_strength [0:1] determines how prominently the noise influences the flame and noise_scale (in meters relative to the original bounding box) determines how large the visible patches of turbulence are (given that the original bounding box is not larger than 5 m in the longest direction, the parameter should probably kept between 0.1 and 5).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
influences at what distance shock diamonds appear in the flame. Useful values are perhaps between 0.2 and 5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should take a value of between 0 and 1 and determines how collimated the flame is. For values &amp;gt; 0, the flame is widened - note that this requires a sufficiently small flame radius fraction to avoid clipping errors. For widened flames, the density is automatically lowered and shock diamonds are removed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0.&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be somewhere between 0 and 0.06 and gives a lateral deflection (such as by an airstream) to the flame. Note that this re-positions the origin of the flame in the bounding box to better utilize the bounding box volume, i.e. if you need a dynamical deflection, you also need a translate animation for the bounding box.&lt;br /&gt;
&lt;br /&gt;
Any of those parameters can be adjusted runtime  by replacing the value with &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use&amp;gt;/my-property&amp;lt;/use&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;. Dependent on how &amp;lt;code&amp;gt;/my-property&amp;lt;/code&amp;gt; is created it might be tied though (in particular JSBSim-computed properties are) in which case it is not picked up by the effect framework - you need to copy it via property rule to an untied property then. This allows to render dynamical changes of the flame.&lt;br /&gt;
&lt;br /&gt;
For instance the [[SpaceShuttle - Project Overview|Space Shuttle]] main engines use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;ssme-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r&amp;gt;0.9&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g&amp;gt;0.7&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b&amp;gt;0.5&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r&amp;gt;0.7&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g&amp;gt;0.7&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-collimation&amp;lt;/use&amp;gt;&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-density&amp;lt;/use&amp;gt;&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength&amp;gt;0.3&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale&amp;gt;0.1&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to simulate the change of flame geometry in the thin upper atmosphere during ascent:&lt;br /&gt;
&lt;br /&gt;
[[File:Shuttle flame05.jpg|400px|Space Shuttle main engine flames during early ascent]]&lt;br /&gt;
[[File:Shuttle flame06.jpg|400px|Space Shuttle main engine flames during late ascent]]&lt;br /&gt;
&lt;br /&gt;
Using the deflection parameter, the curved SRB separation motor flames are rendered using&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;SRBsep-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.55&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;-0.06&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flame_sep.jpg|700px|Space Shuttle SRB separation motor flames]]&lt;br /&gt;
&lt;br /&gt;
Application of the effect is not limited to flames, it can also do heat blur (think a very transparent, high-noise dark emitter distribution) or vapour trails and other smoke.&lt;br /&gt;
&lt;br /&gt;
By itself, the effect does however not compute ambient and diffuse light channels, i.e. for non-emissive distributions lighting is the responsibility of the user. One quick way of obtaining a correct fading of color with light in the scene is to create an untied property based on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/rendering/scene/diffuse/red&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and used this to scale all color values.&lt;br /&gt;
&lt;br /&gt;
{{note|Do not use the full (rgb) information in the property tree for ALS, it will produce pronounced color mismatches with the rest of the scene as ALS determines light inside the shader and never uses the properties.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rotor wash ==&lt;br /&gt;
&lt;br /&gt;
ALS provides an interface to render rotor wash on various terrain types - currently this is implemented for the volumetric grass as well as procedural water. This interface needs to be written aircraft-side for the effect to be rendered.&lt;br /&gt;
&lt;br /&gt;
[[File:Rotor wash.jpg|600px|Rotor wash rendered on volumetric grass]]&lt;br /&gt;
&lt;br /&gt;
Aircraft maintainers need to set three parameters in &amp;lt;b&amp;gt;/environment/aircraft-effects/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The position of the downwash column needs to be specified in &amp;lt;i&amp;gt;eye-relative&amp;lt;/i&amp;gt; coordinates by setting &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-x&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-y&amp;lt;/b&amp;gt;. If these are zero, the air column is assumed to be right underneath the eye point, any non-zero values displace the center northward or eastward from the eye point. To work in external views, the displacement needs to be computed by e.g. a Nasal script or property rules, the same is true if the rotor is not close to the eye point.&lt;br /&gt;
&lt;br /&gt;
The strength of the downwash column &amp;lt;i&amp;gt;on the ground&amp;lt;/i&amp;gt; is set by &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-strength&amp;lt;/b&amp;gt;. The parameter influences both the radius in which the effect is visible as well as the overall strength (up to a maximum). Aircraft maintainers need to adjust strength based on parameters like altitude AGL, rotor RPM, rotor radius and whatever else might influence the downwash.&lt;br /&gt;
&lt;br /&gt;
== Chute animation effect ==&lt;br /&gt;
&lt;br /&gt;
The chute animation effect is designed to provide a natural appearance of the deformation and the fluttering motion of a piece of cloth under changing stress.&lt;br /&gt;
&lt;br /&gt;
[[File:Chute seq01.jpg|400px|Drag chute separation sequence 1]] [[File:Chute seq03.jpg|400px|Drag chute separation sequence 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coordinate system ===&lt;br /&gt;
&lt;br /&gt;
The shader assumes that the 3d mesh of the chute is oriented in a particular coordinate system. The z-axis (upward) should extend from the zero point where the various ropes come together to the canopy above through the center of the model. The canopy of the chute should therefore roughly be in the xy plane.&lt;br /&gt;
&lt;br /&gt;
To position the chute correctly with the aircraft, you then need to use appropriate offsets and rotations when loading.&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''mychute.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control the behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;mychute&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/chute&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
	&amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	&amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The meaning of these parameters is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the distance of the branching point of the various lines leading to the canopy (at model coordinate zero) to the edge of the canopy. All transformations affecting the shape of the canopy (in particular the collapse of the canopy if the force is gone) will be applied with respect to this reference plane.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a normalized force applied to the canopy. The chute should be modeled with a deformation corresponding to a force parameter of 1 - any higher value will narrow the chute's radius, deepen the chute's deformation along the z-axis and increase the motion, any lower value will widen chute radius (compare screenshots above) and lessen its depth and slow down motion. The normal parameter range should be from [0:2], any higher or lower may look odd.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	 &amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are deformation modes used to animate a chute after jettison when it is no longer pulled into shape and can flutter through the air. The first one [0:1] is a general collapse into the projection plane with random deformations around, the second one [-1:1] is a gross bending mode of the projection plane itself. Before jettison, these parameters should default to 0.&lt;br /&gt;
&lt;br /&gt;
=== Jettison animation ===&lt;br /&gt;
&lt;br /&gt;
A complete animated jettison sequence is quite complex and would usually require a Nasal sequence taking the chute through a deceleration trajectory (utilizing translation and rotation animations), bending ad folding oscillations and finally some unfolding as it sinks through the air. The Space Shuttle chute uses the following control loop for 10 seconds of jettison dynamics:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var drag_chute_jettison_animation = func (time) {&lt;br /&gt;
&lt;br /&gt;
var dt = getprop(&amp;quot;/sim/time/delta-sec&amp;quot;);&lt;br /&gt;
time = time + dt;&lt;br /&gt;
&lt;br /&gt;
# horizontal motion&lt;br /&gt;
&lt;br /&gt;
var x = 0.0;&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 2.0)&lt;br /&gt;
	{x = -16.0 + 20.0 * time;}&lt;br /&gt;
else&lt;br /&gt;
	{x = 2.0 * time + 5.0 * time * time;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-dist&amp;quot;,x);&lt;br /&gt;
&lt;br /&gt;
# vertical motion&lt;br /&gt;
&lt;br /&gt;
var y = 0.0;&lt;br /&gt;
if (time &amp;gt; 5.0)&lt;br /&gt;
	{&lt;br /&gt;
	y = -2.5 + 0.6 * (time-5.0) * (time-5.0);&lt;br /&gt;
	}&lt;br /&gt;
else 	&lt;br /&gt;
	{&lt;br /&gt;
	y = -0.2 * time;&lt;br /&gt;
	}&lt;br /&gt;
if (y &amp;gt; 12.5) {y=12.5;}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-down&amp;quot;,y);&lt;br /&gt;
&lt;br /&gt;
# fold&lt;br /&gt;
&lt;br /&gt;
var f = 0.5 * time;&lt;br /&gt;
if (f&amp;gt; 1.0) {f = 1.0;}&lt;br /&gt;
if (time &amp;gt; 9.5)&lt;br /&gt;
	{f = 0.25 + 1.5 + (time-9.5);}&lt;br /&gt;
if (time &amp;gt; 6.0)&lt;br /&gt;
	{&lt;br /&gt;
 	f = f -0.3* (time-7.0); &lt;br /&gt;
	if (f&amp;lt;0.1) {f=0.1;}&lt;br /&gt;
	}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-fold&amp;quot;, f);&lt;br /&gt;
&lt;br /&gt;
# rotate&lt;br /&gt;
&lt;br /&gt;
var r = (time - 2.0) * 18.0;&lt;br /&gt;
if (r&amp;gt;90.0) {r=90.0;}&lt;br /&gt;
if (r&amp;lt;0.0) {r=0.0;}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-slant&amp;quot;, r);&lt;br /&gt;
&lt;br /&gt;
# bend&lt;br /&gt;
&lt;br /&gt;
var b = 0;&lt;br /&gt;
if (time &amp;gt; 7.5)&lt;br /&gt;
	{b = 0;}&lt;br /&gt;
else if (time &amp;gt;6.0)&lt;br /&gt;
	{b = 0.75 - 0.5 * (time - 6.0);} &lt;br /&gt;
else if (time &amp;gt; 4.5) &lt;br /&gt;
	{b = (time - 4.5) * 0.5;}&lt;br /&gt;
else {b=0;}	&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-bend&amp;quot;, b);&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 10.0) &lt;br /&gt;
	{&lt;br /&gt;
	print(&amp;quot;Exiting...&amp;quot;);&lt;br /&gt;
	settimer (func { setprop(&amp;quot;/controls/shuttle/drag-chute-deploy-timer&amp;quot;, 0); }, 0.5);&lt;br /&gt;
	return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/test/timer&amp;quot;, time);&lt;br /&gt;
&lt;br /&gt;
settimer( func{ drag_chute_jettison_animation (time); }, 0);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS glass effect ==&lt;br /&gt;
&lt;br /&gt;
As of FlightGear version 3.5, ALS supports a glass effect with dynamic response to the environment which can render, for instance, the splashes of raindrops on the canopy, frost or fogging.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass01.jpg|400px|Frost effect]]&lt;br /&gt;
[[File:Glass07.jpg|400px|Raindrop splashes]]&lt;br /&gt;
&lt;br /&gt;
The base effect properties are controlled via inheritance and the environment response run-time via properties residing in &amp;lt;b&amp;gt;/environment/aircraft-effects&amp;lt;/b&amp;gt;. Derived effects should inherit from &amp;lt;b&amp;gt;Effects/glass&amp;lt;/b&amp;gt;. Any surface using the glass effect will automatically register itself as transparent for use in [[Project Rembrandt| Rembrandt]]. &lt;br /&gt;
&lt;br /&gt;
The glass effect is primarily intended for interior views. In particular, no external fog or haze is rendered for the glass, i.e. if the effect is used in an outside view, it is the responsibility of the aircraft modeler to take care (e.g. with LOD settings or range animations) that no problems in bad visibility occur.&lt;br /&gt;
&lt;br /&gt;
=== Why a separate effect for glass seen from inside? ===&lt;br /&gt;
&lt;br /&gt;
Basically because the two situations are rather different. Slight dirt on the glass against the background of the sky from inside is rather prominent, against the background of the cockpit seen from outside it is not. Visuals from inside are dominated by Mie forward scattering of light, leading to a bright glare effect when looking at dirt, frost, fog or scratches close to the sun. From outside, reflected light rather than transmitted light is dominant. The reflection of any external object on the outside of the glass changes as the aircraft moves, this is not the case for the reflection of the cockpit in the glass seen from the inside. &lt;br /&gt;
&lt;br /&gt;
The viewing situation is also different. From the inside, we usually do not focus the eyes on the plane of the glass but look through it, from the outside the focus of the eyes is often close to the glass surface. For something half a meter before the eye, we also need to apply a lot more resolution and details than for an object typically seen from 10+ meters from the outside.&lt;br /&gt;
&lt;br /&gt;
Add to this that atmospheric fog is never relevant for glass seen from inside but for glass seen from outside, and it suddenly makes sense to use a different effect.&lt;br /&gt;
&lt;br /&gt;
The recommended effect for glass surfaces seen from outside is model-combined-transparent.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rain ===&lt;br /&gt;
Rain splashes will render automatically when the weather system reports rain via environment/rain-norm. In addition, the user can set rain splashes to render via &amp;lt;code&amp;gt;environment/aircraft-effects/ground-splash-norm&amp;lt;/code&amp;gt; (this is intended to allow splashes to be rendered e.g., for water landings of aircraft equipped with floats).&lt;br /&gt;
&lt;br /&gt;
By default, the rain splashes impact from above (more precisely the +z direction in model coordinates). This may be inadequate if the aircraft is moving. However, the shader can not know what the airstream at the glass will be, so the impact vector of rain splashes has to be modeled aircraft-side and set via &amp;lt;code&amp;gt;environment/aircraft-effects/splash-vector-x&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;splash-vector-y&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;splash-vector-z&amp;lt;/code&amp;gt;). These are likewise in model coordinates.&lt;br /&gt;
&lt;br /&gt;
As long as the length of the splash vector is less than 1, just the impact angle will change, as the length of the vector increases to 2, droplets will also be visibly moving. This allows fine control of the visuals dependent on any number of factors desired. A simple Nasal snipped varying the splash vector with airspeed for the F-16 is given below (but ''do not mindlessly copy and expect to work for any aircraft — it won't!''). This example is for normals pointing outwards, if the normals are pointing inwards the vector needs to be inverted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var splash_vec_loop = func(){&lt;br /&gt;
    var airspeed = getprop(&amp;quot;/velocities/airspeed-kt&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    # f16&lt;br /&gt;
    var airspeed_max = 120;&lt;br /&gt;
&lt;br /&gt;
    if (airspeed &amp;gt; airspeed_max) {&lt;br /&gt;
        airspeed = airspeed_max;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    airspeed = math.sqrt(airspeed / airspeed_max);&lt;br /&gt;
&lt;br /&gt;
    var splash_x = -0.1 - 2 * airspeed;&lt;br /&gt;
    var splash_y = 0.0;&lt;br /&gt;
    var splash_z = 1.0 - 1.35 * airspeed;&lt;br /&gt;
&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-x&amp;quot;, splash_x);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-y&amp;quot;, splash_y);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-z&amp;quot;, splash_z);&lt;br /&gt;
&lt;br /&gt;
    settimer(func(){&lt;br /&gt;
        splash_vec_loop();&lt;br /&gt;
    }, 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the timing constant of the loop — running the update per-frame leads to a spurious movement of the coordinate system in which rain is rendered and spoils the effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another method when using JSBSIM would be to use a combination of FCS Functions and Filters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashX&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashx&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashY&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashZ&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashz&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could reduce the above method and eliminate the &amp;quot;filters&amp;quot; by doing the following.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/airspeed-clamped-sqrt&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;  &lt;br /&gt;
                &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;min&amp;gt;&lt;br /&gt;
                            &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                            &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;/min&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashy&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
               &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yet another method (currently used in the c172p) limits movement to a range of table entries. This gives the developer the ability to control the behavior even more.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xa&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.7  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -2.1  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-za&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.17 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.35 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.3  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.9  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-zr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.127 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.29  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;0&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-x&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-y&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-z&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Frost and fogging ===&lt;br /&gt;
&lt;br /&gt;
Frost on the canopy is rendered when environment/aircraft-effects/frost-level is set in the range from 0 to 1. Again, it is up to the aircraft developer to decide at what exterior conditions frosting should happen and whether the aircraft is equipped with heating to remove the frost again.&lt;br /&gt;
&lt;br /&gt;
Fogging is controlled by environment/aircraft-effects/fog-level in the range 0 to 1. Unless a mask is used, fogging is homogeneous across the whole surface (it is really intended to be used with a mask).&lt;br /&gt;
&lt;br /&gt;
=== Tint ===&lt;br /&gt;
&lt;br /&gt;
Tinted glass can be easily created by changing &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;glass-tint type=&amp;quot;vec4d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 1.0&amp;lt;/glass-tint&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to any value desired. This will affect all effects assumed outside of the glass layer (frost and rain splashes) but not fogging inside the glass. Use primarily for development and quick tests, don't misuse the alpha value available here, it has odd side effects.&lt;br /&gt;
&lt;br /&gt;
=== Functional masks ===&lt;br /&gt;
&lt;br /&gt;
If the glass surface is uv-mapped and textured, it is possible to switch on a mask functionality in the inheritance via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;image&amp;gt;my_mask.png&amp;lt;/image&amp;gt;&lt;br /&gt;
	&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
	&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
	&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;use-mask type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-mask&amp;gt;&lt;br /&gt;
&amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The red channel in my_mask.png controls the strength of fogging, full red corresponds to maximal fogging, no red to zero fogging. This allows to selectively model the position of heaters in the cockpit. Use &amp;lt;b&amp;gt;/environment/aircraft-effects/fog-level&amp;lt;/b&amp;gt; to adjust the actual amount of fog runtime.&lt;br /&gt;
&lt;br /&gt;
The green channel of my_mask.png is the amount of reduction of rain in an area. This is intended for airplanes equipped with windshield wipers to partially clear the wiped area of the rain. Whether the windshield wiper is actually on or not is controlled runtime via &amp;lt;b&amp;gt;/environent/aircraft-effects/use-wipers&amp;lt;/b&amp;gt; (1 sets wipers to on).&lt;br /&gt;
&lt;br /&gt;
The blue channel of my_mask.png is reserved for an overlay pattern which will be drawn in an optionally specified &amp;lt;overlay-color&amp;gt; vector (white in the example xml above) - the primary function is to render damage on the glass, but with a different color, also dirt or an alternative more finely controlled frost pattern can be used. The strength of the pattern can be adjusted runtime via &amp;lt;b&amp;gt;/environment/aircraft-effects/overlay-alpha&amp;lt;/b&amp;gt;, allowing dynamical accumulation of dirt or sudden appearance of damage.&lt;br /&gt;
&lt;br /&gt;
Examples for the result of a fog mask and a damage mask are shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Glass12.jpg|400px|Crack pattern using a damage mask]]&lt;br /&gt;
[[File:Glass11.jpg|400px|Partial fogging using a mask texture]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note that by default all the runtime switches for the mask are off / set to zero! Remember to to switch them on when testing the effect!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mie scattering ===&lt;br /&gt;
&lt;br /&gt;
Most glass effects show prominent Mie forward scattering as in reality, i.e. frost patterns or fogging will appear much more prominent when looking almost towards the sun than under any other angle. While the frost pattern is normally not very prominent and one is able to look through unhindered, this changes substantially when looking into the sun, at which point it almost obscures the view.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass08.jpg|400px|Mie scattering of low light on frost]]&lt;br /&gt;
[[File:Glass13.jpg|400px|Morning sun Mie scattering on fog]]&lt;br /&gt;
&lt;br /&gt;
For frost and fog, the strength of the effect is set automatically, but for the damage/dirt layer it is under user control at effect design time. Changing the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;overlay-glare type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/overlay-glare&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from its default value allows to adjust the strength of the glare when looking through the overlay layer close to the sun.&lt;br /&gt;
&lt;br /&gt;
=== Internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
There is support for a reflection of the cockpit interior.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect.jpg|640px|Internal glass cube map reflection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This needs to be provided as a cubemap specific for the airplane and switched on via the flag &amp;lt;use-reflection&amp;gt; set to 1. The relative strength of the reflection can be optionally via &amp;lt;reflection-strength&amp;gt;. The strength of the reflection in the cockpit is dynamically adjusted for a number of factors, among them balance of direct to indirect light, the approximate amount of light falling on the surface seen in the reflection and the amount of direct sunlight falling into the eye.&lt;br /&gt;
&lt;br /&gt;
If the six cubemap faces are called my_cube_map_??.png, then using an effect file called c172p-reflect.eff the inheritance looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-reflect&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/glass&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;images&amp;gt;&lt;br /&gt;
        &amp;lt;positive-x&amp;gt;my_cube_map_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
        &amp;lt;negative-x&amp;gt;my_cube_map_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
        &amp;lt;positive-y&amp;gt;my_cube_map_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
        &amp;lt;negative-y&amp;gt;my_cube_map_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
        &amp;lt;positive-z&amp;gt;my_cube_map_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
        &amp;lt;negative-z&amp;gt;my_cube_map_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
        &amp;lt;/images&amp;gt;&lt;br /&gt;
    &amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;use-reflection type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection&amp;gt;&lt;br /&gt;
    &amp;lt;reflection-strength type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/reflection-strength&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The inheritance call includes all surface objects that use the effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-reflect&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;glas&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;rightwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;leftwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See below (Interior shading), for details on cube_map creation and orientation.&lt;br /&gt;
&lt;br /&gt;
=== Lightmaps for internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
If the cockpit is illuminated at night, the reflection map will not show this change by default. However,the glass effect supports a lightmap for the reflection, which can be used in parallel with the lightmap for the panels to show the reflection of a lit panel at night.&lt;br /&gt;
&lt;br /&gt;
Since the reflection map is a cube map, the lightmap for it has to be as well, the syntax is hence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use-reflection-lightmap type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection-lightmap&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
     &amp;lt;images&amp;gt;&lt;br /&gt;
          &amp;lt;positive-x&amp;gt;Models/Effects/interior/reflection/light-px.png&amp;lt;/positive-x&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-x&amp;gt;Models/Effects/interior/reflection/light-nx.png&amp;lt;/negative-x&amp;gt;   &lt;br /&gt;
          &amp;lt;positive-y&amp;gt;Models/Effects/interior/reflection/light-py.png&amp;lt;/positive-y&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-y&amp;gt;Models/Effects/interior/reflection/light-ny.png&amp;lt;/negative-y&amp;gt;    &lt;br /&gt;
          &amp;lt;positive-z&amp;gt;Models/Effects/interior/reflection/light-pz.png&amp;lt;/positive-z&amp;gt;      &lt;br /&gt;
          &amp;lt;negative-z&amp;gt;Models/Effects/interior/reflection/light-nz.png&amp;lt;/negative-z&amp;gt;      &lt;br /&gt;
      &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The control parameters of the lightmap otherwise parallel those of the [[Model-combined_effect]] or the model interior effect described below, i.e. up to four channels can be independently specified on the lightmap.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
By default, rain and frost are mapped to the shape of the canopy using coordinate systems that adapts to the splash vector and the canopy shape. This requires no particular action aircraft-side except to provide the bare geometry of a canopy/windshield, but may not be satisfactory in all instances - in particular for near vertical cockpit side windows the scheme does poorly.&lt;br /&gt;
&lt;br /&gt;
There are two alternative coordinate maps available in this case, controlled by the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;surface-mapping-scheme type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/surface-mapping-scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 1, the uv-mapping of the surface is used (it has to exist of course). For this to work properly, the uv-mapping needs to be sufficiently regular and roughly preserve the mapped area.&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 2, a local orthonormal system based on the normals of the surface is constructed. This no longer takes the splash vector consistently into account  and works poorly for surfaces which are flat in the (xy)-plane, but gives decent result for side windows.&lt;br /&gt;
&lt;br /&gt;
== The HUD effect ==&lt;br /&gt;
&lt;br /&gt;
The HUD effect is a variant of the glass effect designed to render the visuals of a head-up display (HUD) closer to real life. This only works if the HUD is custom-created via [[Canvas]], not via the native FG HUD mechanism as the latter by-passes the effect framework.&lt;br /&gt;
&lt;br /&gt;
The effect takes the same configuration options as the glass effect (i.e. it can render frost, damage, scratches, glare,...) but in addition it runs a blur over the HUD image and alters the color distribution of the projected symbols to de-saturate the bright parts in the center. The result looks less monochromatic and more like light projected onto a surface (left: bare canvas right: HUD effect)&lt;br /&gt;
&lt;br /&gt;
[[File:HUD effect.jpg|800px|Comparison between a bare canvas HUD (left) and the ALS HUD shader run over it (right)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
The effect is used from the model file by assigning it to the surface that also carries the canvas texture of the HUD via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Effects/hud&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;HUDImage&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should usually work out of the box, but if the HUD brightness should be changeable or the glass properties adjusted, a derived effect needs to be created.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
In addition to the parameters supported by the glass shader (which, for instance in the case of rain splashes, may or may not be appropriate for a HUD, this is left at user's discretion), the HUD effect takes the following special parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;brightness&amp;gt;1.0&amp;lt;/brightness&amp;gt;&lt;br /&gt;
   &amp;lt;sample-res&amp;gt;0.0006&amp;lt;/sample-res&amp;gt;&lt;br /&gt;
   &amp;lt;sample-far&amp;gt;2.5&amp;lt;/sample-far&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first one is the relative brightness setting of the HUD (which should equal the alpha value assigned to the canvas image of the symbols). This parameter is used to de-saturate colors in the symbol centers.&lt;br /&gt;
&lt;br /&gt;
Remaining two parameters represent the size and shape of the blur Kernel being used. The sample resolution (sample-res) determines the overall size of the blur region, the farthest sample (sample-far) how far out the tails of the blur region extend.&lt;br /&gt;
&lt;br /&gt;
Note: The number of sampling steps is not computed adaptive to these parameters, if the steps get too coarse, then multiple image echoes instead of a proper blur will be generated - adjust these parameters with care (if at all).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The display effect ==&lt;br /&gt;
&lt;br /&gt;
Like the HUD effect, the display effect augments the visuals of a canvas, but in this case it simulates the effects on a multi-function display in cockpit, i.e. emissive light from a dark background.&lt;br /&gt;
&lt;br /&gt;
For that reason, the effect takes the same set of configuration parameters as the [[#The ALS interior model effect|interior model effect]], i.e. it can be supplied for instance with an opacity map.&lt;br /&gt;
&lt;br /&gt;
The expected and tested structure of the effect is that the display content is rendered on a canvas with transparent background color which in turn is above a different, dark-colored surface which stands for the display background. The best visuals are achieved when aircraft-internal shadows are rendered via opacity map on the dark surface and the corresponding contrast effects to the transparent canvas.&lt;br /&gt;
&lt;br /&gt;
Currently the effect does three major things:&lt;br /&gt;
&lt;br /&gt;
* at low light, it can make overly bright displays look slightly blurry and difficult to read as well as de-saturate the colors. This simulates the effects of a too-bright display on the eye and should prompt the user to dim the display.&lt;br /&gt;
&lt;br /&gt;
[[File:Display effect03.jpg|640px|Display effect: blur at low light (left)]]&lt;br /&gt;
&lt;br /&gt;
* at strong direct light, the effect can extinct the display content if it is set too dim. This should prompt the user to increase display brightness&lt;br /&gt;
&lt;br /&gt;
[[File:Display effect04.jpg|640px|Display effect: extinction at strong illumination]]&lt;br /&gt;
&lt;br /&gt;
* finally, if glancing light falls onto the display, the effect can render dust. Note that unlike normal diffuse lighting, the dust appears really strongest when the light almost hits the display from the side.&lt;br /&gt;
&lt;br /&gt;
[[File:Display shader dust.jpg|640px|Display effect: dust]]&lt;br /&gt;
&lt;br /&gt;
* in addition to that, the effect contains the same grain map the interior model effect offers. This can be used e.g. to superimpose a pixel raster (to simulate a CRT screen) or to dim the edges of the display as compared to the center as desired.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
The effect is used from the model file by assigning it to the surface that also carries the canvas texture of the display via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Effects/model-interior-display&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;DisplayImage&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If brightness changes of the display need to be simulated, the aircraft needs to pass parameters to the effect, so usually a derived effect would be created and assigned instead of the base effect in the example above.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
The effect can be configured with all the parameters of the model interior effect, most useful of those is likely the opacity map.&lt;br /&gt;
&lt;br /&gt;
As specifically new parameters, the following set is used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  	&amp;lt;texture n=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
			&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
			&amp;lt;image&amp;gt;Aircraft/Generic/Effects/dust-effect-overlay.png&amp;lt;/image&amp;gt;&lt;br /&gt;
	&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;sample-res&amp;gt;0.0007&amp;lt;/sample-res&amp;gt;&lt;br /&gt;
	&amp;lt;dirt-factor&amp;gt;3.0&amp;lt;/dirt-factor&amp;gt;&lt;br /&gt;
	&amp;lt;contrast&amp;gt;1.0&amp;lt;/contrast&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The supplied texture is the image of the dust layer that is shown. The default image is reasonable to show a dirty screen, but it can be changed into a user-supplied image.&lt;br /&gt;
&lt;br /&gt;
The first parameter is the sampling scale of the blur kernel (see the HUD effect). It describes how blurry the display will appear when overbright in a dark scene. For too large values, the finite number of samples will become very apparent, so this needs to be adjusted with care.&lt;br /&gt;
&lt;br /&gt;
The second parameter describes how pronounced the dirt layer appears - it is a multiplier to the alpha value of the dust texture. For the default texture, values in the range [0:3] are appropriate.&lt;br /&gt;
&lt;br /&gt;
The contrast parameter finally needs to be set by a model of the current mean light level in the cockpit (this is not just the ambient scene light, as there may be cockpit lights, instrument lights etc.) A contrast value of 0 means that the display is on the dim side with respect to the overall light level, a value of 2 means that it is set much to bright and will appear blurry and discolored.&lt;br /&gt;
&lt;br /&gt;
Conversely, a very low contrast value leads to display content extinction if direct light falls onto the display (this needs an opacity map for best effect and queries the texel color values, so the screen brightness should be set up by changing the surface emissivity for this to work correctly).&lt;br /&gt;
&lt;br /&gt;
Dependent on how the lighting inside the cockpit is modeled, it's the aircraft maintainer's responsibility to determine a good contrast value, FG does not have a good model of light inside a cockpit and eye adaption level.&lt;br /&gt;
&lt;br /&gt;
== The ALS interior model effect  ==&lt;br /&gt;
&lt;br /&gt;
Since the interior of a cockpit is a large part of what a pilot gets to see in-flight, but this interior represents a rather special situation (light is reduced as it falls through windows, it may have artificial light, there is never any fog or haze,...) ALS offers a separate effect to specifically render the interior of a plane.&lt;br /&gt;
&lt;br /&gt;
This effect also includes optional features which will be available at higher quality settings of the model shader.&lt;br /&gt;
&lt;br /&gt;
=== Interior shadows and tinted glass effect ===&lt;br /&gt;
&lt;br /&gt;
With FlightGear version 3.5 and above, ALS now supports interior shading; i.e. the sun shining through the windows and casting shadows on the panel.&lt;br /&gt;
&lt;br /&gt;
[[File:interior01.jpg|640px|Interior shading effect]]&lt;br /&gt;
&lt;br /&gt;
This effect is based on an opacity map - a cube map of textures which tells the renderer where the cockpit is transparent and where not. The opacity map has to be created beforehand, which allows to make it quite detailed. In this map, white stands for a completely transparent surface, black for an opaque surface, colors for tinted glass which will create a colored light spot in the cockpit, grey hues for partial shadowing allowing to paint dirt effects onto the windows, and caustics can be drawn using the alpha channel: (1-alpha) will be used as an enhancement of the light at a certain spot.&lt;br /&gt;
&lt;br /&gt;
The effect is typically declared as derived by inheritance using an effect file such as c172-interior.eff which looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior-glass&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
	  &amp;lt;images&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-x&amp;gt;Models/Effects/interior/clr_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-x&amp;gt;Models/Effects/interior/clr_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-y&amp;gt;Models/Effects/interior/clr_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-y&amp;gt;Models/Effects/interior/clr_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-z&amp;gt;Models/Effects/interior/clr_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-z&amp;gt;Models/Effects/interior/clr_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
	  &amp;lt;/images&amp;gt;&lt;br /&gt;
	&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-center type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 0.5 0.0 0.3&amp;lt;/opacity-cube-center&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-scale type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.5 0.5 0.7&amp;lt;/opacity-cube-scale&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-angle type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/opacity-cube-angle&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is called by inheritance in the model.xml file.&lt;br /&gt;
&lt;br /&gt;
Imagine the opacity map as a box surrounding the cockpit and trying to closely follow its contours. The origin in the box needs to be placed into the center of the cockpit, which is what &amp;lt;b&amp;gt;&amp;lt;opacity-cube-center&amp;gt;&amp;lt;/b&amp;gt; does. Each of the three dimensions then needs to be stretched to roughly fit the layout of the canopy, this is done by &amp;lt;b&amp;gt;&amp;lt;opacity-cube-scale&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If opacity map center and scale are wrong, you will still see shadows, but they won't match the real cockpit layout (the lightspot of a window will be seen displaced and at a different size of the real window). Thus, carefully measuring the best box layout in a 3d tool is moderately important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aircraft-side the effect is called as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;PilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;CopilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;panel_1_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;InstrumentCover.001&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Panel_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Throttle&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Mixture&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Pedestal&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;TrimWheel&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;ParkingBrake&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;BackSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;FuelSelectorFace&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each object that you want the shadow effect to fall on must be included in the inheritance.&lt;br /&gt;
&lt;br /&gt;
Unless you supply a path, the cube_.png's need to reside in the same directory as the model.xml where you added the &amp;lt;effect&amp;gt; tag pair that calls c172-interior.eff, not where you put the aircraft_interior.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The orientation of the faces of each cube have to be adjusted based on the positive and negative axis of the model.&lt;br /&gt;
&lt;br /&gt;
For example, using the c172p model as a reference.&lt;br /&gt;
&lt;br /&gt;
The tail, right wing and top on the model are positive inside Blender. So the cube faces are laid out as follows.&lt;br /&gt;
&lt;br /&gt;
Note: Depending on the image's orientation when photographed the rotation direction will vary. This is assuming the images are being taken from the center of the cockpit looking out. Using compass headings to describe how to rotate the images.&lt;br /&gt;
&lt;br /&gt;
px (tail) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nx (nose) rotate 90 deg from N or S to E&lt;br /&gt;
&lt;br /&gt;
py (starboard/right) from N do not rotate&lt;br /&gt;
&lt;br /&gt;
ny (port/left) from N rotate 180 deg to S&lt;br /&gt;
&lt;br /&gt;
pz (top) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nz (bottom) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
[[File:C172p-cube.jpg|640px|Cube map layout of the c172p]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With Blender, it's pretty easy to create the cubemap.&lt;br /&gt;
&lt;br /&gt;
1. Add a camera where the cubemap will be. Set the FOV to 90 degrees.&lt;br /&gt;
2. Set the resolution to 1024x1024 (or any other square, power-of-two size).&lt;br /&gt;
3. Hide all lights and windows; disable ambient lighting (set it to black) and turn off ambient occlusion.&lt;br /&gt;
4. Set the world color to white.&lt;br /&gt;
5. Enable the compositor and add an invert node.&lt;br /&gt;
6. Render and save the six views as you would normally.&lt;br /&gt;
7. Add dirt, tinted glass color and caustics by hand&lt;br /&gt;
&lt;br /&gt;
This process depends on the model setup but it should work for most aircraft with a few tweaks.&lt;br /&gt;
&lt;br /&gt;
==== Cubemap Kit for Blender ====&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-shadow-blender-instructions.png|320px|How to make an interior cubemap with the cubemap kit]]&lt;br /&gt;
&lt;br /&gt;
See [http://chateau-logic.com/content/flightgear-interior-shadow-cubemap-kit flightgear-interior-shadow-cubemap-kit] for a premade kit to create the cubemap and the .eff sample file to use it.&lt;br /&gt;
&lt;br /&gt;
==== Important Notes ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Currently (May 2015) the effect does not deal gracefully with child models included into the main model with offsets and/or rotations because these introduce a different coordinate system in which the shadow does not match. The general idea of a code solution is known, but not implemented. Right now this can only be addressed by explicitly positioning child models in the *.ac file and not using any offsets when including them.&lt;br /&gt;
&lt;br /&gt;
=== ALS flashlight ===&lt;br /&gt;
&lt;br /&gt;
This effect is meant to imitate a hand held flashlight for use in getting instruments in the cockpit turned on in dark conditions.&lt;br /&gt;
It is almost identical in nature to ALS searchlight only it is applied using interior-model.eff.&lt;br /&gt;
It has two user defined light color filters that can be applied and also a user defined light radius setting.&lt;br /&gt;
&lt;br /&gt;
[[File:ALS flashlight.jpg|600px|ALS flashlight effect]]&lt;br /&gt;
&lt;br /&gt;
To implement this effect use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
A full definition looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-one type=&amp;quot;vec3d&amp;quot;&amp;gt;0.5 0.5 0.5&amp;lt;/light-filter-one&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-two type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.2 0.2&amp;lt;/light-filter-two&amp;gt;&lt;br /&gt;
	&amp;lt;light-radius type=&amp;quot;float&amp;quot;&amp;gt;13&amp;lt;/light-radius&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the example above light-filter-one is soft white light and light-filter-two is a soft red light.&lt;br /&gt;
&lt;br /&gt;
After defining as above you can turn it on using the following property&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 1 is light-filter-one&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 2 is light-filter-two&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The flashlight effect inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
At lowest quality level, the effect supports an implicit lightmap, i.e. a color range of the basic texture can be selected and declared to act as a lightmap. This is specifically useful to render panel backlighting as in the example below:&lt;br /&gt;
&lt;br /&gt;
[[File:Ilightmap.jpg|600px|An implicit lightmap used to simulate a backlit panel]]&lt;br /&gt;
&lt;br /&gt;
The effect is off by default and switched on by setting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/implicit-lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following parameters are available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-tag-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-tag-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the base color to be tagged, i.e. if the panel labels to be illuminated at night are white, the color needs to be set to white.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-low type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/implicit-lightmap-threshold-low&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-high type=&amp;quot;float&amp;quot;&amp;gt;1.5&amp;lt;/implicit-lightmap-threshold-high&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The thresholds determine how similar a color may be to the base color in order to be still illuminated. The measure is the Euklidean distance of the color vectors. The lower thresholds determines when illumination will start to fade, the higher threshold at what distance in color space illumination will no longer take place. The thresholds have to be adapted to the specific situation - the technique works best for high-contrast panels (white labels on black background) and may not work at all for low contrast panels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-emit-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-emit-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The emit color specifies at which color the pixel will show if it is tagged (see above) and the implicit lightmap is on (see below) - set this to the color of the backlight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-intensity type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/implicit-lightmap-intensity&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the intensity determines how brightly the illuminated pixel will shine.&lt;br /&gt;
&lt;br /&gt;
Ambiance lighting can be simulated with the following tags.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-r type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-r&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-g type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-g&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-g&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-b type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-b&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example note the use of the &amp;quot;use&amp;quot; tag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be any defined property or static value.&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The implicit lightmap inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Irradiance maps ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In the simplest rendering schemes, diffuse and specular light are assumed to be highly directional (i.e. it illuminates lit surfaces only) while ambient light is taken to be omnidirectional.&lt;br /&gt;
&lt;br /&gt;
In reality, that is hardly ever true. In a typical outside location, ambient light is mainly coming from the sky above (which is why the ground underneath a car is dark even in the absence of directional light when the sky is overcast and the sun is not visible). In an enclosed space (like a room, or an aircraft cockpit), ambient light has to fall through the windows, i.e. is mainly not coming above but falling in horizontally.&lt;br /&gt;
&lt;br /&gt;
The directional dependence is not very strong though, yet it leaves measurable effects. In rendering, this can be accounted for by irradiance maps. In the following, the interior of the C-172p is rendered in the first case using omnidirectional ambient light, in the second case using an irradiance map giving the ambient light the directionality of the cabin windows, i.e. the light falls in predominantly horizontally (in addition, a grain map is superimposed to provide structure). Note how the spatial structure of the roof, looking bland when rendered in omnidirectional light is brought out by the irradiance map.&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-irradiance01.jpg|400px|C-172p cabin interior rendered without irradiance and grain map]]&lt;br /&gt;
[[File:Als-interior-irradiance02.jpg|400px|C-172p cabin interior rendered with irradiance and grain map]]&lt;br /&gt;
&lt;br /&gt;
Irradiance mapping is configured by the following parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-type type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/irradiance-map-type&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-strength type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/irradiance-map-strength&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several pre-configured irradiance map functions which can be chosen by map type. &lt;br /&gt;
&lt;br /&gt;
0: (default) omndirectional light&lt;br /&gt;
1: light predominantly coming from above (most appropriate for fighter cockpits)&lt;br /&gt;
2: light predominantly coming from the horizon (most appropriate for GA aircraft)&lt;br /&gt;
&lt;br /&gt;
The strength of the irradiance map regulates how pronounced the asymmetry of the map will be. A strength of zero always makes the light omnidirectional, whereas a strength of 1 implies that no light is coming from any direction 90 degree to the main direction (i.e. for the option 2, a strength of 1.0 means that no ambient light will fall in from above or below and that hence horizontal surfaces will appear pitch black unless direct light falls on them)&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The irradiance map inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Explicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In addition to the implicit lightmap, it is also possible to explicitly specify a lightmap. The syntax for this exactly parallels the syntax of the [[Model-combined_effect]] which supplies lightmaps for the exterior.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/MyAircraft/Effects/my_lightmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-multi type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/lightmap-multi&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-factor type=&amp;quot;float&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0&amp;lt;/lightmap-factor&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 &amp;lt;/lightmap-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a single channel lightmap in which pixel color times the lightmap color provides the illumination. Using the multi-channel function, up to four different maps can be specified in which the (rgba) values of a pixel encode where the light falls and the associated lightmap color what color the illumination takes. Each of these maps can be switched on and off or dimmed in intensity independently.&lt;br /&gt;
&lt;br /&gt;
=== Grain map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
The grain map sets a repeating hires overlay texture which can supply a very credible illusion of structure to a surface for cheap. The syntax exactly parallels that of the [[Model-combined_effect]] ALS grain feature described above.&lt;br /&gt;
&lt;br /&gt;
For instance, the following&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/Effects/MyGrainmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;10&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a grain overlay with a 10-time higher resolution over the base texture layer.&lt;br /&gt;
&lt;br /&gt;
== ALS procedural lights ==&lt;br /&gt;
&lt;br /&gt;
The ALS framework supports procedurally generated lights (for instance aircraft position lights, strobe lights,... ) for aircraft and models. Note that the effect produces the visuals of the lights themselves, but they do not illuminate their surroundings.&lt;br /&gt;
&lt;br /&gt;
=== Why procedural lights? ===&lt;br /&gt;
&lt;br /&gt;
Traditionally aircraft position lights have been implemented as billboarded emissive textures. This technique is limited in scope, as it has difficulty producing a directional light or changes in the light appearance (for instance glare) with changed scene lighting. The ALS procedural lights are designed to give visuals consistent with the auto-generated scene lights (runway lighting, street lights) and support configurable directionality, glare and even the illumination of fog by the lights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic implementation ===&lt;br /&gt;
&lt;br /&gt;
The base of the light is a texture quad which has Effects/procedural-light.eff assigned. Start from including the template provided into your model as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;model&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;/Models/Effects/procedural_light.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
        &amp;lt;offsets&amp;gt;&lt;br /&gt;
            &amp;lt;x-m&amp;gt; 0 &amp;lt;/x-m&amp;gt;&lt;br /&gt;
            &amp;lt;y-m&amp;gt; 0 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
            &amp;lt;z-m&amp;gt; 2 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
        &amp;lt;/offsets&amp;gt;&lt;br /&gt;
 &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and configure from there according to your own needs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not billboard the light via animation!&amp;lt;/b&amp;gt; The GLSL code will take care of the billboarding. Use a scale animation to change the size of the light, do not change the quad (the *.ac) itself in size, the shader code requires its geometry to be fixed.&lt;br /&gt;
&lt;br /&gt;
The lights are currently not supported in the default or Rembrandt renderer and will simply be invisible in these frameworks.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the light ===&lt;br /&gt;
&lt;br /&gt;
Make your own derived effect inheriting from Effects/procedural-light.eff and assign it in the xml wrapper of the light.&lt;br /&gt;
&lt;br /&gt;
====The base light color set====&lt;br /&gt;
&lt;br /&gt;
The base light color can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These take the normal set of values ranging from 0 to 1. &lt;br /&gt;
&lt;br /&gt;
====Light full intensity in the center====&lt;br /&gt;
&lt;br /&gt;
Now the light appears at full intensity in the center can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea behind this is that lights give a better visual appearance if their center is rendered visually brighter and de-saturated, but this occurs only if the light is at full intensity.&lt;br /&gt;
&lt;br /&gt;
There are no sanity checks done, you can assign any center color you like even if this makes no sense - you can change center color or darken it, so use with care.&lt;br /&gt;
&lt;br /&gt;
====Runtime change the light intensity====&lt;br /&gt;
&lt;br /&gt;
To runtime change the light intensity, assign&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to a property and change that property in the range from 0 to 1. Eg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;intensity_scale&amp;gt;&lt;br /&gt;
       &amp;lt;use&amp;gt;/rendering/nav-lights-factor&amp;lt;/use&amp;gt;&lt;br /&gt;
     &amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Set directional lights====&lt;br /&gt;
&lt;br /&gt;
For directional lights, you need to assign a pointing vector in aircraft coordinates into which the light cone points and set the directionality flag to true to activate the computations. This is done via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;-1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
    &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It would be customary to pass a normalized vector, but if you don't know how to do it, the shader will do it for you. By assigning properties to the pointing coordinates, the light direction can be changed runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not use a rotation animation to change the light direction - it won't work.&amp;lt;/b&amp;gt; Make the pointing vector properties and change them to your needs.&lt;br /&gt;
&lt;br /&gt;
====Fading of a directional light====&lt;br /&gt;
[[File:Directional light.jpg|thumb|Explanation of a light radiation pattern]]&lt;br /&gt;
The fading of a directional light away from the pointing axis is controlled by passing angles (or rather sines of angles).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
    &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Up to inner_angle, the light will have full intensity. From inner to outer angle the light will linearly fade to outer_gain. From outer angle to zero angle, the light intensity will linearly fade to zero.&lt;br /&gt;
&lt;br /&gt;
====Strobe effect====&lt;br /&gt;
&lt;br /&gt;
For get an automatic strobe effect you can set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to true. If you want your own strobe pattern, generate a strobe function and use &amp;lt;b&amp;gt;intensity_scale&amp;lt;/b&amp;gt; instead to pass it to the shader.&lt;br /&gt;
&lt;br /&gt;
=== Complete example ===&lt;br /&gt;
&lt;br /&gt;
Here's the left nav light of the C-172p:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;name&amp;gt;procedural-light-nav-left&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/procedural-light&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.000&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
        &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Arc is 110 deg, is 55 deg per side, giving 35 deg from wing --&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.7002075382097097&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
        &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Angles are 0.0 at 0 deg from pointing direction, 1.0 at&lt;br /&gt;
             90/-90 deg, and 0.0 at 180/-180 deg.&lt;br /&gt;
&lt;br /&gt;
             For left navigation light we use -0/-35 .. +110/+145 for&lt;br /&gt;
             the inner/outer range. This gives an arc of 110/180 deg,&lt;br /&gt;
             or 55/90 deg from center.&lt;br /&gt;
&lt;br /&gt;
             Value = sin(angle in degrees)&lt;br /&gt;
&lt;br /&gt;
             0.8191520442889918 = 55 deg (* 2 = 110 deg inner angle)&lt;br /&gt;
             1.0000 = 90 deg (* 2 = 180 deg outer angle)&lt;br /&gt;
        --&amp;gt;&lt;br /&gt;
        &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.8191520442889918&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
        &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.982547593563&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
The Cessna 182 by Heiko Schulz and Gilberto Agostinho with procedural lights activated:&amp;lt;br&amp;gt;&lt;br /&gt;
:''(To percieve the effect well, you probably have to darken your room and switch to fullscreen)''&lt;br /&gt;
[[File:Cessna 182 with procedural lights.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
===Move dynamically the procedural light===&lt;br /&gt;
&lt;br /&gt;
The position of a procedural light is declared in the '''&amp;lt;model&amp;gt;''' section, within the '''&amp;lt;PropertyList&amp;gt;''' XML code, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;procedural-light-gear-white-left&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;path&amp;gt;Effects/lights/procedural_light_gear_white.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
      &amp;lt;offsets&amp;gt;&lt;br /&gt;
          &amp;lt;x-m&amp;gt; -3.08&amp;lt;/x-m&amp;gt;&lt;br /&gt;
          &amp;lt;y-m&amp;gt; -0.21 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
          &amp;lt;z-m&amp;gt; -1.18 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
      &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tag ''procedural-light-gear-white-left'' is very important because is the object name. This name will be used as the reference object.&amp;lt;BR&amp;gt;Next, we can define an animation in the same xml file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;GearFrontalDoor&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;gear/gear/position-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;axis&amp;gt;&lt;br /&gt;
          &amp;lt;x1-m&amp;gt;  -3.00240&amp;lt;/x1-m&amp;gt;&lt;br /&gt;
          &amp;lt;y1-m&amp;gt;  1.0&amp;lt;/y1-m&amp;gt;&lt;br /&gt;
          &amp;lt;z1-m&amp;gt;  -1.02906&amp;lt;/z1-m&amp;gt;&lt;br /&gt;
          &amp;lt;x2-m&amp;gt;  -3.00240&amp;lt;/x2-m&amp;gt;&lt;br /&gt;
          &amp;lt;y2-m&amp;gt;  -1.0&amp;lt;/y2-m&amp;gt;&lt;br /&gt;
          &amp;lt;z2-m&amp;gt;  -1.0290&amp;lt;/z2-m&amp;gt;&lt;br /&gt;
      &amp;lt;/axis&amp;gt;&lt;br /&gt;
      &amp;lt;interpolation&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.25&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.50&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;60&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.75&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;30&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;0&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
      &amp;lt;/interpolation&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''procedural light'' object code is this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS fuselage shadow effect ==&lt;br /&gt;
ALS supports the manipulation of a (simplified) ground shadow. This effect uses an existing simplified shadow animation configuration and by default uses the gear-agl-m property to calculate the ground placement of that simplified shadow.&lt;br /&gt;
&lt;br /&gt;
The system, techniques for using it, and several working examples are on [https://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=24859&amp;amp;start=135 this extensive forum thread about the ALS shadow effects].&lt;br /&gt;
&lt;br /&gt;
[[File:Alsshadow.jpg|800px|ALS Shadow]]&lt;br /&gt;
&lt;br /&gt;
The effect can be applied easily in any aircraft that report the gear-agl-m property by simply adding a declaration inheriting from shadow.eff.&lt;br /&gt;
&lt;br /&gt;
If the aircraft does not support the gear-agl-m property, (notably JSBSim), you need to create a [[Autopilot configuration reference | Property Rule]] to pass a supported AGL data to the gear-agl-m property. In this case we use altitude-agl-ft converted to meters using a property rule configuration file.&lt;br /&gt;
&lt;br /&gt;
For the first example we'll use the &amp;quot;supported gear-agl-m&amp;quot; method for aircraft that don't require a property rule.&lt;br /&gt;
&lt;br /&gt;
Simply add the following inheritance declaration after you declare your shadow animation statement.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;name_of_the_shadow_object&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the non-ALS simplified shadow code you normally use a &amp;quot;translate&amp;quot; animation to position the shadow on the ground.&lt;br /&gt;
When using the ALS method you must either remove, comment out, or apply a condition to restrict its use to non ALS shadow applications, because ALS is responsible for computing the shadows ground position.&lt;br /&gt;
&lt;br /&gt;
Here is how we apply a condition to the translation to limit it effect to non-ALS application only.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A complete shadow animation block looks like this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- opaque objects --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- transparent objects --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;not&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/rembrandt/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;/not&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;noshadow&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- pitch --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/pitch-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;-1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;1&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- roll --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/roll-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;1&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For aircraft requiring a [[Autopilot configuration reference | Property Rule]] there are a couple extra steps.&lt;br /&gt;
&lt;br /&gt;
In aircraft-set.xml you add the property rule call to the &amp;quot;configuration file&amp;quot; in between the PropertyList/sim/systems tag pairs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;property-rule n=&amp;quot;101&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;gear_agl-m&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;Aircraft/c172p/Systems/gearAGL.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
&amp;lt;/property-rule&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: the n=&amp;quot;101&amp;quot; needs to be =+100 as -100 is reserved for system wide property rules.&lt;br /&gt;
In the above example 101 was used because 100 was already being used by a previous property rule definition.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;configuration file&amp;quot; normally goes in /Systems.&lt;br /&gt;
In this example we named the configuration file /Systems/gearAGL.xml.&lt;br /&gt;
&lt;br /&gt;
Here is the complete /Systems/gearAGL.xml configuration file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;filter&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;reference&amp;gt;6&amp;lt;/reference&amp;gt;&lt;br /&gt;
    &amp;lt;output&amp;gt;/position/gear-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
  &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
What the configuration file does is convert the input of altitude-agl-ft to the output of (((altitude-agl-ft)-6)*0.3048) or (convert ft-6 to m) and pass it to /position/gear-agl-m.&lt;br /&gt;
 &lt;br /&gt;
See [[Autopilot configuration reference | Input and reference properties or values &amp;lt;input&amp;gt; and &amp;lt;reference&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
== ALS 3d shadow volume effect ==&lt;br /&gt;
What might be considered the next level of realism using a relatively &amp;quot;cheap&amp;quot; shadow effect is to use a 3d volume shadow.&lt;br /&gt;
&lt;br /&gt;
[[File:Shadow vol02.jpg|800px|ALS 3d Shadow Volume]]&lt;br /&gt;
&lt;br /&gt;
The procedure to implement the ALS shadow volume is similar to the ALS-shadow above with a few modifications.&lt;br /&gt;
&lt;br /&gt;
First you have to have a 3d shadow volume model of the aircraft you are applying the effect to. This model should be a low poly model that is optimized to be as little of a footprint as possible.&lt;br /&gt;
&lt;br /&gt;
A property rule is required, same as above. This is used to generate the above ground altitude in meters, (altitude-agl-m). The &amp;quot;altitude-agl-m&amp;quot; is used to place the shadow close to the ground in real time at an FDM rate of execution.&lt;br /&gt;
{{note|Do not confuse &amp;quot;altitude-agl-m&amp;quot; with the other type of non-3d ALS-shadow property of &amp;quot;gear-agl-m&amp;quot;. The shaders involved use these two different properties respectively for the two different effect. They are not interchangeable.}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
   &amp;lt;filter&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
      &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
      &amp;lt;reference&amp;gt;1.0&amp;lt;/reference&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;/position/altitude-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The other difference from the ALS-shadow above is that it uses a different inherited effect.&lt;br /&gt;
Instead of&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
you use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow-vol&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make sure there is no duplicate 3d model shown in other renderers besides ALS it is also important to use a different select animation:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- hide 3d shadow in non ALS mode --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Procedural Texturing]]&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS infrared vision]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;br /&gt;
[[Category:ALS]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116186</id>
		<title>ALS technical notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116186"/>
		<updated>2018-09-12T06:55:51Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Quality level mapping ==&lt;br /&gt;
The rendering quality of ALS effects is controlled by two main sliders, the landmass effects and transition effects. The transition effects slider regulates the quality of overlaid textured, while the landmass effects slider regulates all other aspects of procedural texturing, such as pixel color post-processing (dust, snow or wet terrain effects) and apparent terrain roughness (bump and parallax mapping).&lt;br /&gt;
&lt;br /&gt;
In addition, specific effects for certain terrain types (water, urban, forest, agriculture, etc.) and models in the scene can be switched on separately. In some cases, this may be needed for a consistent visual impression. For example, if a dust effect is used on the terrain, the water needs to be rendered using a separate water shader, otherwise it will appear dusty as well. Likewise, if the Rayleigh haze is used in the highest quality terrain effect, then the highest quality water effect needs to be used to see the same Rayleigh scattering effect on the water.&lt;br /&gt;
&lt;br /&gt;
For technical reasons (landmass and transition control the same shader code) the settings are sometimes mutually dependent, e.g., if the transition quality is set to level 6, it won't have any effect until the landmass quality is also set to level 6.&lt;br /&gt;
&lt;br /&gt;
=== Transition ===&lt;br /&gt;
The mapping of quality to visuals of the transition slider is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| Base texture scheme&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| Alternative hires airport keep effect&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
|&lt;br /&gt;
* Base and overlay texture, runway effect (if landmass is above level 4)&lt;br /&gt;
* Secondary lights on runway and airport keep&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| Base, overlay and hires texture&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Base, overlay, hires, detail, grain, dot and rock texture (if landmass is level 6)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Landmass ===&lt;br /&gt;
{{Note|Quality levels 1 and 2 are reserved to represent fixed pipeline rendering and the &amp;quot;default renderer&amp;quot; in an eventually merged rendering GUI. However, ALS is currently switched on per checkbox and not by quality level, and so they do not have a function.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
| ALS-rendered position-differential haze and light, moonlight&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| &lt;br /&gt;
* Procedural snow cover on terrain&lt;br /&gt;
* Procedural dust and vegetation effects&lt;br /&gt;
* Wet terrain effect with approximate reflection half vector&lt;br /&gt;
* Patchy fog distribution&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Noise bump-mapping and parallax mapping of terrain&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 6&lt;br /&gt;
| (''Requires transition effect level 6'')&lt;br /&gt;
* Wet terrain effect with correct reflection half vector&lt;br /&gt;
* Hires bump mapping and snow patchiness&lt;br /&gt;
* Variable upper haze layer surface&lt;br /&gt;
* Rayleigh haze&lt;br /&gt;
* Secondary lights on all terrain types&lt;br /&gt;
* Slope line and strata effects&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ALS secondary lights ==&lt;br /&gt;
The ALS framework supports a generic implementation of landing lights and a searchlight which are based on a framerate-friendly computation in screen coordinates, i.e., the lights project correctly ''only if the light is close to the viewer'' (typically, that would be from cockpit view). In other words, this is not a full (and rather expensive) computation of light volumes as in Rembrandt, but a much faster test of illuminated screen areas.&lt;br /&gt;
&lt;br /&gt;
[[File:Landing light03.jpg|400px|Cessna 172P using generic ALS landing lights]]&lt;br /&gt;
&lt;br /&gt;
Two landing lights and a searchlight are supported. The landing lights have a fixed position with respect to the aircraft axis (technically, with respect to the default view axis as defined in the respective view), whereas the searchlight follows any offset of the view axis in view mode, i.e., when using the mouse to look around, the searchlight will follow the motion, the landing lights will not. The lights require ALS to run above basic quality level and work on runway and airport keep above transition setting 3 and everywhere else only at highest quality setting. All lights are controlled via properties in &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The names of the properties should be self-explanatory, if for instance if &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/use-searchlight&amp;lt;/code&amp;gt; is set to true, then the searchlight (which always follows the current view axis) is used. &lt;br /&gt;
&lt;br /&gt;
The properties &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light1-offset-deg&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light2-offset-deg&amp;lt;/code&amp;gt; allow to specify angular offsets for the landing light which are then not centered on the view axis. This can be used to simulate one or two landing lights set in the wings.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv2.jpg|400px|Secondary lights vertical offset demo]]&lt;br /&gt;
&lt;br /&gt;
A third offset &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light3-offset-deg&amp;lt;/code&amp;gt; is available which allows for a vertical offset. This is especially useful for tail dagger aircraft.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv.jpg|400px|Secondary lights vertical offset settings]]&lt;br /&gt;
&lt;br /&gt;
The lights can be switched on and off from the [[Property Browser]] for any aircraft without any modifications to the aircraft definition. Implementing them correctly aircraft side thus just involves linking the landing light switches to the ALS control properties and setting the correct angular offsets. Additionally, it is recommended to switch the lights off unless in a cockpit view, as they don't project correctly for any external view.&lt;br /&gt;
&lt;br /&gt;
Range, color, light cone opening angle or intensity of the lights can currently not be configured, and there are no plans to support such a feature in the near future.&lt;br /&gt;
&lt;br /&gt;
All three lights will illuminate fog (if dense enough) and precipitation.&lt;br /&gt;
&lt;br /&gt;
[[File:Als secondary light fog.jpg|400px|ALS generic lights illuminating dense fog]]&lt;br /&gt;
&lt;br /&gt;
== ALS specific features of the model effect ==&lt;br /&gt;
&lt;br /&gt;
In addition to the features supported by the model-combined-deferred effect in all three renderers (normal, light, specular, environment reflection and dirt map), ALS also supports a couple of unique effects (which, if configured, will not have any effect in other renderers.&lt;br /&gt;
&lt;br /&gt;
=== The grain texture  ===&lt;br /&gt;
&lt;br /&gt;
ALS supports a grain texture for models. This is a semi-transparent overlay texture that works just as [[Procedural Texturing#The grain texture|its equivalent for terrain texturing]] and provides the option of generating centimeter-scale details such as rust or discoloration on a surface without having to use huge textures. An example of a surface rendered with grain texture is the image of the USS Vinson flightdeck below:&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain01.jpg|700px|Grain and rain effects on Vinson's flightdeck]]&lt;br /&gt;
&lt;br /&gt;
This is done using the following effect declaration inheriting from '''model-combined-deferred.eff''' as&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt;flightdeck&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;inherits-from&amp;gt;Effects/model-combined-deferred&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
  &amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;image&amp;gt;Models/Geometry/Nimitz/rust_texture.png&amp;lt;/image&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt; &lt;br /&gt;
    &amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
    &amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
    &amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
  &amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The grain texture has the number 7 and needs to be enabled by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the value is set to 1, the grain texture uses the uv-mapping of the underlying surface. If that is very irregular (as in the case of the Vinson flightdeck), alternatively the grain can be mapped in xy-model coordinates if the parameter is set to 2, the uv-mapping of the base texture layer is then discarded.&lt;br /&gt;
&lt;br /&gt;
The resolution of the grain texture with respect to the base coordinate layer is specified by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the number is less than 0, the grain resolution is lower than the base layer. If the parameter is greater than 0, it is higher (note that in the above case, the grain is mapped to (xy) rather than (uv), hence the base size is 1 m, so the grain texture is mapped on a 10x10 m patch on the flightdeck, for which a 1024x1024 pixel texture provides ~1 cm sized details).&lt;br /&gt;
&lt;br /&gt;
=== The rain effect ===&lt;br /&gt;
&lt;br /&gt;
Any number greater than 0 passed to&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
enables the splash effect of raindrops on the surface if it points upward. The surface does not have to be flat for this to work, the effect checks for the surface normal automatically, see the rain enabled for the Citation Bravo.&lt;br /&gt;
&lt;br /&gt;
Thorsten noted about rain splashes: &amp;quot;Works fine here - runway needs to get really wet though before you see them (put the environment slider to max to achieve this quickly, it will take some waiting with just rain on).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain02.jpg|700px|Rain effect on the Citation Bravo]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Glossy surfaces ===&lt;br /&gt;
&lt;br /&gt;
To better treat the environment reflections on a glossy surface, ALS contains two options not present in the other renderers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-type type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/reflection-type&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter can currently be set to 1 or 2 and regulates how the color of the environment reflection is merged with the color of the glossy surface. If set to 1, the shader uses a color mixing as in the other two renderers, if set to 2 it uses a technique called 'grain merge' which gives different weight to the color channels. The reason for introducing type 2 was a grey tint which changed the reflected color in a unrealistic way. With FlightGear 2017.2.0 this will be fixed and  type set to 2 should be obsolete then.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-fresnel-factor type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/reflection-fresnel-factor&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter regulates how strong the Fresnel term of a glossy surface is. Many smooth surfaces reflect much more under shallow angles such that an environment reflection is not very prominent when looking under 90 degrees but dominates the visuals when looking under a grazing angle. The parameter sets the relative strength of a Fresnel reflection with respect to the basic reflection definition which is assumed to hold for vertical viewing (i.e. setting the parameter to 0.8 gives you extra glossiness under shallow angles).&lt;br /&gt;
&lt;br /&gt;
The following comparison shows the default color mixing (upper left) for a reflecting white livery and for grain merge (upper right). In addition, note the enhanced Fresnel reflectivity at the tail and the cowling on the pictures. The lower row shows (left) full reflection with default color mixing and (right) for grain merge. Default color mixing is more physically correct, while grain merge is less correct but preserves white color much better.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model default2.jpg|400px|Effect of color mixing in a reflection]]&lt;br /&gt;
[[File:Reflect Grain merge2.jpg|400px|Effect of grain merge in reflection]]&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model Default Full.jpg|400px|Full reflection with default ]]&lt;br /&gt;
[[File:Reflect Grain Merge Full.jpg|400px|Full reflection with grain merge]]&lt;br /&gt;
&lt;br /&gt;
== The exhaust flame effect ==&lt;br /&gt;
&lt;br /&gt;
Rendering proper flames of e.g. afterburners or rocket thrusters with diffuse edges is notoriously difficult - all solutions based on textured models tend to have unnaturally sharp edges. Usually the particle system is used in such cases, however at high velocities this has other issues - particles become easily separated, making flames look disrupted and detached from the exhaust.&lt;br /&gt;
&lt;br /&gt;
ALS includes a dedicated procedural effect in which the flame is rendered by numerically integrating a 3-dim distribution of glowing emitters inside a bounding box (i.e. re-creates the process by which a real flame would be seen). The function which determines the emitter distribution is partially user-controlled so that a wide range of shapes can be generated.&lt;br /&gt;
&lt;br /&gt;
To use the effect, first the bounding box has to be defined. Note that the shape and alignment of the bounding box needs to be standardized for the effect to work, i.e. you need to use either the default bounding box under Aircraft/Generic/Effects/Thruster/ or make a custom one which fits inside the default box at the same location in model coordinates.&lt;br /&gt;
&lt;br /&gt;
To change position, size and orientation of the bounding box to match with the airplane model, translate, scale and rotate animations or model offsets can later be used.&lt;br /&gt;
&lt;br /&gt;
=== Model definition for effect ===&lt;br /&gt;
This is a standard XML model definition that needs to specify the geometry, all animations and the effect to use. For the geometry you can use the standard ''Aircraft/Generic/Effects/Thruster/thrust_flame.ac'' or make your own. The F-15 uses a slightly different 3D model to allow for the nozzles. The 3D model needs to be big enough to contain the flame, bearing in mind that the flame is drawn as a cylinder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;path&amp;gt;Aircraft/Generic/Effects/Thruster/thrust_flame.ac&amp;lt;/path&amp;gt;&lt;br /&gt;
    &amp;lt;nopreview/&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;scale&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;property alias=&amp;quot;/params/augmentation-alight&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;x-min&amp;gt;0.2&amp;lt;/x-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-min&amp;gt;0.3&amp;lt;/y-min&amp;gt;&lt;br /&gt;
        &amp;lt;z-min&amp;gt;0.3&amp;lt;/z-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-max&amp;gt;1&amp;lt;/y-max&amp;gt;&lt;br /&gt;
        &amp;lt;z-max&amp;gt;1&amp;lt;/z-max&amp;gt;&lt;br /&gt;
        &amp;lt;x-factor&amp;gt;0.472&amp;lt;/x-factor&amp;gt;&lt;br /&gt;
        &amp;lt;y-factor&amp;gt;0.6&amp;lt;/y-factor&amp;gt;&lt;br /&gt;
        &amp;lt;z-factor&amp;gt;0.6&amp;lt;/z-factor&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- on the F-15 we have a property available that controls the ignition of the afterburner. If you do not wish to implement this&lt;br /&gt;
         remove the following animation tag --&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
        &amp;lt;condition&amp;gt;&lt;br /&gt;
            &amp;lt;greater-than&amp;gt;&lt;br /&gt;
                &amp;lt;property alias=&amp;quot;/params/augmentation-ignition&amp;quot;/&amp;gt;&lt;br /&gt;
                &amp;lt;value&amp;gt;0.8&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/greater-than&amp;gt;&lt;br /&gt;
        &amp;lt;/condition&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Aircraft/MyAircraft/Models/Effects/my-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''my-flame.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control how the flame looks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;AB-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
        &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;0.85&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.07&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.15&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.35&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
        &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
        &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
        &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
        &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a detailed version (utilizing 3d noise and a higher sampling resolution) available. This has to be explicitly requested in a derived effect by overriding the default shader choice with the detailed version, i.e. bu inserting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;technique n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;pass&amp;gt;&lt;br /&gt;
     &amp;lt;program&amp;gt;&lt;br /&gt;
         &amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/thrustflame-ALS-detailed.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
     &amp;lt;/program&amp;gt;&lt;br /&gt;
  &amp;lt;/pass&amp;gt;&lt;br /&gt;
  &amp;lt;/technique&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
below the parameter section.&lt;br /&gt;
&lt;br /&gt;
{{Note|The detailed shader uses four times as much performance at least - only use it if you really need it!}}&lt;br /&gt;
&lt;br /&gt;
=== F-15 Afterburner example image === &lt;br /&gt;
The F-15 afterburner flame shown below (at different ambient lighting based on time) uses the parameters above. The main parameters of importance, and therefore to tune, for an aircraft jet engine are the colors, the two densities, the flame radius fraction. The base density is at the start of the flame and this. The F-15 overlays a billboarded image to achieve the diamonds that are interleaved with the ALS drawn flame. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:F-15 afterburner using ALS Thrust Effect.jpg|700px|This shows the F-15 afterburner at different ambient light.]]&lt;br /&gt;
&lt;br /&gt;
The meaning of the parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_shocks&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; and &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_noise&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; are the parameters that control the random noise and the shock diamonds. Both are modestly computationally expensive, i.e. if these effects are not required it is better to switch them off by setting these values to zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(same for the (g,b) channels) set the color. base_flame refers to the part of the flame which is directly attached to the thruster and usually brightest. flame_color_high refers to the high density part of the flame, flame_color_low refers to the low density parts of the flame. (rgb) values always need to be [0:1]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
   &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determine the overall emitter density in the flame and in the base directly at the thruster respectively. There's no formal upper limit for the parameters, but a flame with density 1 already appears fairly opaque.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
governs how much of the bounding box the flame radius at the exhaust nozzle fills. If the flame needs to expand (as for the plume of a thruster operating in vacuum) or needs to bend (as for a flame deflected by the airstream) this parameter needs to be small, if the flame is essentially cylindrical the paramater can be chosen close to 1 to minimize clipping errors. Note that this determines the size of the flame relative to the bounding box - the overall size of the flame should be adjusted by using a scale animation on the bounding box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determined how turbulent the flame looks. noise_strength [0:1] determines how prominently the noise influences the flame and noise_scale (in meters relative to the original bounding box) determines how large the visible patches of turbulence are (given that the original bounding box is not larger than 5 m in the longest direction, the parameter should probably kept between 0.1 and 5).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
influences at what distance shock diamonds appear in the flame. Useful values are perhaps between 0.2 and 5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should take a value of between 0 and 1 and determines how collimated the flame is. For values &amp;gt; 0, the flame is widened - note that this requires a sufficiently small flame radius fraction to avoid clipping errors. For widened flames, the density is automatically lowered and shock diamonds are removed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0.&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be somewhere between 0 and 0.06 and gives a lateral deflection (such as by an airstream) to the flame. Note that this re-positions the origin of the flame in the bounding box to better utilize the bounding box volume, i.e. if you need a dynamical deflection, you also need a translate animation for the bounding box.&lt;br /&gt;
&lt;br /&gt;
Any of those parameters can be adjusted runtime  by replacing the value with &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use&amp;gt;/my-property&amp;lt;/use&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;. Dependent on how &amp;lt;code&amp;gt;/my-property&amp;lt;/code&amp;gt; is created it might be tied though (in particular JSBSim-computed properties are) in which case it is not picked up by the effect framework - you need to copy it via property rule to an untied property then. This allows to render dynamical changes of the flame.&lt;br /&gt;
&lt;br /&gt;
For instance the [[SpaceShuttle - Project Overview|Space Shuttle]] main engines use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;ssme-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r&amp;gt;0.9&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g&amp;gt;0.7&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b&amp;gt;0.5&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r&amp;gt;0.7&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g&amp;gt;0.7&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-collimation&amp;lt;/use&amp;gt;&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-density&amp;lt;/use&amp;gt;&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength&amp;gt;0.3&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale&amp;gt;0.1&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to simulate the change of flame geometry in the thin upper atmosphere during ascent:&lt;br /&gt;
&lt;br /&gt;
[[File:Shuttle flame05.jpg|400px|Space Shuttle main engine flames during early ascent]]&lt;br /&gt;
[[File:Shuttle flame06.jpg|400px|Space Shuttle main engine flames during late ascent]]&lt;br /&gt;
&lt;br /&gt;
Using the deflection parameter, the curved SRB separation motor flames are rendered using&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;SRBsep-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.55&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;-0.06&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flame_sep.jpg|700px|Space Shuttle SRB separation motor flames]]&lt;br /&gt;
&lt;br /&gt;
Application of the effect is not limited to flames, it can also do heat blur (think a very transparent, high-noise dark emitter distribution) or vapour trails and other smoke.&lt;br /&gt;
&lt;br /&gt;
By itself, the effect does however not compute ambient and diffuse light channels, i.e. for non-emissive distributions lighting is the responsibility of the user. One quick way of obtaining a correct fading of color with light in the scene is to create an untied property based on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/rendering/scene/diffuse/red&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and used this to scale all color values.&lt;br /&gt;
&lt;br /&gt;
{{note|Do not use the full (rgb) information in the property tree for ALS, it will produce pronounced color mismatches with the rest of the scene as ALS determines light inside the shader and never uses the properties.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rotor wash ==&lt;br /&gt;
&lt;br /&gt;
ALS provides an interface to render rotor wash on various terrain types - currently this is implemented for the volumetric grass as well as procedural water. This interface needs to be written aircraft-side for the effect to be rendered.&lt;br /&gt;
&lt;br /&gt;
[[File:Rotor wash.jpg|600px|Rotor wash rendered on volumetric grass]]&lt;br /&gt;
&lt;br /&gt;
Aircraft maintainers need to set three parameters in &amp;lt;b&amp;gt;/environment/aircraft-effects/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The position of the downwash column needs to be specified in &amp;lt;i&amp;gt;eye-relative&amp;lt;/i&amp;gt; coordinates by setting &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-x&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-y&amp;lt;/b&amp;gt;. If these are zero, the air column is assumed to be right underneath the eye point, any non-zero values displace the center northward or eastward from the eye point. To work in external views, the displacement needs to be computed by e.g. a Nasal script or property rules, the same is true if the rotor is not close to the eye point.&lt;br /&gt;
&lt;br /&gt;
The strength of the downwash column &amp;lt;i&amp;gt;on the ground&amp;lt;/i&amp;gt; is set by &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-strength&amp;lt;/b&amp;gt;. The parameter influences both the radius in which the effect is visible as well as the overall strength (up to a maximum). Aircraft maintainers need to adjust strength based on parameters like altitude AGL, rotor RPM, rotor radius and whatever else might influence the downwash.&lt;br /&gt;
&lt;br /&gt;
== Chute animation effect ==&lt;br /&gt;
&lt;br /&gt;
The chute animation effect is designed to provide a natural appearance of the deformation and the fluttering motion of a piece of cloth under changing stress.&lt;br /&gt;
&lt;br /&gt;
[[File:Chute seq01.jpg|400px|Drag chute separation sequence 1]] [[File:Chute seq03.jpg|400px|Drag chute separation sequence 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coordinate system ===&lt;br /&gt;
&lt;br /&gt;
The shader assumes that the 3d mesh of the chute is oriented in a particular coordinate system. The z-axis (upward) should extend from the zero point where the various ropes come together to the canopy above through the center of the model. The canopy of the chute should therefore roughly be in the xy plane.&lt;br /&gt;
&lt;br /&gt;
To position the chute correctly with the aircraft, you then need to use appropriate offsets and rotations when loading.&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''mychute.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control the behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;mychute&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/chute&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
	&amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	&amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The meaning of these parameters is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the distance of the branching point of the various lines leading to the canopy (at model coordinate zero) to the edge of the canopy. All transformations affecting the shape of the canopy (in particular the collapse of the canopy if the force is gone) will be applied with respect to this reference plane.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a normalized force applied to the canopy. The chute should be modeled with a deformation corresponding to a force parameter of 1 - any higher value will narrow the chute's radius, deepen the chute's deformation along the z-axis and increase the motion, any lower value will widen chute radius (compare screenshots above) and lessen its depth and slow down motion. The normal parameter range should be from [0:2], any higher or lower may look odd.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	 &amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are deformation modes used to animate a chute after jettison when it is no longer pulled into shape and can flutter through the air. The first one [0:1] is a general collapse into the projection plane with random deformations around, the second one [-1:1] is a gross bending mode of the projection plane itself. Before jettison, these parameters should default to 0.&lt;br /&gt;
&lt;br /&gt;
=== Jettison animation ===&lt;br /&gt;
&lt;br /&gt;
A complete animated jettison sequence is quite complex and would usually require a Nasal sequence taking the chute through a deceleration trajectory (utilizing translation and rotation animations), bending ad folding oscillations and finally some unfolding as it sinks through the air. The Space Shuttle chute uses the following control loop for 10 seconds of jettison dynamics:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var drag_chute_jettison_animation = func (time) {&lt;br /&gt;
&lt;br /&gt;
var dt = getprop(&amp;quot;/sim/time/delta-sec&amp;quot;);&lt;br /&gt;
time = time + dt;&lt;br /&gt;
&lt;br /&gt;
# horizontal motion&lt;br /&gt;
&lt;br /&gt;
var x = 0.0;&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 2.0)&lt;br /&gt;
	{x = -16.0 + 20.0 * time;}&lt;br /&gt;
else&lt;br /&gt;
	{x = 2.0 * time + 5.0 * time * time;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-dist&amp;quot;,x);&lt;br /&gt;
&lt;br /&gt;
# vertical motion&lt;br /&gt;
&lt;br /&gt;
var y = 0.0;&lt;br /&gt;
if (time &amp;gt; 5.0)&lt;br /&gt;
	{&lt;br /&gt;
	y = -2.5 + 0.6 * (time-5.0) * (time-5.0);&lt;br /&gt;
	}&lt;br /&gt;
else 	&lt;br /&gt;
	{&lt;br /&gt;
	y = -0.2 * time;&lt;br /&gt;
	}&lt;br /&gt;
if (y &amp;gt; 12.5) {y=12.5;}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-down&amp;quot;,y);&lt;br /&gt;
&lt;br /&gt;
# fold&lt;br /&gt;
&lt;br /&gt;
var f = 0.5 * time;&lt;br /&gt;
if (f&amp;gt; 1.0) {f = 1.0;}&lt;br /&gt;
if (time &amp;gt; 9.5)&lt;br /&gt;
	{f = 0.25 + 1.5 + (time-9.5);}&lt;br /&gt;
if (time &amp;gt; 6.0)&lt;br /&gt;
	{&lt;br /&gt;
 	f = f -0.3* (time-7.0); &lt;br /&gt;
	if (f&amp;lt;0.1) {f=0.1;}&lt;br /&gt;
	}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-fold&amp;quot;, f);&lt;br /&gt;
&lt;br /&gt;
# rotate&lt;br /&gt;
&lt;br /&gt;
var r = (time - 2.0) * 18.0;&lt;br /&gt;
if (r&amp;gt;90.0) {r=90.0;}&lt;br /&gt;
if (r&amp;lt;0.0) {r=0.0;}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-slant&amp;quot;, r);&lt;br /&gt;
&lt;br /&gt;
# bend&lt;br /&gt;
&lt;br /&gt;
var b = 0;&lt;br /&gt;
if (time &amp;gt; 7.5)&lt;br /&gt;
	{b = 0;}&lt;br /&gt;
else if (time &amp;gt;6.0)&lt;br /&gt;
	{b = 0.75 - 0.5 * (time - 6.0);} &lt;br /&gt;
else if (time &amp;gt; 4.5) &lt;br /&gt;
	{b = (time - 4.5) * 0.5;}&lt;br /&gt;
else {b=0;}	&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-bend&amp;quot;, b);&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 10.0) &lt;br /&gt;
	{&lt;br /&gt;
	print(&amp;quot;Exiting...&amp;quot;);&lt;br /&gt;
	settimer (func { setprop(&amp;quot;/controls/shuttle/drag-chute-deploy-timer&amp;quot;, 0); }, 0.5);&lt;br /&gt;
	return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/test/timer&amp;quot;, time);&lt;br /&gt;
&lt;br /&gt;
settimer( func{ drag_chute_jettison_animation (time); }, 0);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS glass effect ==&lt;br /&gt;
&lt;br /&gt;
As of FlightGear version 3.5, ALS supports a glass effect with dynamic response to the environment which can render, for instance, the splashes of raindrops on the canopy, frost or fogging.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass01.jpg|400px|Frost effect]]&lt;br /&gt;
[[File:Glass07.jpg|400px|Raindrop splashes]]&lt;br /&gt;
&lt;br /&gt;
The base effect properties are controlled via inheritance and the environment response run-time via properties residing in &amp;lt;b&amp;gt;/environment/aircraft-effects&amp;lt;/b&amp;gt;. Derived effects should inherit from &amp;lt;b&amp;gt;Effects/glass&amp;lt;/b&amp;gt;. Any surface using the glass effect will automatically register itself as transparent for use in [[Project Rembrandt| Rembrandt]]. &lt;br /&gt;
&lt;br /&gt;
The glass effect is primarily intended for interior views. In particular, no external fog or haze is rendered for the glass, i.e. if the effect is used in an outside view, it is the responsibility of the aircraft modeler to take care (e.g. with LOD settings or range animations) that no problems in bad visibility occur.&lt;br /&gt;
&lt;br /&gt;
=== Why a separate effect for glass seen from inside? ===&lt;br /&gt;
&lt;br /&gt;
Basically because the two situations are rather different. Slight dirt on the glass against the background of the sky from inside is rather prominent, against the background of the cockpit seen from outside it is not. Visuals from inside are dominated by Mie forward scattering of light, leading to a bright glare effect when looking at dirt, frost, fog or scratches close to the sun. From outside, reflected light rather than transmitted light is dominant. The reflection of any external object on the outside of the glass changes as the aircraft moves, this is not the case for the reflection of the cockpit in the glass seen from the inside. &lt;br /&gt;
&lt;br /&gt;
The viewing situation is also different. From the inside, we usually do not focus the eyes on the plane of the glass but look through it, from the outside the focus of the eyes is often close to the glass surface. For something half a meter before the eye, we also need to apply a lot more resolution and details than for an object typically seen from 10+ meters from the outside.&lt;br /&gt;
&lt;br /&gt;
Add to this that atmospheric fog is never relevant for glass seen from inside but for glass seen from outside, and it suddenly makes sense to use a different effect.&lt;br /&gt;
&lt;br /&gt;
The recommended effect for glass surfaces seen from outside is model-combined-transparent.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rain ===&lt;br /&gt;
Rain splashes will render automatically when the weather system reports rain via environment/rain-norm. In addition, the user can set rain splashes to render via &amp;lt;code&amp;gt;environment/aircraft-effects/ground-splash-norm&amp;lt;/code&amp;gt; (this is intended to allow splashes to be rendered e.g., for water landings of aircraft equipped with floats).&lt;br /&gt;
&lt;br /&gt;
By default, the rain splashes impact from above (more precisely the +z direction in model coordinates). This may be inadequate if the aircraft is moving. However, the shader can not know what the airstream at the glass will be, so the impact vector of rain splashes has to be modeled aircraft-side and set via &amp;lt;code&amp;gt;environment/aircraft-effects/splash-vector-x&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;splash-vector-y&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;splash-vector-z&amp;lt;/code&amp;gt;). These are likewise in model coordinates.&lt;br /&gt;
&lt;br /&gt;
As long as the length of the splash vector is less than 1, just the impact angle will change, as the length of the vector increases to 2, droplets will also be visibly moving. This allows fine control of the visuals dependent on any number of factors desired. A simple Nasal snipped varying the splash vector with airspeed for the F-16 is given below (but ''do not mindlessly copy and expect to work for any aircraft — it won't!''). This example is for normals pointing outwards, if the normals are pointing inwards the vector needs to be inverted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var splash_vec_loop = func(){&lt;br /&gt;
    var airspeed = getprop(&amp;quot;/velocities/airspeed-kt&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    # f16&lt;br /&gt;
    var airspeed_max = 120;&lt;br /&gt;
&lt;br /&gt;
    if (airspeed &amp;gt; airspeed_max) {&lt;br /&gt;
        airspeed = airspeed_max;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    airspeed = math.sqrt(airspeed / airspeed_max);&lt;br /&gt;
&lt;br /&gt;
    var splash_x = -0.1 - 2 * airspeed;&lt;br /&gt;
    var splash_y = 0.0;&lt;br /&gt;
    var splash_z = 1.0 - 1.35 * airspeed;&lt;br /&gt;
&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-x&amp;quot;, splash_x);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-y&amp;quot;, splash_y);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-z&amp;quot;, splash_z);&lt;br /&gt;
&lt;br /&gt;
    settimer(func(){&lt;br /&gt;
        splash_vec_loop();&lt;br /&gt;
    }, 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the timing constant of the loop — running the update per-frame leads to a spurious movement of the coordinate system in which rain is rendered and spoils the effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another method when using JSBSIM would be to use a combination of FCS Functions and Filters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashX&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashx&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashY&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashZ&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashz&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could reduce the above method and eliminate the &amp;quot;filters&amp;quot; by doing the following.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/airspeed-clamped-sqrt&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;  &lt;br /&gt;
                &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;min&amp;gt;&lt;br /&gt;
                            &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                            &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;/min&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashy&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
               &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yet another method (currently used in the c172p) limits movement to a range of table entries. This gives the developer the ability to control the behavior even more.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xa&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.7  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -2.1  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-za&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.17 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.35 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.3  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.9  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-zr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.127 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.29  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;0&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-x&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-y&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-z&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Frost and fogging ===&lt;br /&gt;
&lt;br /&gt;
Frost on the canopy is rendered when environment/aircraft-effects/frost-level is set in the range from 0 to 1. Again, it is up to the aircraft developer to decide at what exterior conditions frosting should happen and whether the aircraft is equipped with heating to remove the frost again.&lt;br /&gt;
&lt;br /&gt;
Fogging is controlled by environment/aircraft-effects/fog-level in the range 0 to 1. Unless a mask is used, fogging is homogeneous across the whole surface (it is really intended to be used with a mask).&lt;br /&gt;
&lt;br /&gt;
=== Tint ===&lt;br /&gt;
&lt;br /&gt;
Tinted glass can be easily created by changing &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;glass-tint type=&amp;quot;vec4d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 1.0&amp;lt;/glass-tint&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to any value desired. This will affect all effects assumed outside of the glass layer (frost and rain splashes) but not fogging inside the glass. Use primarily for development and quick tests, don't misuse the alpha value available here, it has odd side effects.&lt;br /&gt;
&lt;br /&gt;
=== Functional masks ===&lt;br /&gt;
&lt;br /&gt;
If the glass surface is uv-mapped and textured, it is possible to switch on a mask functionality in the inheritance via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;image&amp;gt;my_mask.png&amp;lt;/image&amp;gt;&lt;br /&gt;
	&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
	&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
	&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;use-mask type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-mask&amp;gt;&lt;br /&gt;
&amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The red channel in my_mask.png controls the strength of fogging, full red corresponds to maximal fogging, no red to zero fogging. This allows to selectively model the position of heaters in the cockpit. Use &amp;lt;b&amp;gt;/environment/aircraft-effects/fog-level&amp;lt;/b&amp;gt; to adjust the actual amount of fog runtime.&lt;br /&gt;
&lt;br /&gt;
The green channel of my_mask.png is the amount of reduction of rain in an area. This is intended for airplanes equipped with windshield wipers to partially clear the wiped area of the rain. Whether the windshield wiper is actually on or not is controlled runtime via &amp;lt;b&amp;gt;/environent/aircraft-effects/use-wipers&amp;lt;/b&amp;gt; (1 sets wipers to on).&lt;br /&gt;
&lt;br /&gt;
The blue channel of my_mask.png is reserved for an overlay pattern which will be drawn in an optionally specified &amp;lt;overlay-color&amp;gt; vector (white in the example xml above) - the primary function is to render damage on the glass, but with a different color, also dirt or an alternative more finely controlled frost pattern can be used. The strength of the pattern can be adjusted runtime via &amp;lt;b&amp;gt;/environment/aircraft-effects/overlay-alpha&amp;lt;/b&amp;gt;, allowing dynamical accumulation of dirt or sudden appearance of damage.&lt;br /&gt;
&lt;br /&gt;
Examples for the result of a fog mask and a damage mask are shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Glass12.jpg|400px|Crack pattern using a damage mask]]&lt;br /&gt;
[[File:Glass11.jpg|400px|Partial fogging using a mask texture]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note that by default all the runtime switches for the mask are off / set to zero! Remember to to switch them on when testing the effect!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mie scattering ===&lt;br /&gt;
&lt;br /&gt;
Most glass effects show prominent Mie forward scattering as in reality, i.e. frost patterns or fogging will appear much more prominent when looking almost towards the sun than under any other angle. While the frost pattern is normally not very prominent and one is able to look through unhindered, this changes substantially when looking into the sun, at which point it almost obscures the view.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass08.jpg|400px|Mie scattering of low light on frost]]&lt;br /&gt;
[[File:Glass13.jpg|400px|Morning sun Mie scattering on fog]]&lt;br /&gt;
&lt;br /&gt;
For frost and fog, the strength of the effect is set automatically, but for the damage/dirt layer it is under user control at effect design time. Changing the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;overlay-glare type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/overlay-glare&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from its default value allows to adjust the strength of the glare when looking through the overlay layer close to the sun.&lt;br /&gt;
&lt;br /&gt;
=== Internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
There is support for a reflection of the cockpit interior.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect.jpg|640px|Internal glass cube map reflection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This needs to be provided as a cubemap specific for the airplane and switched on via the flag &amp;lt;use-reflection&amp;gt; set to 1. The relative strength of the reflection can be optionally via &amp;lt;reflection-strength&amp;gt;. The strength of the reflection in the cockpit is dynamically adjusted for a number of factors, among them balance of direct to indirect light, the approximate amount of light falling on the surface seen in the reflection and the amount of direct sunlight falling into the eye.&lt;br /&gt;
&lt;br /&gt;
If the six cubemap faces are called my_cube_map_??.png, then using an effect file called c172p-reflect.eff the inheritance looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-reflect&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/glass&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;images&amp;gt;&lt;br /&gt;
        &amp;lt;positive-x&amp;gt;my_cube_map_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
        &amp;lt;negative-x&amp;gt;my_cube_map_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
        &amp;lt;positive-y&amp;gt;my_cube_map_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
        &amp;lt;negative-y&amp;gt;my_cube_map_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
        &amp;lt;positive-z&amp;gt;my_cube_map_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
        &amp;lt;negative-z&amp;gt;my_cube_map_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
        &amp;lt;/images&amp;gt;&lt;br /&gt;
    &amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;use-reflection type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection&amp;gt;&lt;br /&gt;
    &amp;lt;reflection-strength type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/reflection-strength&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The inheritance call includes all surface objects that use the effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-reflect&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;glas&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;rightwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;leftwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See below (Interior shading), for details on cube_map creation and orientation.&lt;br /&gt;
&lt;br /&gt;
=== Lightmaps for internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
If the cockpit is illuminated at night, the reflection map will not show this change by default. However,the glass effect supports a lightmap for the reflection, which can be used in parallel with the lightmap for the panels to show the reflection of a lit panel at night.&lt;br /&gt;
&lt;br /&gt;
Since the reflection map is a cube map, the lightmap for it has to be as well, the syntax is hence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use-reflection-lightmap type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection-lightmap&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
     &amp;lt;images&amp;gt;&lt;br /&gt;
          &amp;lt;positive-x&amp;gt;Models/Effects/interior/reflection/light-px.png&amp;lt;/positive-x&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-x&amp;gt;Models/Effects/interior/reflection/light-nx.png&amp;lt;/negative-x&amp;gt;   &lt;br /&gt;
          &amp;lt;positive-y&amp;gt;Models/Effects/interior/reflection/light-py.png&amp;lt;/positive-y&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-y&amp;gt;Models/Effects/interior/reflection/light-ny.png&amp;lt;/negative-y&amp;gt;    &lt;br /&gt;
          &amp;lt;positive-z&amp;gt;Models/Effects/interior/reflection/light-pz.png&amp;lt;/positive-z&amp;gt;      &lt;br /&gt;
          &amp;lt;negative-z&amp;gt;Models/Effects/interior/reflection/light-nz.png&amp;lt;/negative-z&amp;gt;      &lt;br /&gt;
      &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The control parameters of the lightmap otherwise parallel those of the [[Model-combined_effect]] or the model interior effect described below, i.e. up to four channels can be independently specified on the lightmap.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
By default, rain and frost are mapped to the shape of the canopy using coordinate systems that adapts to the splash vector and the canopy shape. This requires no particular action aircraft-side except to provide the bare geometry of a canopy/windshield, but may not be satisfactory in all instances - in particular for near vertical cockpit side windows the scheme does poorly.&lt;br /&gt;
&lt;br /&gt;
There are two alternative coordinate maps available in this case, controlled by the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;surface-mapping-scheme type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/surface-mapping-scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 1, the uv-mapping of the surface is used (it has to exist of course). For this to work properly, the uv-mapping needs to be sufficiently regular and roughly preserve the mapped area.&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 2, a local orthonormal system based on the normals of the surface is constructed. This no longer takes the splash vector consistently into account  and works poorly for surfaces which are flat in the (xy)-plane, but gives decent result for side windows.&lt;br /&gt;
&lt;br /&gt;
== The HUD effect ==&lt;br /&gt;
&lt;br /&gt;
The HUD effect is a variant of the glass effect designed to render the visuals of a head-up display (HUD) closer to real life. This only works if the HUD is custom-created via [[Canvas]], not via the native FG HUD mechanism as the latter by-passes the effect framework.&lt;br /&gt;
&lt;br /&gt;
The effect takes the same configuration options as the glass effect (i.e. it can render frost, damage, scratches, glare,...) but in addition it runs a blur over the HUD image and alters the color distribution of the projected symbols to de-saturate the bright parts in the center. The result looks less monochromatic and more like light projected onto a surface (left: bare canvas right: HUD effect)&lt;br /&gt;
&lt;br /&gt;
[[File:HUD effect.jpg|800px|Comparison between a bare canvas HUD (left) and the ALS HUD shader run over it (right)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
The effect is used from the model file by assigning it to the surface that also carries the canvas texture of the HUD via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Effects/hud&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;HUDImage&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should usually work out of the box, but if the HUD brightness should be changeable or the glass properties adjusted, a derived effect needs to be created.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
In addition to the parameters supported by the glass shader (which, for instance in the case of rain splashes, may or may not be appropriate for a HUD, this is left at user's discretion), the HUD effect takes the following special parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;brightness&amp;gt;1.0&amp;lt;/brightness&amp;gt;&lt;br /&gt;
   &amp;lt;sample-res&amp;gt;0.0006&amp;lt;/sample-res&amp;gt;&lt;br /&gt;
   &amp;lt;sample-far&amp;gt;2.5&amp;lt;/sample-far&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first one is the relative brightness setting of the HUD (which should equal the alpha value assigned to the canvas image of the symbols). This parameter is used to de-saturate colors in the symbol centers.&lt;br /&gt;
&lt;br /&gt;
Remaining two parameters represent the size and shape of the blur Kernel being used. The sample resolution (sample-res) determines the overall size of the blur region, the farthest sample (sample-far) how far out the tails of the blur region extend.&lt;br /&gt;
&lt;br /&gt;
Note: The number of sampling steps is not computed adaptive to these parameters, if the steps get too coarse, then multiple image echoes instead of a proper blur will be generated - adjust these parameters with care (if at all).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The display effect ==&lt;br /&gt;
&lt;br /&gt;
Like the HUD effect, the display effect augments the visuals of a canvas, but in this case it simulates the effects on a multi-function display in cockpit, i.e. emissive light from a dark background.&lt;br /&gt;
&lt;br /&gt;
For that reason, the effect takes the same set of configuration parameters as the [[#The ALS interior model effect|interior model effect]], i.e. it can be supplied for instance with an opacity map.&lt;br /&gt;
&lt;br /&gt;
The expected and tested structure of the effect is that the display content is rendered on a canvas with transparent background which in turn is above a different, dark-colored surface which stands for the display background. The best visuals are achieved when aircraft-internal shadows are rendered via opacity map on the dark surface and the corresponding contrast effects to the transparent canvas.&lt;br /&gt;
&lt;br /&gt;
Currently the effect does three major things:&lt;br /&gt;
&lt;br /&gt;
* at low light, it can make overly bright displays look slightly blurry and difficult to read as well as de-saturate the colors. This simulates the effects of a too-bright display on the eye and should prompt the user to dim the display.&lt;br /&gt;
&lt;br /&gt;
[[File:Display effect03.jpg|640px|Display effect: blur at low light (left)]]&lt;br /&gt;
&lt;br /&gt;
* at strong direct light, the effect can extinct the display content if it is set too dim. This should prompt the user to increase display brightness&lt;br /&gt;
&lt;br /&gt;
[[File:Display effect04.jpg|640px|Display effect: extinction at strong illumination]]&lt;br /&gt;
&lt;br /&gt;
* finally, if glancing light falls onto the display, the effect can render dust. Note that unlike normal diffuse lighting, the dust appears really strongest when the light almost hits the display from the side.&lt;br /&gt;
&lt;br /&gt;
[[File:Display shader dust.jpg|640px|Display effect: dust]]&lt;br /&gt;
&lt;br /&gt;
* in addition to that, the effect contains the same grain map the interior model effect offers. This can be used e.g. to superimpose a pixel raster (to simulate a CRT screen) or to dim the edges of the display as compared to the center as desired.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
The effect is used from the model file by assigning it to the surface that also carries the canvas texture of the display via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Effects/model-interior-display&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;DisplayImage&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If brightness changes of the display need to be simulated, the aircraft needs to pass parameters to the effect, so usually a derived effect would be created and assigned instead of the base effect in the example above.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
The effect can be configured with all the parameters of the model interior effect, most useful of those is likely the opacity map.&lt;br /&gt;
&lt;br /&gt;
As specifically new parameters, the following set is used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  	&amp;lt;texture n=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
			&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
			&amp;lt;image&amp;gt;Aircraft/Generic/Effects/dust-effect-overlay.png&amp;lt;/image&amp;gt;&lt;br /&gt;
	&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;sample-res&amp;gt;0.0007&amp;lt;/sample-res&amp;gt;&lt;br /&gt;
	&amp;lt;dirt-factor&amp;gt;3.0&amp;lt;/dirt-factor&amp;gt;&lt;br /&gt;
	&amp;lt;contrast&amp;gt;1.0&amp;lt;/contrast&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The supplied texture is the image of the dust layer that is shown. The default image is reasonable to show a dirty screen, but it can be changed into a user-supplied image.&lt;br /&gt;
&lt;br /&gt;
The first parameter is the sampling scale of the blur kernel (see the HUD effect). It describes how blurry the display will appear when overbright in a dark scene. For too large values, the finite number of samples will become very apparent, so this needs to be adjusted with care.&lt;br /&gt;
&lt;br /&gt;
The second parameter describes how pronounced the dirt layer appears - it is a multiplier to the alpha value of the dust texture. For the default texture, values in the range [0:3] are appropriate.&lt;br /&gt;
&lt;br /&gt;
The contrast parameter finally needs to be set by a model of the current mean light level in the cockpit (this is not just the ambient scene light, as there may be cockpit lights, instrument lights etc.) A contrast value of 0 means that the display is on the dim side with respect to the overall light level, a value of 2 means that it is set much to bright and will appear blurry and discolored.&lt;br /&gt;
&lt;br /&gt;
Conversely, a very low contrast value leads to display content extinction if direct light falls onto the display (this needs an opacity map for best effect and queries the texel color values, so the screen brightness should be set up by changing the surface emissivity for this to work correctly).&lt;br /&gt;
&lt;br /&gt;
Dependent on how the lighting inside the cockpit is modeled, it's the aircraft maintainer's responsibility to determine a good contrast value, FG does not have a good model of light inside a cockpit and eye adaption level.&lt;br /&gt;
&lt;br /&gt;
== The ALS interior model effect  ==&lt;br /&gt;
&lt;br /&gt;
Since the interior of a cockpit is a large part of what a pilot gets to see in-flight, but this interior represents a rather special situation (light is reduced as it falls through windows, it may have artificial light, there is never any fog or haze,...) ALS offers a separate effect to specifically render the interior of a plane.&lt;br /&gt;
&lt;br /&gt;
This effect also includes optional features which will be available at higher quality settings of the model shader.&lt;br /&gt;
&lt;br /&gt;
=== Interior shadows and tinted glass effect ===&lt;br /&gt;
&lt;br /&gt;
With FlightGear version 3.5 and above, ALS now supports interior shading; i.e. the sun shining through the windows and casting shadows on the panel.&lt;br /&gt;
&lt;br /&gt;
[[File:interior01.jpg|640px|Interior shading effect]]&lt;br /&gt;
&lt;br /&gt;
This effect is based on an opacity map - a cube map of textures which tells the renderer where the cockpit is transparent and where not. The opacity map has to be created beforehand, which allows to make it quite detailed. In this map, white stands for a completely transparent surface, black for an opaque surface, colors for tinted glass which will create a colored light spot in the cockpit, grey hues for partial shadowing allowing to paint dirt effects onto the windows, and caustics can be drawn using the alpha channel: (1-alpha) will be used as an enhancement of the light at a certain spot.&lt;br /&gt;
&lt;br /&gt;
The effect is typically declared as derived by inheritance using an effect file such as c172-interior.eff which looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior-glass&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
	  &amp;lt;images&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-x&amp;gt;Models/Effects/interior/clr_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-x&amp;gt;Models/Effects/interior/clr_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-y&amp;gt;Models/Effects/interior/clr_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-y&amp;gt;Models/Effects/interior/clr_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-z&amp;gt;Models/Effects/interior/clr_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-z&amp;gt;Models/Effects/interior/clr_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
	  &amp;lt;/images&amp;gt;&lt;br /&gt;
	&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-center type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 0.5 0.0 0.3&amp;lt;/opacity-cube-center&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-scale type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.5 0.5 0.7&amp;lt;/opacity-cube-scale&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-angle type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/opacity-cube-angle&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is called by inheritance in the model.xml file.&lt;br /&gt;
&lt;br /&gt;
Imagine the opacity map as a box surrounding the cockpit and trying to closely follow its contours. The origin in the box needs to be placed into the center of the cockpit, which is what &amp;lt;b&amp;gt;&amp;lt;opacity-cube-center&amp;gt;&amp;lt;/b&amp;gt; does. Each of the three dimensions then needs to be stretched to roughly fit the layout of the canopy, this is done by &amp;lt;b&amp;gt;&amp;lt;opacity-cube-scale&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If opacity map center and scale are wrong, you will still see shadows, but they won't match the real cockpit layout (the lightspot of a window will be seen displaced and at a different size of the real window). Thus, carefully measuring the best box layout in a 3d tool is moderately important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aircraft-side the effect is called as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;PilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;CopilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;panel_1_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;InstrumentCover.001&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Panel_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Throttle&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Mixture&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Pedestal&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;TrimWheel&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;ParkingBrake&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;BackSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;FuelSelectorFace&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each object that you want the shadow effect to fall on must be included in the inheritance.&lt;br /&gt;
&lt;br /&gt;
Unless you supply a path, the cube_.png's need to reside in the same directory as the model.xml where you added the &amp;lt;effect&amp;gt; tag pair that calls c172-interior.eff, not where you put the aircraft_interior.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The orientation of the faces of each cube have to be adjusted based on the positive and negative axis of the model.&lt;br /&gt;
&lt;br /&gt;
For example, using the c172p model as a reference.&lt;br /&gt;
&lt;br /&gt;
The tail, right wing and top on the model are positive inside Blender. So the cube faces are laid out as follows.&lt;br /&gt;
&lt;br /&gt;
Note: Depending on the image's orientation when photographed the rotation direction will vary. This is assuming the images are being taken from the center of the cockpit looking out. Using compass headings to describe how to rotate the images.&lt;br /&gt;
&lt;br /&gt;
px (tail) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nx (nose) rotate 90 deg from N or S to E&lt;br /&gt;
&lt;br /&gt;
py (starboard/right) from N do not rotate&lt;br /&gt;
&lt;br /&gt;
ny (port/left) from N rotate 180 deg to S&lt;br /&gt;
&lt;br /&gt;
pz (top) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nz (bottom) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
[[File:C172p-cube.jpg|640px|Cube map layout of the c172p]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With Blender, it's pretty easy to create the cubemap.&lt;br /&gt;
&lt;br /&gt;
1. Add a camera where the cubemap will be. Set the FOV to 90 degrees.&lt;br /&gt;
2. Set the resolution to 1024x1024 (or any other square, power-of-two size).&lt;br /&gt;
3. Hide all lights and windows; disable ambient lighting (set it to black) and turn off ambient occlusion.&lt;br /&gt;
4. Set the world color to white.&lt;br /&gt;
5. Enable the compositor and add an invert node.&lt;br /&gt;
6. Render and save the six views as you would normally.&lt;br /&gt;
7. Add dirt, tinted glass color and caustics by hand&lt;br /&gt;
&lt;br /&gt;
This process depends on the model setup but it should work for most aircraft with a few tweaks.&lt;br /&gt;
&lt;br /&gt;
==== Cubemap Kit for Blender ====&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-shadow-blender-instructions.png|320px|How to make an interior cubemap with the cubemap kit]]&lt;br /&gt;
&lt;br /&gt;
See [http://chateau-logic.com/content/flightgear-interior-shadow-cubemap-kit flightgear-interior-shadow-cubemap-kit] for a premade kit to create the cubemap and the .eff sample file to use it.&lt;br /&gt;
&lt;br /&gt;
==== Important Notes ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Currently (May 2015) the effect does not deal gracefully with child models included into the main model with offsets and/or rotations because these introduce a different coordinate system in which the shadow does not match. The general idea of a code solution is known, but not implemented. Right now this can only be addressed by explicitly positioning child models in the *.ac file and not using any offsets when including them.&lt;br /&gt;
&lt;br /&gt;
=== ALS flashlight ===&lt;br /&gt;
&lt;br /&gt;
This effect is meant to imitate a hand held flashlight for use in getting instruments in the cockpit turned on in dark conditions.&lt;br /&gt;
It is almost identical in nature to ALS searchlight only it is applied using interior-model.eff.&lt;br /&gt;
It has two user defined light color filters that can be applied and also a user defined light radius setting.&lt;br /&gt;
&lt;br /&gt;
[[File:ALS flashlight.jpg|600px|ALS flashlight effect]]&lt;br /&gt;
&lt;br /&gt;
To implement this effect use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
A full definition looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-one type=&amp;quot;vec3d&amp;quot;&amp;gt;0.5 0.5 0.5&amp;lt;/light-filter-one&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-two type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.2 0.2&amp;lt;/light-filter-two&amp;gt;&lt;br /&gt;
	&amp;lt;light-radius type=&amp;quot;float&amp;quot;&amp;gt;13&amp;lt;/light-radius&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the example above light-filter-one is soft white light and light-filter-two is a soft red light.&lt;br /&gt;
&lt;br /&gt;
After defining as above you can turn it on using the following property&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 1 is light-filter-one&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 2 is light-filter-two&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The flashlight effect inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
At lowest quality level, the effect supports an implicit lightmap, i.e. a color range of the basic texture can be selected and declared to act as a lightmap. This is specifically useful to render panel backlighting as in the example below:&lt;br /&gt;
&lt;br /&gt;
[[File:Ilightmap.jpg|600px|An implicit lightmap used to simulate a backlit panel]]&lt;br /&gt;
&lt;br /&gt;
The effect is off by default and switched on by setting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/implicit-lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following parameters are available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-tag-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-tag-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the base color to be tagged, i.e. if the panel labels to be illuminated at night are white, the color needs to be set to white.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-low type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/implicit-lightmap-threshold-low&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-high type=&amp;quot;float&amp;quot;&amp;gt;1.5&amp;lt;/implicit-lightmap-threshold-high&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The thresholds determine how similar a color may be to the base color in order to be still illuminated. The measure is the Euklidean distance of the color vectors. The lower thresholds determines when illumination will start to fade, the higher threshold at what distance in color space illumination will no longer take place. The thresholds have to be adapted to the specific situation - the technique works best for high-contrast panels (white labels on black background) and may not work at all for low contrast panels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-emit-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-emit-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The emit color specifies at which color the pixel will show if it is tagged (see above) and the implicit lightmap is on (see below) - set this to the color of the backlight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-intensity type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/implicit-lightmap-intensity&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the intensity determines how brightly the illuminated pixel will shine.&lt;br /&gt;
&lt;br /&gt;
Ambiance lighting can be simulated with the following tags.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-r type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-r&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-g type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-g&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-g&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-b type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-b&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example note the use of the &amp;quot;use&amp;quot; tag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be any defined property or static value.&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The implicit lightmap inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Irradiance maps ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In the simplest rendering schemes, diffuse and specular light are assumed to be highly directional (i.e. it illuminates lit surfaces only) while ambient light is taken to be omnidirectional.&lt;br /&gt;
&lt;br /&gt;
In reality, that is hardly ever true. In a typical outside location, ambient light is mainly coming from the sky above (which is why the ground underneath a car is dark even in the absence of directional light when the sky is overcast and the sun is not visible). In an enclosed space (like a room, or an aircraft cockpit), ambient light has to fall through the windows, i.e. is mainly not coming above but falling in horizontally.&lt;br /&gt;
&lt;br /&gt;
The directional dependence is not very strong though, yet it leaves measurable effects. In rendering, this can be accounted for by irradiance maps. In the following, the interior of the C-172p is rendered in the first case using omnidirectional ambient light, in the second case using an irradiance map giving the ambient light the directionality of the cabin windows, i.e. the light falls in predominantly horizontally (in addition, a grain map is superimposed to provide structure). Note how the spatial structure of the roof, looking bland when rendered in omnidirectional light is brought out by the irradiance map.&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-irradiance01.jpg|400px|C-172p cabin interior rendered without irradiance and grain map]]&lt;br /&gt;
[[File:Als-interior-irradiance02.jpg|400px|C-172p cabin interior rendered with irradiance and grain map]]&lt;br /&gt;
&lt;br /&gt;
Irradiance mapping is configured by the following parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-type type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/irradiance-map-type&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-strength type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/irradiance-map-strength&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several pre-configured irradiance map functions which can be chosen by map type. &lt;br /&gt;
&lt;br /&gt;
0: (default) omndirectional light&lt;br /&gt;
1: light predominantly coming from above (most appropriate for fighter cockpits)&lt;br /&gt;
2: light predominantly coming from the horizon (most appropriate for GA aircraft)&lt;br /&gt;
&lt;br /&gt;
The strength of the irradiance map regulates how pronounced the asymmetry of the map will be. A strength of zero always makes the light omnidirectional, whereas a strength of 1 implies that no light is coming from any direction 90 degree to the main direction (i.e. for the option 2, a strength of 1.0 means that no ambient light will fall in from above or below and that hence horizontal surfaces will appear pitch black unless direct light falls on them)&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The irradiance map inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Explicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In addition to the implicit lightmap, it is also possible to explicitly specify a lightmap. The syntax for this exactly parallels the syntax of the [[Model-combined_effect]] which supplies lightmaps for the exterior.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/MyAircraft/Effects/my_lightmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-multi type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/lightmap-multi&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-factor type=&amp;quot;float&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0&amp;lt;/lightmap-factor&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 &amp;lt;/lightmap-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a single channel lightmap in which pixel color times the lightmap color provides the illumination. Using the multi-channel function, up to four different maps can be specified in which the (rgba) values of a pixel encode where the light falls and the associated lightmap color what color the illumination takes. Each of these maps can be switched on and off or dimmed in intensity independently.&lt;br /&gt;
&lt;br /&gt;
=== Grain map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
The grain map sets a repeating hires overlay texture which can supply a very credible illusion of structure to a surface for cheap. The syntax exactly parallels that of the [[Model-combined_effect]] ALS grain feature described above.&lt;br /&gt;
&lt;br /&gt;
For instance, the following&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/Effects/MyGrainmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;10&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a grain overlay with a 10-time higher resolution over the base texture layer.&lt;br /&gt;
&lt;br /&gt;
== ALS procedural lights ==&lt;br /&gt;
&lt;br /&gt;
The ALS framework supports procedurally generated lights (for instance aircraft position lights, strobe lights,... ) for aircraft and models. Note that the effect produces the visuals of the lights themselves, but they do not illuminate their surroundings.&lt;br /&gt;
&lt;br /&gt;
=== Why procedural lights? ===&lt;br /&gt;
&lt;br /&gt;
Traditionally aircraft position lights have been implemented as billboarded emissive textures. This technique is limited in scope, as it has difficulty producing a directional light or changes in the light appearance (for instance glare) with changed scene lighting. The ALS procedural lights are designed to give visuals consistent with the auto-generated scene lights (runway lighting, street lights) and support configurable directionality, glare and even the illumination of fog by the lights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic implementation ===&lt;br /&gt;
&lt;br /&gt;
The base of the light is a texture quad which has Effects/procedural-light.eff assigned. Start from including the template provided into your model as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;model&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;/Models/Effects/procedural_light.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
        &amp;lt;offsets&amp;gt;&lt;br /&gt;
            &amp;lt;x-m&amp;gt; 0 &amp;lt;/x-m&amp;gt;&lt;br /&gt;
            &amp;lt;y-m&amp;gt; 0 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
            &amp;lt;z-m&amp;gt; 2 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
        &amp;lt;/offsets&amp;gt;&lt;br /&gt;
 &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and configure from there according to your own needs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not billboard the light via animation!&amp;lt;/b&amp;gt; The GLSL code will take care of the billboarding. Use a scale animation to change the size of the light, do not change the quad (the *.ac) itself in size, the shader code requires its geometry to be fixed.&lt;br /&gt;
&lt;br /&gt;
The lights are currently not supported in the default or Rembrandt renderer and will simply be invisible in these frameworks.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the light ===&lt;br /&gt;
&lt;br /&gt;
Make your own derived effect inheriting from Effects/procedural-light.eff and assign it in the xml wrapper of the light.&lt;br /&gt;
&lt;br /&gt;
====The base light color set====&lt;br /&gt;
&lt;br /&gt;
The base light color can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These take the normal set of values ranging from 0 to 1. &lt;br /&gt;
&lt;br /&gt;
====Light full intensity in the center====&lt;br /&gt;
&lt;br /&gt;
Now the light appears at full intensity in the center can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea behind this is that lights give a better visual appearance if their center is rendered visually brighter and de-saturated, but this occurs only if the light is at full intensity.&lt;br /&gt;
&lt;br /&gt;
There are no sanity checks done, you can assign any center color you like even if this makes no sense - you can change center color or darken it, so use with care.&lt;br /&gt;
&lt;br /&gt;
====Runtime change the light intensity====&lt;br /&gt;
&lt;br /&gt;
To runtime change the light intensity, assign&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to a property and change that property in the range from 0 to 1. Eg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;intensity_scale&amp;gt;&lt;br /&gt;
       &amp;lt;use&amp;gt;/rendering/nav-lights-factor&amp;lt;/use&amp;gt;&lt;br /&gt;
     &amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Set directional lights====&lt;br /&gt;
&lt;br /&gt;
For directional lights, you need to assign a pointing vector in aircraft coordinates into which the light cone points and set the directionality flag to true to activate the computations. This is done via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;-1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
    &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It would be customary to pass a normalized vector, but if you don't know how to do it, the shader will do it for you. By assigning properties to the pointing coordinates, the light direction can be changed runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not use a rotation animation to change the light direction - it won't work.&amp;lt;/b&amp;gt; Make the pointing vector properties and change them to your needs.&lt;br /&gt;
&lt;br /&gt;
====Fading of a directional light====&lt;br /&gt;
[[File:Directional light.jpg|thumb|Explanation of a light radiation pattern]]&lt;br /&gt;
The fading of a directional light away from the pointing axis is controlled by passing angles (or rather sines of angles).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
    &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Up to inner_angle, the light will have full intensity. From inner to outer angle the light will linearly fade to outer_gain. From outer angle to zero angle, the light intensity will linearly fade to zero.&lt;br /&gt;
&lt;br /&gt;
====Strobe effect====&lt;br /&gt;
&lt;br /&gt;
For get an automatic strobe effect you can set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to true. If you want your own strobe pattern, generate a strobe function and use &amp;lt;b&amp;gt;intensity_scale&amp;lt;/b&amp;gt; instead to pass it to the shader.&lt;br /&gt;
&lt;br /&gt;
=== Complete example ===&lt;br /&gt;
&lt;br /&gt;
Here's the left nav light of the C-172p:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;name&amp;gt;procedural-light-nav-left&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/procedural-light&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.000&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
        &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Arc is 110 deg, is 55 deg per side, giving 35 deg from wing --&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.7002075382097097&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
        &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Angles are 0.0 at 0 deg from pointing direction, 1.0 at&lt;br /&gt;
             90/-90 deg, and 0.0 at 180/-180 deg.&lt;br /&gt;
&lt;br /&gt;
             For left navigation light we use -0/-35 .. +110/+145 for&lt;br /&gt;
             the inner/outer range. This gives an arc of 110/180 deg,&lt;br /&gt;
             or 55/90 deg from center.&lt;br /&gt;
&lt;br /&gt;
             Value = sin(angle in degrees)&lt;br /&gt;
&lt;br /&gt;
             0.8191520442889918 = 55 deg (* 2 = 110 deg inner angle)&lt;br /&gt;
             1.0000 = 90 deg (* 2 = 180 deg outer angle)&lt;br /&gt;
        --&amp;gt;&lt;br /&gt;
        &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.8191520442889918&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
        &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.982547593563&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
The Cessna 182 by Heiko Schulz and Gilberto Agostinho with procedural lights activated:&amp;lt;br&amp;gt;&lt;br /&gt;
:''(To percieve the effect well, you probably have to darken your room and switch to fullscreen)''&lt;br /&gt;
[[File:Cessna 182 with procedural lights.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
===Move dynamically the procedural light===&lt;br /&gt;
&lt;br /&gt;
The position of a procedural light is declared in the '''&amp;lt;model&amp;gt;''' section, within the '''&amp;lt;PropertyList&amp;gt;''' XML code, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;procedural-light-gear-white-left&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;path&amp;gt;Effects/lights/procedural_light_gear_white.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
      &amp;lt;offsets&amp;gt;&lt;br /&gt;
          &amp;lt;x-m&amp;gt; -3.08&amp;lt;/x-m&amp;gt;&lt;br /&gt;
          &amp;lt;y-m&amp;gt; -0.21 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
          &amp;lt;z-m&amp;gt; -1.18 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
      &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tag ''procedural-light-gear-white-left'' is very important because is the object name. This name will be used as the reference object.&amp;lt;BR&amp;gt;Next, we can define an animation in the same xml file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;GearFrontalDoor&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;gear/gear/position-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;axis&amp;gt;&lt;br /&gt;
          &amp;lt;x1-m&amp;gt;  -3.00240&amp;lt;/x1-m&amp;gt;&lt;br /&gt;
          &amp;lt;y1-m&amp;gt;  1.0&amp;lt;/y1-m&amp;gt;&lt;br /&gt;
          &amp;lt;z1-m&amp;gt;  -1.02906&amp;lt;/z1-m&amp;gt;&lt;br /&gt;
          &amp;lt;x2-m&amp;gt;  -3.00240&amp;lt;/x2-m&amp;gt;&lt;br /&gt;
          &amp;lt;y2-m&amp;gt;  -1.0&amp;lt;/y2-m&amp;gt;&lt;br /&gt;
          &amp;lt;z2-m&amp;gt;  -1.0290&amp;lt;/z2-m&amp;gt;&lt;br /&gt;
      &amp;lt;/axis&amp;gt;&lt;br /&gt;
      &amp;lt;interpolation&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.25&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.50&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;60&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.75&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;30&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;0&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
      &amp;lt;/interpolation&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''procedural light'' object code is this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS fuselage shadow effect ==&lt;br /&gt;
ALS supports the manipulation of a (simplified) ground shadow. This effect uses an existing simplified shadow animation configuration and by default uses the gear-agl-m property to calculate the ground placement of that simplified shadow.&lt;br /&gt;
&lt;br /&gt;
The system, techniques for using it, and several working examples are on [https://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=24859&amp;amp;start=135 this extensive forum thread about the ALS shadow effects].&lt;br /&gt;
&lt;br /&gt;
[[File:Alsshadow.jpg|800px|ALS Shadow]]&lt;br /&gt;
&lt;br /&gt;
The effect can be applied easily in any aircraft that report the gear-agl-m property by simply adding a declaration inheriting from shadow.eff.&lt;br /&gt;
&lt;br /&gt;
If the aircraft does not support the gear-agl-m property, (notably JSBSim), you need to create a [[Autopilot configuration reference | Property Rule]] to pass a supported AGL data to the gear-agl-m property. In this case we use altitude-agl-ft converted to meters using a property rule configuration file.&lt;br /&gt;
&lt;br /&gt;
For the first example we'll use the &amp;quot;supported gear-agl-m&amp;quot; method for aircraft that don't require a property rule.&lt;br /&gt;
&lt;br /&gt;
Simply add the following inheritance declaration after you declare your shadow animation statement.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;name_of_the_shadow_object&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the non-ALS simplified shadow code you normally use a &amp;quot;translate&amp;quot; animation to position the shadow on the ground.&lt;br /&gt;
When using the ALS method you must either remove, comment out, or apply a condition to restrict its use to non ALS shadow applications, because ALS is responsible for computing the shadows ground position.&lt;br /&gt;
&lt;br /&gt;
Here is how we apply a condition to the translation to limit it effect to non-ALS application only.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A complete shadow animation block looks like this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- opaque objects --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- transparent objects --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;not&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/rembrandt/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;/not&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;noshadow&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- pitch --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/pitch-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;-1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;1&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- roll --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/roll-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;1&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For aircraft requiring a [[Autopilot configuration reference | Property Rule]] there are a couple extra steps.&lt;br /&gt;
&lt;br /&gt;
In aircraft-set.xml you add the property rule call to the &amp;quot;configuration file&amp;quot; in between the PropertyList/sim/systems tag pairs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;property-rule n=&amp;quot;101&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;gear_agl-m&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;Aircraft/c172p/Systems/gearAGL.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
&amp;lt;/property-rule&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: the n=&amp;quot;101&amp;quot; needs to be =+100 as -100 is reserved for system wide property rules.&lt;br /&gt;
In the above example 101 was used because 100 was already being used by a previous property rule definition.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;configuration file&amp;quot; normally goes in /Systems.&lt;br /&gt;
In this example we named the configuration file /Systems/gearAGL.xml.&lt;br /&gt;
&lt;br /&gt;
Here is the complete /Systems/gearAGL.xml configuration file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;filter&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;reference&amp;gt;6&amp;lt;/reference&amp;gt;&lt;br /&gt;
    &amp;lt;output&amp;gt;/position/gear-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
  &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
What the configuration file does is convert the input of altitude-agl-ft to the output of (((altitude-agl-ft)-6)*0.3048) or (convert ft-6 to m) and pass it to /position/gear-agl-m.&lt;br /&gt;
 &lt;br /&gt;
See [[Autopilot configuration reference | Input and reference properties or values &amp;lt;input&amp;gt; and &amp;lt;reference&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
== ALS 3d shadow volume effect ==&lt;br /&gt;
What might be considered the next level of realism using a relatively &amp;quot;cheap&amp;quot; shadow effect is to use a 3d volume shadow.&lt;br /&gt;
&lt;br /&gt;
[[File:Shadow vol02.jpg|800px|ALS 3d Shadow Volume]]&lt;br /&gt;
&lt;br /&gt;
The procedure to implement the ALS shadow volume is similar to the ALS-shadow above with a few modifications.&lt;br /&gt;
&lt;br /&gt;
First you have to have a 3d shadow volume model of the aircraft you are applying the effect to. This model should be a low poly model that is optimized to be as little of a footprint as possible.&lt;br /&gt;
&lt;br /&gt;
A property rule is required, same as above. This is used to generate the above ground altitude in meters, (altitude-agl-m). The &amp;quot;altitude-agl-m&amp;quot; is used to place the shadow close to the ground in real time at an FDM rate of execution.&lt;br /&gt;
{{note|Do not confuse &amp;quot;altitude-agl-m&amp;quot; with the other type of non-3d ALS-shadow property of &amp;quot;gear-agl-m&amp;quot;. The shaders involved use these two different properties respectively for the two different effect. They are not interchangeable.}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
   &amp;lt;filter&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
      &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
      &amp;lt;reference&amp;gt;1.0&amp;lt;/reference&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;/position/altitude-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The other difference from the ALS-shadow above is that it uses a different inherited effect.&lt;br /&gt;
Instead of&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
you use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow-vol&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make sure there is no duplicate 3d model shown in other renderers besides ALS it is also important to use a different select animation:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- hide 3d shadow in non ALS mode --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Procedural Texturing]]&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS infrared vision]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;br /&gt;
[[Category:ALS]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116185</id>
		<title>ALS technical notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116185"/>
		<updated>2018-09-12T06:40:10Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Quality level mapping ==&lt;br /&gt;
The rendering quality of ALS effects is controlled by two main sliders, the landmass effects and transition effects. The transition effects slider regulates the quality of overlaid textured, while the landmass effects slider regulates all other aspects of procedural texturing, such as pixel color post-processing (dust, snow or wet terrain effects) and apparent terrain roughness (bump and parallax mapping).&lt;br /&gt;
&lt;br /&gt;
In addition, specific effects for certain terrain types (water, urban, forest, agriculture, etc.) and models in the scene can be switched on separately. In some cases, this may be needed for a consistent visual impression. For example, if a dust effect is used on the terrain, the water needs to be rendered using a separate water shader, otherwise it will appear dusty as well. Likewise, if the Rayleigh haze is used in the highest quality terrain effect, then the highest quality water effect needs to be used to see the same Rayleigh scattering effect on the water.&lt;br /&gt;
&lt;br /&gt;
For technical reasons (landmass and transition control the same shader code) the settings are sometimes mutually dependent, e.g., if the transition quality is set to level 6, it won't have any effect until the landmass quality is also set to level 6.&lt;br /&gt;
&lt;br /&gt;
=== Transition ===&lt;br /&gt;
The mapping of quality to visuals of the transition slider is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| Base texture scheme&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| Alternative hires airport keep effect&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
|&lt;br /&gt;
* Base and overlay texture, runway effect (if landmass is above level 4)&lt;br /&gt;
* Secondary lights on runway and airport keep&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| Base, overlay and hires texture&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Base, overlay, hires, detail, grain, dot and rock texture (if landmass is level 6)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Landmass ===&lt;br /&gt;
{{Note|Quality levels 1 and 2 are reserved to represent fixed pipeline rendering and the &amp;quot;default renderer&amp;quot; in an eventually merged rendering GUI. However, ALS is currently switched on per checkbox and not by quality level, and so they do not have a function.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
| ALS-rendered position-differential haze and light, moonlight&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| &lt;br /&gt;
* Procedural snow cover on terrain&lt;br /&gt;
* Procedural dust and vegetation effects&lt;br /&gt;
* Wet terrain effect with approximate reflection half vector&lt;br /&gt;
* Patchy fog distribution&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Noise bump-mapping and parallax mapping of terrain&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 6&lt;br /&gt;
| (''Requires transition effect level 6'')&lt;br /&gt;
* Wet terrain effect with correct reflection half vector&lt;br /&gt;
* Hires bump mapping and snow patchiness&lt;br /&gt;
* Variable upper haze layer surface&lt;br /&gt;
* Rayleigh haze&lt;br /&gt;
* Secondary lights on all terrain types&lt;br /&gt;
* Slope line and strata effects&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ALS secondary lights ==&lt;br /&gt;
The ALS framework supports a generic implementation of landing lights and a searchlight which are based on a framerate-friendly computation in screen coordinates, i.e., the lights project correctly ''only if the light is close to the viewer'' (typically, that would be from cockpit view). In other words, this is not a full (and rather expensive) computation of light volumes as in Rembrandt, but a much faster test of illuminated screen areas.&lt;br /&gt;
&lt;br /&gt;
[[File:Landing light03.jpg|400px|Cessna 172P using generic ALS landing lights]]&lt;br /&gt;
&lt;br /&gt;
Two landing lights and a searchlight are supported. The landing lights have a fixed position with respect to the aircraft axis (technically, with respect to the default view axis as defined in the respective view), whereas the searchlight follows any offset of the view axis in view mode, i.e., when using the mouse to look around, the searchlight will follow the motion, the landing lights will not. The lights require ALS to run above basic quality level and work on runway and airport keep above transition setting 3 and everywhere else only at highest quality setting. All lights are controlled via properties in &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The names of the properties should be self-explanatory, if for instance if &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/use-searchlight&amp;lt;/code&amp;gt; is set to true, then the searchlight (which always follows the current view axis) is used. &lt;br /&gt;
&lt;br /&gt;
The properties &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light1-offset-deg&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light2-offset-deg&amp;lt;/code&amp;gt; allow to specify angular offsets for the landing light which are then not centered on the view axis. This can be used to simulate one or two landing lights set in the wings.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv2.jpg|400px|Secondary lights vertical offset demo]]&lt;br /&gt;
&lt;br /&gt;
A third offset &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light3-offset-deg&amp;lt;/code&amp;gt; is available which allows for a vertical offset. This is especially useful for tail dagger aircraft.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv.jpg|400px|Secondary lights vertical offset settings]]&lt;br /&gt;
&lt;br /&gt;
The lights can be switched on and off from the [[Property Browser]] for any aircraft without any modifications to the aircraft definition. Implementing them correctly aircraft side thus just involves linking the landing light switches to the ALS control properties and setting the correct angular offsets. Additionally, it is recommended to switch the lights off unless in a cockpit view, as they don't project correctly for any external view.&lt;br /&gt;
&lt;br /&gt;
Range, color, light cone opening angle or intensity of the lights can currently not be configured, and there are no plans to support such a feature in the near future.&lt;br /&gt;
&lt;br /&gt;
All three lights will illuminate fog (if dense enough) and precipitation.&lt;br /&gt;
&lt;br /&gt;
[[File:Als secondary light fog.jpg|400px|ALS generic lights illuminating dense fog]]&lt;br /&gt;
&lt;br /&gt;
== ALS specific features of the model effect ==&lt;br /&gt;
&lt;br /&gt;
In addition to the features supported by the model-combined-deferred effect in all three renderers (normal, light, specular, environment reflection and dirt map), ALS also supports a couple of unique effects (which, if configured, will not have any effect in other renderers.&lt;br /&gt;
&lt;br /&gt;
=== The grain texture  ===&lt;br /&gt;
&lt;br /&gt;
ALS supports a grain texture for models. This is a semi-transparent overlay texture that works just as [[Procedural Texturing#The grain texture|its equivalent for terrain texturing]] and provides the option of generating centimeter-scale details such as rust or discoloration on a surface without having to use huge textures. An example of a surface rendered with grain texture is the image of the USS Vinson flightdeck below:&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain01.jpg|700px|Grain and rain effects on Vinson's flightdeck]]&lt;br /&gt;
&lt;br /&gt;
This is done using the following effect declaration inheriting from '''model-combined-deferred.eff''' as&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt;flightdeck&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;inherits-from&amp;gt;Effects/model-combined-deferred&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
  &amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;image&amp;gt;Models/Geometry/Nimitz/rust_texture.png&amp;lt;/image&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt; &lt;br /&gt;
    &amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
    &amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
    &amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
  &amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The grain texture has the number 7 and needs to be enabled by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the value is set to 1, the grain texture uses the uv-mapping of the underlying surface. If that is very irregular (as in the case of the Vinson flightdeck), alternatively the grain can be mapped in xy-model coordinates if the parameter is set to 2, the uv-mapping of the base texture layer is then discarded.&lt;br /&gt;
&lt;br /&gt;
The resolution of the grain texture with respect to the base coordinate layer is specified by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the number is less than 0, the grain resolution is lower than the base layer. If the parameter is greater than 0, it is higher (note that in the above case, the grain is mapped to (xy) rather than (uv), hence the base size is 1 m, so the grain texture is mapped on a 10x10 m patch on the flightdeck, for which a 1024x1024 pixel texture provides ~1 cm sized details).&lt;br /&gt;
&lt;br /&gt;
=== The rain effect ===&lt;br /&gt;
&lt;br /&gt;
Any number greater than 0 passed to&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
enables the splash effect of raindrops on the surface if it points upward. The surface does not have to be flat for this to work, the effect checks for the surface normal automatically, see the rain enabled for the Citation Bravo.&lt;br /&gt;
&lt;br /&gt;
Thorsten noted about rain splashes: &amp;quot;Works fine here - runway needs to get really wet though before you see them (put the environment slider to max to achieve this quickly, it will take some waiting with just rain on).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain02.jpg|700px|Rain effect on the Citation Bravo]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Glossy surfaces ===&lt;br /&gt;
&lt;br /&gt;
To better treat the environment reflections on a glossy surface, ALS contains two options not present in the other renderers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-type type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/reflection-type&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter can currently be set to 1 or 2 and regulates how the color of the environment reflection is merged with the color of the glossy surface. If set to 1, the shader uses a color mixing as in the other two renderers, if set to 2 it uses a technique called 'grain merge' which gives different weight to the color channels. The reason for introducing type 2 was a grey tint which changed the reflected color in a unrealistic way. With FlightGear 2017.2.0 this will be fixed and  type set to 2 should be obsolete then.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-fresnel-factor type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/reflection-fresnel-factor&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter regulates how strong the Fresnel term of a glossy surface is. Many smooth surfaces reflect much more under shallow angles such that an environment reflection is not very prominent when looking under 90 degrees but dominates the visuals when looking under a grazing angle. The parameter sets the relative strength of a Fresnel reflection with respect to the basic reflection definition which is assumed to hold for vertical viewing (i.e. setting the parameter to 0.8 gives you extra glossiness under shallow angles).&lt;br /&gt;
&lt;br /&gt;
The following comparison shows the default color mixing (upper left) for a reflecting white livery and for grain merge (upper right). In addition, note the enhanced Fresnel reflectivity at the tail and the cowling on the pictures. The lower row shows (left) full reflection with default color mixing and (right) for grain merge. Default color mixing is more physically correct, while grain merge is less correct but preserves white color much better.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model default2.jpg|400px|Effect of color mixing in a reflection]]&lt;br /&gt;
[[File:Reflect Grain merge2.jpg|400px|Effect of grain merge in reflection]]&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model Default Full.jpg|400px|Full reflection with default ]]&lt;br /&gt;
[[File:Reflect Grain Merge Full.jpg|400px|Full reflection with grain merge]]&lt;br /&gt;
&lt;br /&gt;
== The exhaust flame effect ==&lt;br /&gt;
&lt;br /&gt;
Rendering proper flames of e.g. afterburners or rocket thrusters with diffuse edges is notoriously difficult - all solutions based on textured models tend to have unnaturally sharp edges. Usually the particle system is used in such cases, however at high velocities this has other issues - particles become easily separated, making flames look disrupted and detached from the exhaust.&lt;br /&gt;
&lt;br /&gt;
ALS includes a dedicated procedural effect in which the flame is rendered by numerically integrating a 3-dim distribution of glowing emitters inside a bounding box (i.e. re-creates the process by which a real flame would be seen). The function which determines the emitter distribution is partially user-controlled so that a wide range of shapes can be generated.&lt;br /&gt;
&lt;br /&gt;
To use the effect, first the bounding box has to be defined. Note that the shape and alignment of the bounding box needs to be standardized for the effect to work, i.e. you need to use either the default bounding box under Aircraft/Generic/Effects/Thruster/ or make a custom one which fits inside the default box at the same location in model coordinates.&lt;br /&gt;
&lt;br /&gt;
To change position, size and orientation of the bounding box to match with the airplane model, translate, scale and rotate animations or model offsets can later be used.&lt;br /&gt;
&lt;br /&gt;
=== Model definition for effect ===&lt;br /&gt;
This is a standard XML model definition that needs to specify the geometry, all animations and the effect to use. For the geometry you can use the standard ''Aircraft/Generic/Effects/Thruster/thrust_flame.ac'' or make your own. The F-15 uses a slightly different 3D model to allow for the nozzles. The 3D model needs to be big enough to contain the flame, bearing in mind that the flame is drawn as a cylinder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;path&amp;gt;Aircraft/Generic/Effects/Thruster/thrust_flame.ac&amp;lt;/path&amp;gt;&lt;br /&gt;
    &amp;lt;nopreview/&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;scale&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;property alias=&amp;quot;/params/augmentation-alight&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;x-min&amp;gt;0.2&amp;lt;/x-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-min&amp;gt;0.3&amp;lt;/y-min&amp;gt;&lt;br /&gt;
        &amp;lt;z-min&amp;gt;0.3&amp;lt;/z-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-max&amp;gt;1&amp;lt;/y-max&amp;gt;&lt;br /&gt;
        &amp;lt;z-max&amp;gt;1&amp;lt;/z-max&amp;gt;&lt;br /&gt;
        &amp;lt;x-factor&amp;gt;0.472&amp;lt;/x-factor&amp;gt;&lt;br /&gt;
        &amp;lt;y-factor&amp;gt;0.6&amp;lt;/y-factor&amp;gt;&lt;br /&gt;
        &amp;lt;z-factor&amp;gt;0.6&amp;lt;/z-factor&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- on the F-15 we have a property available that controls the ignition of the afterburner. If you do not wish to implement this&lt;br /&gt;
         remove the following animation tag --&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
        &amp;lt;condition&amp;gt;&lt;br /&gt;
            &amp;lt;greater-than&amp;gt;&lt;br /&gt;
                &amp;lt;property alias=&amp;quot;/params/augmentation-ignition&amp;quot;/&amp;gt;&lt;br /&gt;
                &amp;lt;value&amp;gt;0.8&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/greater-than&amp;gt;&lt;br /&gt;
        &amp;lt;/condition&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Aircraft/MyAircraft/Models/Effects/my-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''my-flame.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control how the flame looks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;AB-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
        &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;0.85&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.07&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.15&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.35&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
        &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
        &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
        &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
        &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a detailed version (utilizing 3d noise and a higher sampling resolution) available. This has to be explicitly requested in a derived effect by overriding the default shader choice with the detailed version, i.e. bu inserting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;technique n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;pass&amp;gt;&lt;br /&gt;
     &amp;lt;program&amp;gt;&lt;br /&gt;
         &amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/thrustflame-ALS-detailed.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
     &amp;lt;/program&amp;gt;&lt;br /&gt;
  &amp;lt;/pass&amp;gt;&lt;br /&gt;
  &amp;lt;/technique&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
below the parameter section.&lt;br /&gt;
&lt;br /&gt;
{{Note|The detailed shader uses four times as much performance at least - only use it if you really need it!}}&lt;br /&gt;
&lt;br /&gt;
=== F-15 Afterburner example image === &lt;br /&gt;
The F-15 afterburner flame shown below (at different ambient lighting based on time) uses the parameters above. The main parameters of importance, and therefore to tune, for an aircraft jet engine are the colors, the two densities, the flame radius fraction. The base density is at the start of the flame and this. The F-15 overlays a billboarded image to achieve the diamonds that are interleaved with the ALS drawn flame. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:F-15 afterburner using ALS Thrust Effect.jpg|700px|This shows the F-15 afterburner at different ambient light.]]&lt;br /&gt;
&lt;br /&gt;
The meaning of the parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_shocks&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; and &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_noise&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; are the parameters that control the random noise and the shock diamonds. Both are modestly computationally expensive, i.e. if these effects are not required it is better to switch them off by setting these values to zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(same for the (g,b) channels) set the color. base_flame refers to the part of the flame which is directly attached to the thruster and usually brightest. flame_color_high refers to the high density part of the flame, flame_color_low refers to the low density parts of the flame. (rgb) values always need to be [0:1]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
   &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determine the overall emitter density in the flame and in the base directly at the thruster respectively. There's no formal upper limit for the parameters, but a flame with density 1 already appears fairly opaque.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
governs how much of the bounding box the flame radius at the exhaust nozzle fills. If the flame needs to expand (as for the plume of a thruster operating in vacuum) or needs to bend (as for a flame deflected by the airstream) this parameter needs to be small, if the flame is essentially cylindrical the paramater can be chosen close to 1 to minimize clipping errors. Note that this determines the size of the flame relative to the bounding box - the overall size of the flame should be adjusted by using a scale animation on the bounding box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determined how turbulent the flame looks. noise_strength [0:1] determines how prominently the noise influences the flame and noise_scale (in meters relative to the original bounding box) determines how large the visible patches of turbulence are (given that the original bounding box is not larger than 5 m in the longest direction, the parameter should probably kept between 0.1 and 5).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
influences at what distance shock diamonds appear in the flame. Useful values are perhaps between 0.2 and 5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should take a value of between 0 and 1 and determines how collimated the flame is. For values &amp;gt; 0, the flame is widened - note that this requires a sufficiently small flame radius fraction to avoid clipping errors. For widened flames, the density is automatically lowered and shock diamonds are removed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0.&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be somewhere between 0 and 0.06 and gives a lateral deflection (such as by an airstream) to the flame. Note that this re-positions the origin of the flame in the bounding box to better utilize the bounding box volume, i.e. if you need a dynamical deflection, you also need a translate animation for the bounding box.&lt;br /&gt;
&lt;br /&gt;
Any of those parameters can be adjusted runtime  by replacing the value with &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use&amp;gt;/my-property&amp;lt;/use&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;. Dependent on how &amp;lt;code&amp;gt;/my-property&amp;lt;/code&amp;gt; is created it might be tied though (in particular JSBSim-computed properties are) in which case it is not picked up by the effect framework - you need to copy it via property rule to an untied property then. This allows to render dynamical changes of the flame.&lt;br /&gt;
&lt;br /&gt;
For instance the [[SpaceShuttle - Project Overview|Space Shuttle]] main engines use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;ssme-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r&amp;gt;0.9&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g&amp;gt;0.7&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b&amp;gt;0.5&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r&amp;gt;0.7&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g&amp;gt;0.7&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-collimation&amp;lt;/use&amp;gt;&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-density&amp;lt;/use&amp;gt;&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength&amp;gt;0.3&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale&amp;gt;0.1&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to simulate the change of flame geometry in the thin upper atmosphere during ascent:&lt;br /&gt;
&lt;br /&gt;
[[File:Shuttle flame05.jpg|400px|Space Shuttle main engine flames during early ascent]]&lt;br /&gt;
[[File:Shuttle flame06.jpg|400px|Space Shuttle main engine flames during late ascent]]&lt;br /&gt;
&lt;br /&gt;
Using the deflection parameter, the curved SRB separation motor flames are rendered using&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;SRBsep-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.55&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;-0.06&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flame_sep.jpg|700px|Space Shuttle SRB separation motor flames]]&lt;br /&gt;
&lt;br /&gt;
Application of the effect is not limited to flames, it can also do heat blur (think a very transparent, high-noise dark emitter distribution) or vapour trails and other smoke.&lt;br /&gt;
&lt;br /&gt;
By itself, the effect does however not compute ambient and diffuse light channels, i.e. for non-emissive distributions lighting is the responsibility of the user. One quick way of obtaining a correct fading of color with light in the scene is to create an untied property based on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/rendering/scene/diffuse/red&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and used this to scale all color values.&lt;br /&gt;
&lt;br /&gt;
{{note|Do not use the full (rgb) information in the property tree for ALS, it will produce pronounced color mismatches with the rest of the scene as ALS determines light inside the shader and never uses the properties.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rotor wash ==&lt;br /&gt;
&lt;br /&gt;
ALS provides an interface to render rotor wash on various terrain types - currently this is implemented for the volumetric grass as well as procedural water. This interface needs to be written aircraft-side for the effect to be rendered.&lt;br /&gt;
&lt;br /&gt;
[[File:Rotor wash.jpg|600px|Rotor wash rendered on volumetric grass]]&lt;br /&gt;
&lt;br /&gt;
Aircraft maintainers need to set three parameters in &amp;lt;b&amp;gt;/environment/aircraft-effects/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The position of the downwash column needs to be specified in &amp;lt;i&amp;gt;eye-relative&amp;lt;/i&amp;gt; coordinates by setting &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-x&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-y&amp;lt;/b&amp;gt;. If these are zero, the air column is assumed to be right underneath the eye point, any non-zero values displace the center northward or eastward from the eye point. To work in external views, the displacement needs to be computed by e.g. a Nasal script or property rules, the same is true if the rotor is not close to the eye point.&lt;br /&gt;
&lt;br /&gt;
The strength of the downwash column &amp;lt;i&amp;gt;on the ground&amp;lt;/i&amp;gt; is set by &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-strength&amp;lt;/b&amp;gt;. The parameter influences both the radius in which the effect is visible as well as the overall strength (up to a maximum). Aircraft maintainers need to adjust strength based on parameters like altitude AGL, rotor RPM, rotor radius and whatever else might influence the downwash.&lt;br /&gt;
&lt;br /&gt;
== Chute animation effect ==&lt;br /&gt;
&lt;br /&gt;
The chute animation effect is designed to provide a natural appearance of the deformation and the fluttering motion of a piece of cloth under changing stress.&lt;br /&gt;
&lt;br /&gt;
[[File:Chute seq01.jpg|400px|Drag chute separation sequence 1]] [[File:Chute seq03.jpg|400px|Drag chute separation sequence 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coordinate system ===&lt;br /&gt;
&lt;br /&gt;
The shader assumes that the 3d mesh of the chute is oriented in a particular coordinate system. The z-axis (upward) should extend from the zero point where the various ropes come together to the canopy above through the center of the model. The canopy of the chute should therefore roughly be in the xy plane.&lt;br /&gt;
&lt;br /&gt;
To position the chute correctly with the aircraft, you then need to use appropriate offsets and rotations when loading.&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''mychute.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control the behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;mychute&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/chute&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
	&amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	&amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The meaning of these parameters is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the distance of the branching point of the various lines leading to the canopy (at model coordinate zero) to the edge of the canopy. All transformations affecting the shape of the canopy (in particular the collapse of the canopy if the force is gone) will be applied with respect to this reference plane.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a normalized force applied to the canopy. The chute should be modeled with a deformation corresponding to a force parameter of 1 - any higher value will narrow the chute's radius, deepen the chute's deformation along the z-axis and increase the motion, any lower value will widen chute radius (compare screenshots above) and lessen its depth and slow down motion. The normal parameter range should be from [0:2], any higher or lower may look odd.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	 &amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are deformation modes used to animate a chute after jettison when it is no longer pulled into shape and can flutter through the air. The first one [0:1] is a general collapse into the projection plane with random deformations around, the second one [-1:1] is a gross bending mode of the projection plane itself. Before jettison, these parameters should default to 0.&lt;br /&gt;
&lt;br /&gt;
=== Jettison animation ===&lt;br /&gt;
&lt;br /&gt;
A complete animated jettison sequence is quite complex and would usually require a Nasal sequence taking the chute through a deceleration trajectory (utilizing translation and rotation animations), bending ad folding oscillations and finally some unfolding as it sinks through the air. The Space Shuttle chute uses the following control loop for 10 seconds of jettison dynamics:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var drag_chute_jettison_animation = func (time) {&lt;br /&gt;
&lt;br /&gt;
var dt = getprop(&amp;quot;/sim/time/delta-sec&amp;quot;);&lt;br /&gt;
time = time + dt;&lt;br /&gt;
&lt;br /&gt;
# horizontal motion&lt;br /&gt;
&lt;br /&gt;
var x = 0.0;&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 2.0)&lt;br /&gt;
	{x = -16.0 + 20.0 * time;}&lt;br /&gt;
else&lt;br /&gt;
	{x = 2.0 * time + 5.0 * time * time;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-dist&amp;quot;,x);&lt;br /&gt;
&lt;br /&gt;
# vertical motion&lt;br /&gt;
&lt;br /&gt;
var y = 0.0;&lt;br /&gt;
if (time &amp;gt; 5.0)&lt;br /&gt;
	{&lt;br /&gt;
	y = -2.5 + 0.6 * (time-5.0) * (time-5.0);&lt;br /&gt;
	}&lt;br /&gt;
else 	&lt;br /&gt;
	{&lt;br /&gt;
	y = -0.2 * time;&lt;br /&gt;
	}&lt;br /&gt;
if (y &amp;gt; 12.5) {y=12.5;}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-down&amp;quot;,y);&lt;br /&gt;
&lt;br /&gt;
# fold&lt;br /&gt;
&lt;br /&gt;
var f = 0.5 * time;&lt;br /&gt;
if (f&amp;gt; 1.0) {f = 1.0;}&lt;br /&gt;
if (time &amp;gt; 9.5)&lt;br /&gt;
	{f = 0.25 + 1.5 + (time-9.5);}&lt;br /&gt;
if (time &amp;gt; 6.0)&lt;br /&gt;
	{&lt;br /&gt;
 	f = f -0.3* (time-7.0); &lt;br /&gt;
	if (f&amp;lt;0.1) {f=0.1;}&lt;br /&gt;
	}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-fold&amp;quot;, f);&lt;br /&gt;
&lt;br /&gt;
# rotate&lt;br /&gt;
&lt;br /&gt;
var r = (time - 2.0) * 18.0;&lt;br /&gt;
if (r&amp;gt;90.0) {r=90.0;}&lt;br /&gt;
if (r&amp;lt;0.0) {r=0.0;}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-slant&amp;quot;, r);&lt;br /&gt;
&lt;br /&gt;
# bend&lt;br /&gt;
&lt;br /&gt;
var b = 0;&lt;br /&gt;
if (time &amp;gt; 7.5)&lt;br /&gt;
	{b = 0;}&lt;br /&gt;
else if (time &amp;gt;6.0)&lt;br /&gt;
	{b = 0.75 - 0.5 * (time - 6.0);} &lt;br /&gt;
else if (time &amp;gt; 4.5) &lt;br /&gt;
	{b = (time - 4.5) * 0.5;}&lt;br /&gt;
else {b=0;}	&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-bend&amp;quot;, b);&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 10.0) &lt;br /&gt;
	{&lt;br /&gt;
	print(&amp;quot;Exiting...&amp;quot;);&lt;br /&gt;
	settimer (func { setprop(&amp;quot;/controls/shuttle/drag-chute-deploy-timer&amp;quot;, 0); }, 0.5);&lt;br /&gt;
	return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/test/timer&amp;quot;, time);&lt;br /&gt;
&lt;br /&gt;
settimer( func{ drag_chute_jettison_animation (time); }, 0);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS glass effect ==&lt;br /&gt;
&lt;br /&gt;
As of FlightGear version 3.5, ALS supports a glass effect with dynamic response to the environment which can render, for instance, the splashes of raindrops on the canopy, frost or fogging.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass01.jpg|400px|Frost effect]]&lt;br /&gt;
[[File:Glass07.jpg|400px|Raindrop splashes]]&lt;br /&gt;
&lt;br /&gt;
The base effect properties are controlled via inheritance and the environment response run-time via properties residing in &amp;lt;b&amp;gt;/environment/aircraft-effects&amp;lt;/b&amp;gt;. Derived effects should inherit from &amp;lt;b&amp;gt;Effects/glass&amp;lt;/b&amp;gt;. Any surface using the glass effect will automatically register itself as transparent for use in [[Project Rembrandt| Rembrandt]]. &lt;br /&gt;
&lt;br /&gt;
The glass effect is primarily intended for interior views. In particular, no external fog or haze is rendered for the glass, i.e. if the effect is used in an outside view, it is the responsibility of the aircraft modeler to take care (e.g. with LOD settings or range animations) that no problems in bad visibility occur.&lt;br /&gt;
&lt;br /&gt;
=== Why a separate effect for glass seen from inside? ===&lt;br /&gt;
&lt;br /&gt;
Basically because the two situations are rather different. Slight dirt on the glass against the background of the sky from inside is rather prominent, against the background of the cockpit seen from outside it is not. Visuals from inside are dominated by Mie forward scattering of light, leading to a bright glare effect when looking at dirt, frost, fog or scratches close to the sun. From outside, reflected light rather than transmitted light is dominant. The reflection of any external object on the outside of the glass changes as the aircraft moves, this is not the case for the reflection of the cockpit in the glass seen from the inside. &lt;br /&gt;
&lt;br /&gt;
The viewing situation is also different. From the inside, we usually do not focus the eyes on the plane of the glass but look through it, from the outside the focus of the eyes is often close to the glass surface. For something half a meter before the eye, we also need to apply a lot more resolution and details than for an object typically seen from 10+ meters from the outside.&lt;br /&gt;
&lt;br /&gt;
Add to this that atmospheric fog is never relevant for glass seen from inside but for glass seen from outside, and it suddenly makes sense to use a different effect.&lt;br /&gt;
&lt;br /&gt;
The recommended effect for glass surfaces seen from outside is model-combined-transparent.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rain ===&lt;br /&gt;
Rain splashes will render automatically when the weather system reports rain via environment/rain-norm. In addition, the user can set rain splashes to render via &amp;lt;code&amp;gt;environment/aircraft-effects/ground-splash-norm&amp;lt;/code&amp;gt; (this is intended to allow splashes to be rendered e.g., for water landings of aircraft equipped with floats).&lt;br /&gt;
&lt;br /&gt;
By default, the rain splashes impact from above (more precisely the +z direction in model coordinates). This may be inadequate if the aircraft is moving. However, the shader can not know what the airstream at the glass will be, so the impact vector of rain splashes has to be modeled aircraft-side and set via &amp;lt;code&amp;gt;environment/aircraft-effects/splash-vector-x&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;splash-vector-y&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;splash-vector-z&amp;lt;/code&amp;gt;). These are likewise in model coordinates.&lt;br /&gt;
&lt;br /&gt;
As long as the length of the splash vector is less than 1, just the impact angle will change, as the length of the vector increases to 2, droplets will also be visibly moving. This allows fine control of the visuals dependent on any number of factors desired. A simple Nasal snipped varying the splash vector with airspeed for the F-16 is given below (but ''do not mindlessly copy and expect to work for any aircraft — it won't!''). This example is for normals pointing outwards, if the normals are pointing inwards the vector needs to be inverted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var splash_vec_loop = func(){&lt;br /&gt;
    var airspeed = getprop(&amp;quot;/velocities/airspeed-kt&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    # f16&lt;br /&gt;
    var airspeed_max = 120;&lt;br /&gt;
&lt;br /&gt;
    if (airspeed &amp;gt; airspeed_max) {&lt;br /&gt;
        airspeed = airspeed_max;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    airspeed = math.sqrt(airspeed / airspeed_max);&lt;br /&gt;
&lt;br /&gt;
    var splash_x = -0.1 - 2 * airspeed;&lt;br /&gt;
    var splash_y = 0.0;&lt;br /&gt;
    var splash_z = 1.0 - 1.35 * airspeed;&lt;br /&gt;
&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-x&amp;quot;, splash_x);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-y&amp;quot;, splash_y);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-z&amp;quot;, splash_z);&lt;br /&gt;
&lt;br /&gt;
    settimer(func(){&lt;br /&gt;
        splash_vec_loop();&lt;br /&gt;
    }, 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the timing constant of the loop — running the update per-frame leads to a spurious movement of the coordinate system in which rain is rendered and spoils the effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another method when using JSBSIM would be to use a combination of FCS Functions and Filters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashX&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashx&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashY&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashZ&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashz&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could reduce the above method and eliminate the &amp;quot;filters&amp;quot; by doing the following.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/airspeed-clamped-sqrt&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;  &lt;br /&gt;
                &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;min&amp;gt;&lt;br /&gt;
                            &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                            &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;/min&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashy&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
               &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yet another method (currently used in the c172p) limits movement to a range of table entries. This gives the developer the ability to control the behavior even more.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xa&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.7  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -2.1  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-za&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.17 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.35 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.3  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.9  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-zr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.127 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.29  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;0&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-x&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-y&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-z&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Frost and fogging ===&lt;br /&gt;
&lt;br /&gt;
Frost on the canopy is rendered when environment/aircraft-effects/frost-level is set in the range from 0 to 1. Again, it is up to the aircraft developer to decide at what exterior conditions frosting should happen and whether the aircraft is equipped with heating to remove the frost again.&lt;br /&gt;
&lt;br /&gt;
Fogging is controlled by environment/aircraft-effects/fog-level in the range 0 to 1. Unless a mask is used, fogging is homogeneous across the whole surface (it is really intended to be used with a mask).&lt;br /&gt;
&lt;br /&gt;
=== Tint ===&lt;br /&gt;
&lt;br /&gt;
Tinted glass can be easily created by changing &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;glass-tint type=&amp;quot;vec4d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 1.0&amp;lt;/glass-tint&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to any value desired. This will affect all effects assumed outside of the glass layer (frost and rain splashes) but not fogging inside the glass. Use primarily for development and quick tests, don't misuse the alpha value available here, it has odd side effects.&lt;br /&gt;
&lt;br /&gt;
=== Functional masks ===&lt;br /&gt;
&lt;br /&gt;
If the glass surface is uv-mapped and textured, it is possible to switch on a mask functionality in the inheritance via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;image&amp;gt;my_mask.png&amp;lt;/image&amp;gt;&lt;br /&gt;
	&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
	&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
	&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;use-mask type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-mask&amp;gt;&lt;br /&gt;
&amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The red channel in my_mask.png controls the strength of fogging, full red corresponds to maximal fogging, no red to zero fogging. This allows to selectively model the position of heaters in the cockpit. Use &amp;lt;b&amp;gt;/environment/aircraft-effects/fog-level&amp;lt;/b&amp;gt; to adjust the actual amount of fog runtime.&lt;br /&gt;
&lt;br /&gt;
The green channel of my_mask.png is the amount of reduction of rain in an area. This is intended for airplanes equipped with windshield wipers to partially clear the wiped area of the rain. Whether the windshield wiper is actually on or not is controlled runtime via &amp;lt;b&amp;gt;/environent/aircraft-effects/use-wipers&amp;lt;/b&amp;gt; (1 sets wipers to on).&lt;br /&gt;
&lt;br /&gt;
The blue channel of my_mask.png is reserved for an overlay pattern which will be drawn in an optionally specified &amp;lt;overlay-color&amp;gt; vector (white in the example xml above) - the primary function is to render damage on the glass, but with a different color, also dirt or an alternative more finely controlled frost pattern can be used. The strength of the pattern can be adjusted runtime via &amp;lt;b&amp;gt;/environment/aircraft-effects/overlay-alpha&amp;lt;/b&amp;gt;, allowing dynamical accumulation of dirt or sudden appearance of damage.&lt;br /&gt;
&lt;br /&gt;
Examples for the result of a fog mask and a damage mask are shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Glass12.jpg|400px|Crack pattern using a damage mask]]&lt;br /&gt;
[[File:Glass11.jpg|400px|Partial fogging using a mask texture]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note that by default all the runtime switches for the mask are off / set to zero! Remember to to switch them on when testing the effect!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mie scattering ===&lt;br /&gt;
&lt;br /&gt;
Most glass effects show prominent Mie forward scattering as in reality, i.e. frost patterns or fogging will appear much more prominent when looking almost towards the sun than under any other angle. While the frost pattern is normally not very prominent and one is able to look through unhindered, this changes substantially when looking into the sun, at which point it almost obscures the view.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass08.jpg|400px|Mie scattering of low light on frost]]&lt;br /&gt;
[[File:Glass13.jpg|400px|Morning sun Mie scattering on fog]]&lt;br /&gt;
&lt;br /&gt;
For frost and fog, the strength of the effect is set automatically, but for the damage/dirt layer it is under user control at effect design time. Changing the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;overlay-glare type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/overlay-glare&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from its default value allows to adjust the strength of the glare when looking through the overlay layer close to the sun.&lt;br /&gt;
&lt;br /&gt;
=== Internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
There is support for a reflection of the cockpit interior.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect.jpg|640px|Internal glass cube map reflection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This needs to be provided as a cubemap specific for the airplane and switched on via the flag &amp;lt;use-reflection&amp;gt; set to 1. The relative strength of the reflection can be optionally via &amp;lt;reflection-strength&amp;gt;. The strength of the reflection in the cockpit is dynamically adjusted for a number of factors, among them balance of direct to indirect light, the approximate amount of light falling on the surface seen in the reflection and the amount of direct sunlight falling into the eye.&lt;br /&gt;
&lt;br /&gt;
If the six cubemap faces are called my_cube_map_??.png, then using an effect file called c172p-reflect.eff the inheritance looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-reflect&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/glass&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;images&amp;gt;&lt;br /&gt;
        &amp;lt;positive-x&amp;gt;my_cube_map_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
        &amp;lt;negative-x&amp;gt;my_cube_map_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
        &amp;lt;positive-y&amp;gt;my_cube_map_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
        &amp;lt;negative-y&amp;gt;my_cube_map_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
        &amp;lt;positive-z&amp;gt;my_cube_map_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
        &amp;lt;negative-z&amp;gt;my_cube_map_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
        &amp;lt;/images&amp;gt;&lt;br /&gt;
    &amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;use-reflection type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection&amp;gt;&lt;br /&gt;
    &amp;lt;reflection-strength type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/reflection-strength&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The inheritance call includes all surface objects that use the effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-reflect&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;glas&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;rightwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;leftwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See below (Interior shading), for details on cube_map creation and orientation.&lt;br /&gt;
&lt;br /&gt;
=== Lightmaps for internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
If the cockpit is illuminated at night, the reflection map will not show this change by default. However,the glass effect supports a lightmap for the reflection, which can be used in parallel with the lightmap for the panels to show the reflection of a lit panel at night.&lt;br /&gt;
&lt;br /&gt;
Since the reflection map is a cube map, the lightmap for it has to be as well, the syntax is hence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use-reflection-lightmap type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection-lightmap&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
     &amp;lt;images&amp;gt;&lt;br /&gt;
          &amp;lt;positive-x&amp;gt;Models/Effects/interior/reflection/light-px.png&amp;lt;/positive-x&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-x&amp;gt;Models/Effects/interior/reflection/light-nx.png&amp;lt;/negative-x&amp;gt;   &lt;br /&gt;
          &amp;lt;positive-y&amp;gt;Models/Effects/interior/reflection/light-py.png&amp;lt;/positive-y&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-y&amp;gt;Models/Effects/interior/reflection/light-ny.png&amp;lt;/negative-y&amp;gt;    &lt;br /&gt;
          &amp;lt;positive-z&amp;gt;Models/Effects/interior/reflection/light-pz.png&amp;lt;/positive-z&amp;gt;      &lt;br /&gt;
          &amp;lt;negative-z&amp;gt;Models/Effects/interior/reflection/light-nz.png&amp;lt;/negative-z&amp;gt;      &lt;br /&gt;
      &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The control parameters of the lightmap otherwise parallel those of the [[Model-combined_effect]] or the model interior effect described below, i.e. up to four channels can be independently specified on the lightmap.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
By default, rain and frost are mapped to the shape of the canopy using coordinate systems that adapts to the splash vector and the canopy shape. This requires no particular action aircraft-side except to provide the bare geometry of a canopy/windshield, but may not be satisfactory in all instances - in particular for near vertical cockpit side windows the scheme does poorly.&lt;br /&gt;
&lt;br /&gt;
There are two alternative coordinate maps available in this case, controlled by the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;surface-mapping-scheme type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/surface-mapping-scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 1, the uv-mapping of the surface is used (it has to exist of course). For this to work properly, the uv-mapping needs to be sufficiently regular and roughly preserve the mapped area.&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 2, a local orthonormal system based on the normals of the surface is constructed. This no longer takes the splash vector consistently into account  and works poorly for surfaces which are flat in the (xy)-plane, but gives decent result for side windows.&lt;br /&gt;
&lt;br /&gt;
== The HUD effect ==&lt;br /&gt;
&lt;br /&gt;
The HUD effect is a variant of the glass effect designed to render the visuals of a head-up display (HUD) closer to real life. This only works if the HUD is custom-created via [[Canvas]], not via the native FG HUD mechanism as the latter by-passes the effect framework.&lt;br /&gt;
&lt;br /&gt;
The effect takes the same configuration options as the glass effect (i.e. it can render frost, damage, scratches, glare,...) but in addition it runs a blur over the HUD image and alters the color distribution of the projected symbols to de-saturate the bright parts in the center. The result looks less monochromatic and more like light projected onto a surface (left: bare canvas right: HUD effect)&lt;br /&gt;
&lt;br /&gt;
[[File:HUD effect.jpg|800px|Comparison between a bare canvas HUD (left) and the ALS HUD shader run over it (right)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
The effect is used from the model file by assigning it to the surface that also carries the canvas texture of the HUD via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Effects/hud&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;HUDImage&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should usually work out of the box, but if the HUD brightness should be changeable or the glass properties adjusted, a derived effect needs to be created.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
In addition to the parameters supported by the glass shader (which, for instance in the case of rain splashes, may or may not be appropriate for a HUD, this is left at user's discretion), the HUD effect takes the following special parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;brightness&amp;gt;1.0&amp;lt;/brightness&amp;gt;&lt;br /&gt;
   &amp;lt;sample-res&amp;gt;0.0006&amp;lt;/sample-res&amp;gt;&lt;br /&gt;
   &amp;lt;sample-far&amp;gt;2.5&amp;lt;/sample-far&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first one is the relative brightness setting of the HUD (which should equal the alpha value assigned to the canvas image of the symbols). This parameter is used to de-saturate colors in the symbol centers.&lt;br /&gt;
&lt;br /&gt;
Remaining two parameters represent the size and shape of the blur Kernel being used. The sample resolution (sample-res) determines the overall size of the blur region, the farthest sample (sample-far) how far out the tails of the blur region extend.&lt;br /&gt;
&lt;br /&gt;
Note: The number of sampling steps is not computed adaptive to these parameters, if the steps get too coarse, then multiple image echoes instead of a proper blur will be generated - adjust these parameters with care (if at all).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The display effect ==&lt;br /&gt;
&lt;br /&gt;
Like the HUD effect, the display effect augments the visuals of a canvas, but in this case it simulates the effects on a multi-function display in cockpit, i.e. emissive light from a dark background.&lt;br /&gt;
&lt;br /&gt;
For that reason, the effect takes the same set of configuration parameters as the [[#The ALS interior model effect|interior model effect]], i.e. it can be supplied for instance with an opacity map.&lt;br /&gt;
&lt;br /&gt;
The expected and tested structure of the effect is that the display content is rendered on a canvas with transparent background which in turn is above a different, dark-colored surface which stands for the display background. The best visuals are achieved when aircraft-internal shadows are rendered via opacity map on the dark surface and the corresponding contrast effects to the transparent canvas.&lt;br /&gt;
&lt;br /&gt;
Currently the effect does three major things:&lt;br /&gt;
&lt;br /&gt;
* at low light, it can make overly bright displays look slightly blurry and difficult to read as well as de-saturate the colors. This simulates the effects of a too-bright display on the eye and should prompt the user to dim the display.&lt;br /&gt;
&lt;br /&gt;
[[File:Display effect03.jpg|640px|Display effect: blur at low light (left)]]&lt;br /&gt;
&lt;br /&gt;
* at strong direct light, the effect can extinct the display content if it is set too dim. This should prompt the user to increase display brightness&lt;br /&gt;
&lt;br /&gt;
[[File:Display effect04.jpg|640px|Display effect: extinction at strong illumination]]&lt;br /&gt;
&lt;br /&gt;
* finally, if glancing light falls onto the display, the effect can render dust. Note that unlike normal diffuse lighting, the dust appears really strongest when the light almost hits the display from the side.&lt;br /&gt;
&lt;br /&gt;
[[File:Display shader dust.jpg|640px|Display effect: dust]]&lt;br /&gt;
&lt;br /&gt;
* in addition to that, the effect contains the same grain map the interior model effect offers. This can be used e.g. to superimpose a pixel raster (to simulate a CRT screen) or to dim the edges of the display as compared to the center as desired.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
The effect is used from the model file by assigning it to the surface that also carries the canvas texture of the display via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Effects/model-interior-display&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;DisplayImage&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If brightness changes of the display need to be simulated, the aircraft needs to pass parameters to the effect, so usually a derived effect would be created and assigned instead of the base effect in the example above.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
== The ALS interior model effect  ==&lt;br /&gt;
&lt;br /&gt;
Since the interior of a cockpit is a large part of what a pilot gets to see in-flight, but this interior represents a rather special situation (light is reduced as it falls through windows, it may have artificial light, there is never any fog or haze,...) ALS offers a separate effect to specifically render the interior of a plane.&lt;br /&gt;
&lt;br /&gt;
This effect also includes optional features which will be available at higher quality settings of the model shader.&lt;br /&gt;
&lt;br /&gt;
=== Interior shadows and tinted glass effect ===&lt;br /&gt;
&lt;br /&gt;
With FlightGear version 3.5 and above, ALS now supports interior shading; i.e. the sun shining through the windows and casting shadows on the panel.&lt;br /&gt;
&lt;br /&gt;
[[File:interior01.jpg|640px|Interior shading effect]]&lt;br /&gt;
&lt;br /&gt;
This effect is based on an opacity map - a cube map of textures which tells the renderer where the cockpit is transparent and where not. The opacity map has to be created beforehand, which allows to make it quite detailed. In this map, white stands for a completely transparent surface, black for an opaque surface, colors for tinted glass which will create a colored light spot in the cockpit, grey hues for partial shadowing allowing to paint dirt effects onto the windows, and caustics can be drawn using the alpha channel: (1-alpha) will be used as an enhancement of the light at a certain spot.&lt;br /&gt;
&lt;br /&gt;
The effect is typically declared as derived by inheritance using an effect file such as c172-interior.eff which looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior-glass&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
	  &amp;lt;images&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-x&amp;gt;Models/Effects/interior/clr_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-x&amp;gt;Models/Effects/interior/clr_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-y&amp;gt;Models/Effects/interior/clr_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-y&amp;gt;Models/Effects/interior/clr_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-z&amp;gt;Models/Effects/interior/clr_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-z&amp;gt;Models/Effects/interior/clr_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
	  &amp;lt;/images&amp;gt;&lt;br /&gt;
	&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-center type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 0.5 0.0 0.3&amp;lt;/opacity-cube-center&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-scale type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.5 0.5 0.7&amp;lt;/opacity-cube-scale&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-angle type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/opacity-cube-angle&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is called by inheritance in the model.xml file.&lt;br /&gt;
&lt;br /&gt;
Imagine the opacity map as a box surrounding the cockpit and trying to closely follow its contours. The origin in the box needs to be placed into the center of the cockpit, which is what &amp;lt;b&amp;gt;&amp;lt;opacity-cube-center&amp;gt;&amp;lt;/b&amp;gt; does. Each of the three dimensions then needs to be stretched to roughly fit the layout of the canopy, this is done by &amp;lt;b&amp;gt;&amp;lt;opacity-cube-scale&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If opacity map center and scale are wrong, you will still see shadows, but they won't match the real cockpit layout (the lightspot of a window will be seen displaced and at a different size of the real window). Thus, carefully measuring the best box layout in a 3d tool is moderately important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aircraft-side the effect is called as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;PilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;CopilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;panel_1_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;InstrumentCover.001&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Panel_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Throttle&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Mixture&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Pedestal&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;TrimWheel&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;ParkingBrake&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;BackSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;FuelSelectorFace&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each object that you want the shadow effect to fall on must be included in the inheritance.&lt;br /&gt;
&lt;br /&gt;
Unless you supply a path, the cube_.png's need to reside in the same directory as the model.xml where you added the &amp;lt;effect&amp;gt; tag pair that calls c172-interior.eff, not where you put the aircraft_interior.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The orientation of the faces of each cube have to be adjusted based on the positive and negative axis of the model.&lt;br /&gt;
&lt;br /&gt;
For example, using the c172p model as a reference.&lt;br /&gt;
&lt;br /&gt;
The tail, right wing and top on the model are positive inside Blender. So the cube faces are laid out as follows.&lt;br /&gt;
&lt;br /&gt;
Note: Depending on the image's orientation when photographed the rotation direction will vary. This is assuming the images are being taken from the center of the cockpit looking out. Using compass headings to describe how to rotate the images.&lt;br /&gt;
&lt;br /&gt;
px (tail) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nx (nose) rotate 90 deg from N or S to E&lt;br /&gt;
&lt;br /&gt;
py (starboard/right) from N do not rotate&lt;br /&gt;
&lt;br /&gt;
ny (port/left) from N rotate 180 deg to S&lt;br /&gt;
&lt;br /&gt;
pz (top) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nz (bottom) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
[[File:C172p-cube.jpg|640px|Cube map layout of the c172p]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With Blender, it's pretty easy to create the cubemap.&lt;br /&gt;
&lt;br /&gt;
1. Add a camera where the cubemap will be. Set the FOV to 90 degrees.&lt;br /&gt;
2. Set the resolution to 1024x1024 (or any other square, power-of-two size).&lt;br /&gt;
3. Hide all lights and windows; disable ambient lighting (set it to black) and turn off ambient occlusion.&lt;br /&gt;
4. Set the world color to white.&lt;br /&gt;
5. Enable the compositor and add an invert node.&lt;br /&gt;
6. Render and save the six views as you would normally.&lt;br /&gt;
7. Add dirt, tinted glass color and caustics by hand&lt;br /&gt;
&lt;br /&gt;
This process depends on the model setup but it should work for most aircraft with a few tweaks.&lt;br /&gt;
&lt;br /&gt;
==== Cubemap Kit for Blender ====&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-shadow-blender-instructions.png|320px|How to make an interior cubemap with the cubemap kit]]&lt;br /&gt;
&lt;br /&gt;
See [http://chateau-logic.com/content/flightgear-interior-shadow-cubemap-kit flightgear-interior-shadow-cubemap-kit] for a premade kit to create the cubemap and the .eff sample file to use it.&lt;br /&gt;
&lt;br /&gt;
==== Important Notes ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Currently (May 2015) the effect does not deal gracefully with child models included into the main model with offsets and/or rotations because these introduce a different coordinate system in which the shadow does not match. The general idea of a code solution is known, but not implemented. Right now this can only be addressed by explicitly positioning child models in the *.ac file and not using any offsets when including them.&lt;br /&gt;
&lt;br /&gt;
=== ALS flashlight ===&lt;br /&gt;
&lt;br /&gt;
This effect is meant to imitate a hand held flashlight for use in getting instruments in the cockpit turned on in dark conditions.&lt;br /&gt;
It is almost identical in nature to ALS searchlight only it is applied using interior-model.eff.&lt;br /&gt;
It has two user defined light color filters that can be applied and also a user defined light radius setting.&lt;br /&gt;
&lt;br /&gt;
[[File:ALS flashlight.jpg|600px|ALS flashlight effect]]&lt;br /&gt;
&lt;br /&gt;
To implement this effect use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
A full definition looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-one type=&amp;quot;vec3d&amp;quot;&amp;gt;0.5 0.5 0.5&amp;lt;/light-filter-one&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-two type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.2 0.2&amp;lt;/light-filter-two&amp;gt;&lt;br /&gt;
	&amp;lt;light-radius type=&amp;quot;float&amp;quot;&amp;gt;13&amp;lt;/light-radius&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the example above light-filter-one is soft white light and light-filter-two is a soft red light.&lt;br /&gt;
&lt;br /&gt;
After defining as above you can turn it on using the following property&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 1 is light-filter-one&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 2 is light-filter-two&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The flashlight effect inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
At lowest quality level, the effect supports an implicit lightmap, i.e. a color range of the basic texture can be selected and declared to act as a lightmap. This is specifically useful to render panel backlighting as in the example below:&lt;br /&gt;
&lt;br /&gt;
[[File:Ilightmap.jpg|600px|An implicit lightmap used to simulate a backlit panel]]&lt;br /&gt;
&lt;br /&gt;
The effect is off by default and switched on by setting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/implicit-lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following parameters are available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-tag-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-tag-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the base color to be tagged, i.e. if the panel labels to be illuminated at night are white, the color needs to be set to white.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-low type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/implicit-lightmap-threshold-low&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-high type=&amp;quot;float&amp;quot;&amp;gt;1.5&amp;lt;/implicit-lightmap-threshold-high&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The thresholds determine how similar a color may be to the base color in order to be still illuminated. The measure is the Euklidean distance of the color vectors. The lower thresholds determines when illumination will start to fade, the higher threshold at what distance in color space illumination will no longer take place. The thresholds have to be adapted to the specific situation - the technique works best for high-contrast panels (white labels on black background) and may not work at all for low contrast panels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-emit-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-emit-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The emit color specifies at which color the pixel will show if it is tagged (see above) and the implicit lightmap is on (see below) - set this to the color of the backlight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-intensity type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/implicit-lightmap-intensity&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the intensity determines how brightly the illuminated pixel will shine.&lt;br /&gt;
&lt;br /&gt;
Ambiance lighting can be simulated with the following tags.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-r type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-r&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-g type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-g&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-g&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-b type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-b&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example note the use of the &amp;quot;use&amp;quot; tag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be any defined property or static value.&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The implicit lightmap inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Irradiance maps ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In the simplest rendering schemes, diffuse and specular light are assumed to be highly directional (i.e. it illuminates lit surfaces only) while ambient light is taken to be omnidirectional.&lt;br /&gt;
&lt;br /&gt;
In reality, that is hardly ever true. In a typical outside location, ambient light is mainly coming from the sky above (which is why the ground underneath a car is dark even in the absence of directional light when the sky is overcast and the sun is not visible). In an enclosed space (like a room, or an aircraft cockpit), ambient light has to fall through the windows, i.e. is mainly not coming above but falling in horizontally.&lt;br /&gt;
&lt;br /&gt;
The directional dependence is not very strong though, yet it leaves measurable effects. In rendering, this can be accounted for by irradiance maps. In the following, the interior of the C-172p is rendered in the first case using omnidirectional ambient light, in the second case using an irradiance map giving the ambient light the directionality of the cabin windows, i.e. the light falls in predominantly horizontally (in addition, a grain map is superimposed to provide structure). Note how the spatial structure of the roof, looking bland when rendered in omnidirectional light is brought out by the irradiance map.&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-irradiance01.jpg|400px|C-172p cabin interior rendered without irradiance and grain map]]&lt;br /&gt;
[[File:Als-interior-irradiance02.jpg|400px|C-172p cabin interior rendered with irradiance and grain map]]&lt;br /&gt;
&lt;br /&gt;
Irradiance mapping is configured by the following parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-type type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/irradiance-map-type&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-strength type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/irradiance-map-strength&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several pre-configured irradiance map functions which can be chosen by map type. &lt;br /&gt;
&lt;br /&gt;
0: (default) omndirectional light&lt;br /&gt;
1: light predominantly coming from above (most appropriate for fighter cockpits)&lt;br /&gt;
2: light predominantly coming from the horizon (most appropriate for GA aircraft)&lt;br /&gt;
&lt;br /&gt;
The strength of the irradiance map regulates how pronounced the asymmetry of the map will be. A strength of zero always makes the light omnidirectional, whereas a strength of 1 implies that no light is coming from any direction 90 degree to the main direction (i.e. for the option 2, a strength of 1.0 means that no ambient light will fall in from above or below and that hence horizontal surfaces will appear pitch black unless direct light falls on them)&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The irradiance map inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Explicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In addition to the implicit lightmap, it is also possible to explicitly specify a lightmap. The syntax for this exactly parallels the syntax of the [[Model-combined_effect]] which supplies lightmaps for the exterior.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/MyAircraft/Effects/my_lightmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-multi type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/lightmap-multi&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-factor type=&amp;quot;float&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0&amp;lt;/lightmap-factor&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 &amp;lt;/lightmap-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a single channel lightmap in which pixel color times the lightmap color provides the illumination. Using the multi-channel function, up to four different maps can be specified in which the (rgba) values of a pixel encode where the light falls and the associated lightmap color what color the illumination takes. Each of these maps can be switched on and off or dimmed in intensity independently.&lt;br /&gt;
&lt;br /&gt;
=== Grain map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
The grain map sets a repeating hires overlay texture which can supply a very credible illusion of structure to a surface for cheap. The syntax exactly parallels that of the [[Model-combined_effect]] ALS grain feature described above.&lt;br /&gt;
&lt;br /&gt;
For instance, the following&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/Effects/MyGrainmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;10&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a grain overlay with a 10-time higher resolution over the base texture layer.&lt;br /&gt;
&lt;br /&gt;
== ALS procedural lights ==&lt;br /&gt;
&lt;br /&gt;
The ALS framework supports procedurally generated lights (for instance aircraft position lights, strobe lights,... ) for aircraft and models. Note that the effect produces the visuals of the lights themselves, but they do not illuminate their surroundings.&lt;br /&gt;
&lt;br /&gt;
=== Why procedural lights? ===&lt;br /&gt;
&lt;br /&gt;
Traditionally aircraft position lights have been implemented as billboarded emissive textures. This technique is limited in scope, as it has difficulty producing a directional light or changes in the light appearance (for instance glare) with changed scene lighting. The ALS procedural lights are designed to give visuals consistent with the auto-generated scene lights (runway lighting, street lights) and support configurable directionality, glare and even the illumination of fog by the lights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic implementation ===&lt;br /&gt;
&lt;br /&gt;
The base of the light is a texture quad which has Effects/procedural-light.eff assigned. Start from including the template provided into your model as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;model&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;/Models/Effects/procedural_light.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
        &amp;lt;offsets&amp;gt;&lt;br /&gt;
            &amp;lt;x-m&amp;gt; 0 &amp;lt;/x-m&amp;gt;&lt;br /&gt;
            &amp;lt;y-m&amp;gt; 0 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
            &amp;lt;z-m&amp;gt; 2 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
        &amp;lt;/offsets&amp;gt;&lt;br /&gt;
 &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and configure from there according to your own needs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not billboard the light via animation!&amp;lt;/b&amp;gt; The GLSL code will take care of the billboarding. Use a scale animation to change the size of the light, do not change the quad (the *.ac) itself in size, the shader code requires its geometry to be fixed.&lt;br /&gt;
&lt;br /&gt;
The lights are currently not supported in the default or Rembrandt renderer and will simply be invisible in these frameworks.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the light ===&lt;br /&gt;
&lt;br /&gt;
Make your own derived effect inheriting from Effects/procedural-light.eff and assign it in the xml wrapper of the light.&lt;br /&gt;
&lt;br /&gt;
====The base light color set====&lt;br /&gt;
&lt;br /&gt;
The base light color can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These take the normal set of values ranging from 0 to 1. &lt;br /&gt;
&lt;br /&gt;
====Light full intensity in the center====&lt;br /&gt;
&lt;br /&gt;
Now the light appears at full intensity in the center can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea behind this is that lights give a better visual appearance if their center is rendered visually brighter and de-saturated, but this occurs only if the light is at full intensity.&lt;br /&gt;
&lt;br /&gt;
There are no sanity checks done, you can assign any center color you like even if this makes no sense - you can change center color or darken it, so use with care.&lt;br /&gt;
&lt;br /&gt;
====Runtime change the light intensity====&lt;br /&gt;
&lt;br /&gt;
To runtime change the light intensity, assign&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to a property and change that property in the range from 0 to 1. Eg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;intensity_scale&amp;gt;&lt;br /&gt;
       &amp;lt;use&amp;gt;/rendering/nav-lights-factor&amp;lt;/use&amp;gt;&lt;br /&gt;
     &amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Set directional lights====&lt;br /&gt;
&lt;br /&gt;
For directional lights, you need to assign a pointing vector in aircraft coordinates into which the light cone points and set the directionality flag to true to activate the computations. This is done via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;-1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
    &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It would be customary to pass a normalized vector, but if you don't know how to do it, the shader will do it for you. By assigning properties to the pointing coordinates, the light direction can be changed runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not use a rotation animation to change the light direction - it won't work.&amp;lt;/b&amp;gt; Make the pointing vector properties and change them to your needs.&lt;br /&gt;
&lt;br /&gt;
====Fading of a directional light====&lt;br /&gt;
[[File:Directional light.jpg|thumb|Explanation of a light radiation pattern]]&lt;br /&gt;
The fading of a directional light away from the pointing axis is controlled by passing angles (or rather sines of angles).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
    &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Up to inner_angle, the light will have full intensity. From inner to outer angle the light will linearly fade to outer_gain. From outer angle to zero angle, the light intensity will linearly fade to zero.&lt;br /&gt;
&lt;br /&gt;
====Strobe effect====&lt;br /&gt;
&lt;br /&gt;
For get an automatic strobe effect you can set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to true. If you want your own strobe pattern, generate a strobe function and use &amp;lt;b&amp;gt;intensity_scale&amp;lt;/b&amp;gt; instead to pass it to the shader.&lt;br /&gt;
&lt;br /&gt;
=== Complete example ===&lt;br /&gt;
&lt;br /&gt;
Here's the left nav light of the C-172p:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;name&amp;gt;procedural-light-nav-left&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/procedural-light&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.000&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
        &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Arc is 110 deg, is 55 deg per side, giving 35 deg from wing --&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.7002075382097097&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
        &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Angles are 0.0 at 0 deg from pointing direction, 1.0 at&lt;br /&gt;
             90/-90 deg, and 0.0 at 180/-180 deg.&lt;br /&gt;
&lt;br /&gt;
             For left navigation light we use -0/-35 .. +110/+145 for&lt;br /&gt;
             the inner/outer range. This gives an arc of 110/180 deg,&lt;br /&gt;
             or 55/90 deg from center.&lt;br /&gt;
&lt;br /&gt;
             Value = sin(angle in degrees)&lt;br /&gt;
&lt;br /&gt;
             0.8191520442889918 = 55 deg (* 2 = 110 deg inner angle)&lt;br /&gt;
             1.0000 = 90 deg (* 2 = 180 deg outer angle)&lt;br /&gt;
        --&amp;gt;&lt;br /&gt;
        &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.8191520442889918&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
        &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.982547593563&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
The Cessna 182 by Heiko Schulz and Gilberto Agostinho with procedural lights activated:&amp;lt;br&amp;gt;&lt;br /&gt;
:''(To percieve the effect well, you probably have to darken your room and switch to fullscreen)''&lt;br /&gt;
[[File:Cessna 182 with procedural lights.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
===Move dynamically the procedural light===&lt;br /&gt;
&lt;br /&gt;
The position of a procedural light is declared in the '''&amp;lt;model&amp;gt;''' section, within the '''&amp;lt;PropertyList&amp;gt;''' XML code, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;procedural-light-gear-white-left&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;path&amp;gt;Effects/lights/procedural_light_gear_white.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
      &amp;lt;offsets&amp;gt;&lt;br /&gt;
          &amp;lt;x-m&amp;gt; -3.08&amp;lt;/x-m&amp;gt;&lt;br /&gt;
          &amp;lt;y-m&amp;gt; -0.21 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
          &amp;lt;z-m&amp;gt; -1.18 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
      &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tag ''procedural-light-gear-white-left'' is very important because is the object name. This name will be used as the reference object.&amp;lt;BR&amp;gt;Next, we can define an animation in the same xml file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;GearFrontalDoor&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;gear/gear/position-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;axis&amp;gt;&lt;br /&gt;
          &amp;lt;x1-m&amp;gt;  -3.00240&amp;lt;/x1-m&amp;gt;&lt;br /&gt;
          &amp;lt;y1-m&amp;gt;  1.0&amp;lt;/y1-m&amp;gt;&lt;br /&gt;
          &amp;lt;z1-m&amp;gt;  -1.02906&amp;lt;/z1-m&amp;gt;&lt;br /&gt;
          &amp;lt;x2-m&amp;gt;  -3.00240&amp;lt;/x2-m&amp;gt;&lt;br /&gt;
          &amp;lt;y2-m&amp;gt;  -1.0&amp;lt;/y2-m&amp;gt;&lt;br /&gt;
          &amp;lt;z2-m&amp;gt;  -1.0290&amp;lt;/z2-m&amp;gt;&lt;br /&gt;
      &amp;lt;/axis&amp;gt;&lt;br /&gt;
      &amp;lt;interpolation&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.25&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.50&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;60&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.75&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;30&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;0&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
      &amp;lt;/interpolation&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''procedural light'' object code is this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS fuselage shadow effect ==&lt;br /&gt;
ALS supports the manipulation of a (simplified) ground shadow. This effect uses an existing simplified shadow animation configuration and by default uses the gear-agl-m property to calculate the ground placement of that simplified shadow.&lt;br /&gt;
&lt;br /&gt;
The system, techniques for using it, and several working examples are on [https://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=24859&amp;amp;start=135 this extensive forum thread about the ALS shadow effects].&lt;br /&gt;
&lt;br /&gt;
[[File:Alsshadow.jpg|800px|ALS Shadow]]&lt;br /&gt;
&lt;br /&gt;
The effect can be applied easily in any aircraft that report the gear-agl-m property by simply adding a declaration inheriting from shadow.eff.&lt;br /&gt;
&lt;br /&gt;
If the aircraft does not support the gear-agl-m property, (notably JSBSim), you need to create a [[Autopilot configuration reference | Property Rule]] to pass a supported AGL data to the gear-agl-m property. In this case we use altitude-agl-ft converted to meters using a property rule configuration file.&lt;br /&gt;
&lt;br /&gt;
For the first example we'll use the &amp;quot;supported gear-agl-m&amp;quot; method for aircraft that don't require a property rule.&lt;br /&gt;
&lt;br /&gt;
Simply add the following inheritance declaration after you declare your shadow animation statement.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;name_of_the_shadow_object&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the non-ALS simplified shadow code you normally use a &amp;quot;translate&amp;quot; animation to position the shadow on the ground.&lt;br /&gt;
When using the ALS method you must either remove, comment out, or apply a condition to restrict its use to non ALS shadow applications, because ALS is responsible for computing the shadows ground position.&lt;br /&gt;
&lt;br /&gt;
Here is how we apply a condition to the translation to limit it effect to non-ALS application only.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A complete shadow animation block looks like this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- opaque objects --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- transparent objects --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;not&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/rembrandt/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;/not&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;noshadow&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- pitch --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/pitch-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;-1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;1&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- roll --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/roll-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;1&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For aircraft requiring a [[Autopilot configuration reference | Property Rule]] there are a couple extra steps.&lt;br /&gt;
&lt;br /&gt;
In aircraft-set.xml you add the property rule call to the &amp;quot;configuration file&amp;quot; in between the PropertyList/sim/systems tag pairs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;property-rule n=&amp;quot;101&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;gear_agl-m&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;Aircraft/c172p/Systems/gearAGL.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
&amp;lt;/property-rule&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: the n=&amp;quot;101&amp;quot; needs to be =+100 as -100 is reserved for system wide property rules.&lt;br /&gt;
In the above example 101 was used because 100 was already being used by a previous property rule definition.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;configuration file&amp;quot; normally goes in /Systems.&lt;br /&gt;
In this example we named the configuration file /Systems/gearAGL.xml.&lt;br /&gt;
&lt;br /&gt;
Here is the complete /Systems/gearAGL.xml configuration file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;filter&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;reference&amp;gt;6&amp;lt;/reference&amp;gt;&lt;br /&gt;
    &amp;lt;output&amp;gt;/position/gear-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
  &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
What the configuration file does is convert the input of altitude-agl-ft to the output of (((altitude-agl-ft)-6)*0.3048) or (convert ft-6 to m) and pass it to /position/gear-agl-m.&lt;br /&gt;
 &lt;br /&gt;
See [[Autopilot configuration reference | Input and reference properties or values &amp;lt;input&amp;gt; and &amp;lt;reference&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
== ALS 3d shadow volume effect ==&lt;br /&gt;
What might be considered the next level of realism using a relatively &amp;quot;cheap&amp;quot; shadow effect is to use a 3d volume shadow.&lt;br /&gt;
&lt;br /&gt;
[[File:Shadow vol02.jpg|800px|ALS 3d Shadow Volume]]&lt;br /&gt;
&lt;br /&gt;
The procedure to implement the ALS shadow volume is similar to the ALS-shadow above with a few modifications.&lt;br /&gt;
&lt;br /&gt;
First you have to have a 3d shadow volume model of the aircraft you are applying the effect to. This model should be a low poly model that is optimized to be as little of a footprint as possible.&lt;br /&gt;
&lt;br /&gt;
A property rule is required, same as above. This is used to generate the above ground altitude in meters, (altitude-agl-m). The &amp;quot;altitude-agl-m&amp;quot; is used to place the shadow close to the ground in real time at an FDM rate of execution.&lt;br /&gt;
{{note|Do not confuse &amp;quot;altitude-agl-m&amp;quot; with the other type of non-3d ALS-shadow property of &amp;quot;gear-agl-m&amp;quot;. The shaders involved use these two different properties respectively for the two different effect. They are not interchangeable.}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
   &amp;lt;filter&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
      &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
      &amp;lt;reference&amp;gt;1.0&amp;lt;/reference&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;/position/altitude-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The other difference from the ALS-shadow above is that it uses a different inherited effect.&lt;br /&gt;
Instead of&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
you use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow-vol&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make sure there is no duplicate 3d model shown in other renderers besides ALS it is also important to use a different select animation:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- hide 3d shadow in non ALS mode --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Procedural Texturing]]&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS infrared vision]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;br /&gt;
[[Category:ALS]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116184</id>
		<title>ALS technical notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116184"/>
		<updated>2018-09-12T06:38:11Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* The display effect */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Quality level mapping ==&lt;br /&gt;
The rendering quality of ALS effects is controlled by two main sliders, the landmass effects and transition effects. The transition effects slider regulates the quality of overlaid textured, while the landmass effects slider regulates all other aspects of procedural texturing, such as pixel color post-processing (dust, snow or wet terrain effects) and apparent terrain roughness (bump and parallax mapping).&lt;br /&gt;
&lt;br /&gt;
In addition, specific effects for certain terrain types (water, urban, forest, agriculture, etc.) and models in the scene can be switched on separately. In some cases, this may be needed for a consistent visual impression. For example, if a dust effect is used on the terrain, the water needs to be rendered using a separate water shader, otherwise it will appear dusty as well. Likewise, if the Rayleigh haze is used in the highest quality terrain effect, then the highest quality water effect needs to be used to see the same Rayleigh scattering effect on the water.&lt;br /&gt;
&lt;br /&gt;
For technical reasons (landmass and transition control the same shader code) the settings are sometimes mutually dependent, e.g., if the transition quality is set to level 6, it won't have any effect until the landmass quality is also set to level 6.&lt;br /&gt;
&lt;br /&gt;
=== Transition ===&lt;br /&gt;
The mapping of quality to visuals of the transition slider is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| Base texture scheme&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| Alternative hires airport keep effect&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
|&lt;br /&gt;
* Base and overlay texture, runway effect (if landmass is above level 4)&lt;br /&gt;
* Secondary lights on runway and airport keep&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| Base, overlay and hires texture&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Base, overlay, hires, detail, grain, dot and rock texture (if landmass is level 6)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Landmass ===&lt;br /&gt;
{{Note|Quality levels 1 and 2 are reserved to represent fixed pipeline rendering and the &amp;quot;default renderer&amp;quot; in an eventually merged rendering GUI. However, ALS is currently switched on per checkbox and not by quality level, and so they do not have a function.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
| ALS-rendered position-differential haze and light, moonlight&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| &lt;br /&gt;
* Procedural snow cover on terrain&lt;br /&gt;
* Procedural dust and vegetation effects&lt;br /&gt;
* Wet terrain effect with approximate reflection half vector&lt;br /&gt;
* Patchy fog distribution&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Noise bump-mapping and parallax mapping of terrain&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 6&lt;br /&gt;
| (''Requires transition effect level 6'')&lt;br /&gt;
* Wet terrain effect with correct reflection half vector&lt;br /&gt;
* Hires bump mapping and snow patchiness&lt;br /&gt;
* Variable upper haze layer surface&lt;br /&gt;
* Rayleigh haze&lt;br /&gt;
* Secondary lights on all terrain types&lt;br /&gt;
* Slope line and strata effects&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ALS secondary lights ==&lt;br /&gt;
The ALS framework supports a generic implementation of landing lights and a searchlight which are based on a framerate-friendly computation in screen coordinates, i.e., the lights project correctly ''only if the light is close to the viewer'' (typically, that would be from cockpit view). In other words, this is not a full (and rather expensive) computation of light volumes as in Rembrandt, but a much faster test of illuminated screen areas.&lt;br /&gt;
&lt;br /&gt;
[[File:Landing light03.jpg|400px|Cessna 172P using generic ALS landing lights]]&lt;br /&gt;
&lt;br /&gt;
Two landing lights and a searchlight are supported. The landing lights have a fixed position with respect to the aircraft axis (technically, with respect to the default view axis as defined in the respective view), whereas the searchlight follows any offset of the view axis in view mode, i.e., when using the mouse to look around, the searchlight will follow the motion, the landing lights will not. The lights require ALS to run above basic quality level and work on runway and airport keep above transition setting 3 and everywhere else only at highest quality setting. All lights are controlled via properties in &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The names of the properties should be self-explanatory, if for instance if &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/use-searchlight&amp;lt;/code&amp;gt; is set to true, then the searchlight (which always follows the current view axis) is used. &lt;br /&gt;
&lt;br /&gt;
The properties &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light1-offset-deg&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light2-offset-deg&amp;lt;/code&amp;gt; allow to specify angular offsets for the landing light which are then not centered on the view axis. This can be used to simulate one or two landing lights set in the wings.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv2.jpg|400px|Secondary lights vertical offset demo]]&lt;br /&gt;
&lt;br /&gt;
A third offset &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light3-offset-deg&amp;lt;/code&amp;gt; is available which allows for a vertical offset. This is especially useful for tail dagger aircraft.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv.jpg|400px|Secondary lights vertical offset settings]]&lt;br /&gt;
&lt;br /&gt;
The lights can be switched on and off from the [[Property Browser]] for any aircraft without any modifications to the aircraft definition. Implementing them correctly aircraft side thus just involves linking the landing light switches to the ALS control properties and setting the correct angular offsets. Additionally, it is recommended to switch the lights off unless in a cockpit view, as they don't project correctly for any external view.&lt;br /&gt;
&lt;br /&gt;
Range, color, light cone opening angle or intensity of the lights can currently not be configured, and there are no plans to support such a feature in the near future.&lt;br /&gt;
&lt;br /&gt;
All three lights will illuminate fog (if dense enough) and precipitation.&lt;br /&gt;
&lt;br /&gt;
[[File:Als secondary light fog.jpg|400px|ALS generic lights illuminating dense fog]]&lt;br /&gt;
&lt;br /&gt;
== ALS specific features of the model effect ==&lt;br /&gt;
&lt;br /&gt;
In addition to the features supported by the model-combined-deferred effect in all three renderers (normal, light, specular, environment reflection and dirt map), ALS also supports a couple of unique effects (which, if configured, will not have any effect in other renderers.&lt;br /&gt;
&lt;br /&gt;
=== The grain texture  ===&lt;br /&gt;
&lt;br /&gt;
ALS supports a grain texture for models. This is a semi-transparent overlay texture that works just as [[Procedural Texturing#The grain texture|its equivalent for terrain texturing]] and provides the option of generating centimeter-scale details such as rust or discoloration on a surface without having to use huge textures. An example of a surface rendered with grain texture is the image of the USS Vinson flightdeck below:&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain01.jpg|700px|Grain and rain effects on Vinson's flightdeck]]&lt;br /&gt;
&lt;br /&gt;
This is done using the following effect declaration inheriting from '''model-combined-deferred.eff''' as&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt;flightdeck&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;inherits-from&amp;gt;Effects/model-combined-deferred&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
  &amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;image&amp;gt;Models/Geometry/Nimitz/rust_texture.png&amp;lt;/image&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt; &lt;br /&gt;
    &amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
    &amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
    &amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
  &amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The grain texture has the number 7 and needs to be enabled by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the value is set to 1, the grain texture uses the uv-mapping of the underlying surface. If that is very irregular (as in the case of the Vinson flightdeck), alternatively the grain can be mapped in xy-model coordinates if the parameter is set to 2, the uv-mapping of the base texture layer is then discarded.&lt;br /&gt;
&lt;br /&gt;
The resolution of the grain texture with respect to the base coordinate layer is specified by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the number is less than 0, the grain resolution is lower than the base layer. If the parameter is greater than 0, it is higher (note that in the above case, the grain is mapped to (xy) rather than (uv), hence the base size is 1 m, so the grain texture is mapped on a 10x10 m patch on the flightdeck, for which a 1024x1024 pixel texture provides ~1 cm sized details).&lt;br /&gt;
&lt;br /&gt;
=== The rain effect ===&lt;br /&gt;
&lt;br /&gt;
Any number greater than 0 passed to&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
enables the splash effect of raindrops on the surface if it points upward. The surface does not have to be flat for this to work, the effect checks for the surface normal automatically, see the rain enabled for the Citation Bravo.&lt;br /&gt;
&lt;br /&gt;
Thorsten noted about rain splashes: &amp;quot;Works fine here - runway needs to get really wet though before you see them (put the environment slider to max to achieve this quickly, it will take some waiting with just rain on).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain02.jpg|700px|Rain effect on the Citation Bravo]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Glossy surfaces ===&lt;br /&gt;
&lt;br /&gt;
To better treat the environment reflections on a glossy surface, ALS contains two options not present in the other renderers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-type type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/reflection-type&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter can currently be set to 1 or 2 and regulates how the color of the environment reflection is merged with the color of the glossy surface. If set to 1, the shader uses a color mixing as in the other two renderers, if set to 2 it uses a technique called 'grain merge' which gives different weight to the color channels. The reason for introducing type 2 was a grey tint which changed the reflected color in a unrealistic way. With FlightGear 2017.2.0 this will be fixed and  type set to 2 should be obsolete then.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-fresnel-factor type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/reflection-fresnel-factor&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter regulates how strong the Fresnel term of a glossy surface is. Many smooth surfaces reflect much more under shallow angles such that an environment reflection is not very prominent when looking under 90 degrees but dominates the visuals when looking under a grazing angle. The parameter sets the relative strength of a Fresnel reflection with respect to the basic reflection definition which is assumed to hold for vertical viewing (i.e. setting the parameter to 0.8 gives you extra glossiness under shallow angles).&lt;br /&gt;
&lt;br /&gt;
The following comparison shows the default color mixing (upper left) for a reflecting white livery and for grain merge (upper right). In addition, note the enhanced Fresnel reflectivity at the tail and the cowling on the pictures. The lower row shows (left) full reflection with default color mixing and (right) for grain merge. Default color mixing is more physically correct, while grain merge is less correct but preserves white color much better.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model default2.jpg|400px|Effect of color mixing in a reflection]]&lt;br /&gt;
[[File:Reflect Grain merge2.jpg|400px|Effect of grain merge in reflection]]&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model Default Full.jpg|400px|Full reflection with default ]]&lt;br /&gt;
[[File:Reflect Grain Merge Full.jpg|400px|Full reflection with grain merge]]&lt;br /&gt;
&lt;br /&gt;
== The exhaust flame effect ==&lt;br /&gt;
&lt;br /&gt;
Rendering proper flames of e.g. afterburners or rocket thrusters with diffuse edges is notoriously difficult - all solutions based on textured models tend to have unnaturally sharp edges. Usually the particle system is used in such cases, however at high velocities this has other issues - particles become easily separated, making flames look disrupted and detached from the exhaust.&lt;br /&gt;
&lt;br /&gt;
ALS includes a dedicated procedural effect in which the flame is rendered by numerically integrating a 3-dim distribution of glowing emitters inside a bounding box (i.e. re-creates the process by which a real flame would be seen). The function which determines the emitter distribution is partially user-controlled so that a wide range of shapes can be generated.&lt;br /&gt;
&lt;br /&gt;
To use the effect, first the bounding box has to be defined. Note that the shape and alignment of the bounding box needs to be standardized for the effect to work, i.e. you need to use either the default bounding box under Aircraft/Generic/Effects/Thruster/ or make a custom one which fits inside the default box at the same location in model coordinates.&lt;br /&gt;
&lt;br /&gt;
To change position, size and orientation of the bounding box to match with the airplane model, translate, scale and rotate animations or model offsets can later be used.&lt;br /&gt;
&lt;br /&gt;
=== Model definition for effect ===&lt;br /&gt;
This is a standard XML model definition that needs to specify the geometry, all animations and the effect to use. For the geometry you can use the standard ''Aircraft/Generic/Effects/Thruster/thrust_flame.ac'' or make your own. The F-15 uses a slightly different 3D model to allow for the nozzles. The 3D model needs to be big enough to contain the flame, bearing in mind that the flame is drawn as a cylinder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;path&amp;gt;Aircraft/Generic/Effects/Thruster/thrust_flame.ac&amp;lt;/path&amp;gt;&lt;br /&gt;
    &amp;lt;nopreview/&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;scale&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;property alias=&amp;quot;/params/augmentation-alight&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;x-min&amp;gt;0.2&amp;lt;/x-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-min&amp;gt;0.3&amp;lt;/y-min&amp;gt;&lt;br /&gt;
        &amp;lt;z-min&amp;gt;0.3&amp;lt;/z-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-max&amp;gt;1&amp;lt;/y-max&amp;gt;&lt;br /&gt;
        &amp;lt;z-max&amp;gt;1&amp;lt;/z-max&amp;gt;&lt;br /&gt;
        &amp;lt;x-factor&amp;gt;0.472&amp;lt;/x-factor&amp;gt;&lt;br /&gt;
        &amp;lt;y-factor&amp;gt;0.6&amp;lt;/y-factor&amp;gt;&lt;br /&gt;
        &amp;lt;z-factor&amp;gt;0.6&amp;lt;/z-factor&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- on the F-15 we have a property available that controls the ignition of the afterburner. If you do not wish to implement this&lt;br /&gt;
         remove the following animation tag --&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
        &amp;lt;condition&amp;gt;&lt;br /&gt;
            &amp;lt;greater-than&amp;gt;&lt;br /&gt;
                &amp;lt;property alias=&amp;quot;/params/augmentation-ignition&amp;quot;/&amp;gt;&lt;br /&gt;
                &amp;lt;value&amp;gt;0.8&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/greater-than&amp;gt;&lt;br /&gt;
        &amp;lt;/condition&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Aircraft/MyAircraft/Models/Effects/my-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''my-flame.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control how the flame looks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;AB-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
        &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;0.85&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.07&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.15&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.35&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
        &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
        &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
        &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
        &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a detailed version (utilizing 3d noise and a higher sampling resolution) available. This has to be explicitly requested in a derived effect by overriding the default shader choice with the detailed version, i.e. bu inserting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;technique n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;pass&amp;gt;&lt;br /&gt;
     &amp;lt;program&amp;gt;&lt;br /&gt;
         &amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/thrustflame-ALS-detailed.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
     &amp;lt;/program&amp;gt;&lt;br /&gt;
  &amp;lt;/pass&amp;gt;&lt;br /&gt;
  &amp;lt;/technique&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
below the parameter section.&lt;br /&gt;
&lt;br /&gt;
{{Note|The detailed shader uses four times as much performance at least - only use it if you really need it!}}&lt;br /&gt;
&lt;br /&gt;
=== F-15 Afterburner example image === &lt;br /&gt;
The F-15 afterburner flame shown below (at different ambient lighting based on time) uses the parameters above. The main parameters of importance, and therefore to tune, for an aircraft jet engine are the colors, the two densities, the flame radius fraction. The base density is at the start of the flame and this. The F-15 overlays a billboarded image to achieve the diamonds that are interleaved with the ALS drawn flame. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:F-15 afterburner using ALS Thrust Effect.jpg|700px|This shows the F-15 afterburner at different ambient light.]]&lt;br /&gt;
&lt;br /&gt;
The meaning of the parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_shocks&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; and &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_noise&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; are the parameters that control the random noise and the shock diamonds. Both are modestly computationally expensive, i.e. if these effects are not required it is better to switch them off by setting these values to zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(same for the (g,b) channels) set the color. base_flame refers to the part of the flame which is directly attached to the thruster and usually brightest. flame_color_high refers to the high density part of the flame, flame_color_low refers to the low density parts of the flame. (rgb) values always need to be [0:1]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
   &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determine the overall emitter density in the flame and in the base directly at the thruster respectively. There's no formal upper limit for the parameters, but a flame with density 1 already appears fairly opaque.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
governs how much of the bounding box the flame radius at the exhaust nozzle fills. If the flame needs to expand (as for the plume of a thruster operating in vacuum) or needs to bend (as for a flame deflected by the airstream) this parameter needs to be small, if the flame is essentially cylindrical the paramater can be chosen close to 1 to minimize clipping errors. Note that this determines the size of the flame relative to the bounding box - the overall size of the flame should be adjusted by using a scale animation on the bounding box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determined how turbulent the flame looks. noise_strength [0:1] determines how prominently the noise influences the flame and noise_scale (in meters relative to the original bounding box) determines how large the visible patches of turbulence are (given that the original bounding box is not larger than 5 m in the longest direction, the parameter should probably kept between 0.1 and 5).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
influences at what distance shock diamonds appear in the flame. Useful values are perhaps between 0.2 and 5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should take a value of between 0 and 1 and determines how collimated the flame is. For values &amp;gt; 0, the flame is widened - note that this requires a sufficiently small flame radius fraction to avoid clipping errors. For widened flames, the density is automatically lowered and shock diamonds are removed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0.&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be somewhere between 0 and 0.06 and gives a lateral deflection (such as by an airstream) to the flame. Note that this re-positions the origin of the flame in the bounding box to better utilize the bounding box volume, i.e. if you need a dynamical deflection, you also need a translate animation for the bounding box.&lt;br /&gt;
&lt;br /&gt;
Any of those parameters can be adjusted runtime  by replacing the value with &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use&amp;gt;/my-property&amp;lt;/use&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;. Dependent on how &amp;lt;code&amp;gt;/my-property&amp;lt;/code&amp;gt; is created it might be tied though (in particular JSBSim-computed properties are) in which case it is not picked up by the effect framework - you need to copy it via property rule to an untied property then. This allows to render dynamical changes of the flame.&lt;br /&gt;
&lt;br /&gt;
For instance the [[SpaceShuttle - Project Overview|Space Shuttle]] main engines use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;ssme-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r&amp;gt;0.9&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g&amp;gt;0.7&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b&amp;gt;0.5&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r&amp;gt;0.7&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g&amp;gt;0.7&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-collimation&amp;lt;/use&amp;gt;&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-density&amp;lt;/use&amp;gt;&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength&amp;gt;0.3&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale&amp;gt;0.1&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to simulate the change of flame geometry in the thin upper atmosphere during ascent:&lt;br /&gt;
&lt;br /&gt;
[[File:Shuttle flame05.jpg|400px|Space Shuttle main engine flames during early ascent]]&lt;br /&gt;
[[File:Shuttle flame06.jpg|400px|Space Shuttle main engine flames during late ascent]]&lt;br /&gt;
&lt;br /&gt;
Using the deflection parameter, the curved SRB separation motor flames are rendered using&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;SRBsep-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.55&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;-0.06&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flame_sep.jpg|700px|Space Shuttle SRB separation motor flames]]&lt;br /&gt;
&lt;br /&gt;
Application of the effect is not limited to flames, it can also do heat blur (think a very transparent, high-noise dark emitter distribution) or vapour trails and other smoke.&lt;br /&gt;
&lt;br /&gt;
By itself, the effect does however not compute ambient and diffuse light channels, i.e. for non-emissive distributions lighting is the responsibility of the user. One quick way of obtaining a correct fading of color with light in the scene is to create an untied property based on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/rendering/scene/diffuse/red&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and used this to scale all color values.&lt;br /&gt;
&lt;br /&gt;
{{note|Do not use the full (rgb) information in the property tree for ALS, it will produce pronounced color mismatches with the rest of the scene as ALS determines light inside the shader and never uses the properties.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rotor wash ==&lt;br /&gt;
&lt;br /&gt;
ALS provides an interface to render rotor wash on various terrain types - currently this is implemented for the volumetric grass as well as procedural water. This interface needs to be written aircraft-side for the effect to be rendered.&lt;br /&gt;
&lt;br /&gt;
[[File:Rotor wash.jpg|600px|Rotor wash rendered on volumetric grass]]&lt;br /&gt;
&lt;br /&gt;
Aircraft maintainers need to set three parameters in &amp;lt;b&amp;gt;/environment/aircraft-effects/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The position of the downwash column needs to be specified in &amp;lt;i&amp;gt;eye-relative&amp;lt;/i&amp;gt; coordinates by setting &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-x&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-y&amp;lt;/b&amp;gt;. If these are zero, the air column is assumed to be right underneath the eye point, any non-zero values displace the center northward or eastward from the eye point. To work in external views, the displacement needs to be computed by e.g. a Nasal script or property rules, the same is true if the rotor is not close to the eye point.&lt;br /&gt;
&lt;br /&gt;
The strength of the downwash column &amp;lt;i&amp;gt;on the ground&amp;lt;/i&amp;gt; is set by &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-strength&amp;lt;/b&amp;gt;. The parameter influences both the radius in which the effect is visible as well as the overall strength (up to a maximum). Aircraft maintainers need to adjust strength based on parameters like altitude AGL, rotor RPM, rotor radius and whatever else might influence the downwash.&lt;br /&gt;
&lt;br /&gt;
== Chute animation effect ==&lt;br /&gt;
&lt;br /&gt;
The chute animation effect is designed to provide a natural appearance of the deformation and the fluttering motion of a piece of cloth under changing stress.&lt;br /&gt;
&lt;br /&gt;
[[File:Chute seq01.jpg|400px|Drag chute separation sequence 1]] [[File:Chute seq03.jpg|400px|Drag chute separation sequence 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coordinate system ===&lt;br /&gt;
&lt;br /&gt;
The shader assumes that the 3d mesh of the chute is oriented in a particular coordinate system. The z-axis (upward) should extend from the zero point where the various ropes come together to the canopy above through the center of the model. The canopy of the chute should therefore roughly be in the xy plane.&lt;br /&gt;
&lt;br /&gt;
To position the chute correctly with the aircraft, you then need to use appropriate offsets and rotations when loading.&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''mychute.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control the behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;mychute&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/chute&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
	&amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	&amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The meaning of these parameters is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the distance of the branching point of the various lines leading to the canopy (at model coordinate zero) to the edge of the canopy. All transformations affecting the shape of the canopy (in particular the collapse of the canopy if the force is gone) will be applied with respect to this reference plane.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a normalized force applied to the canopy. The chute should be modeled with a deformation corresponding to a force parameter of 1 - any higher value will narrow the chute's radius, deepen the chute's deformation along the z-axis and increase the motion, any lower value will widen chute radius (compare screenshots above) and lessen its depth and slow down motion. The normal parameter range should be from [0:2], any higher or lower may look odd.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	 &amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are deformation modes used to animate a chute after jettison when it is no longer pulled into shape and can flutter through the air. The first one [0:1] is a general collapse into the projection plane with random deformations around, the second one [-1:1] is a gross bending mode of the projection plane itself. Before jettison, these parameters should default to 0.&lt;br /&gt;
&lt;br /&gt;
=== Jettison animation ===&lt;br /&gt;
&lt;br /&gt;
A complete animated jettison sequence is quite complex and would usually require a Nasal sequence taking the chute through a deceleration trajectory (utilizing translation and rotation animations), bending ad folding oscillations and finally some unfolding as it sinks through the air. The Space Shuttle chute uses the following control loop for 10 seconds of jettison dynamics:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var drag_chute_jettison_animation = func (time) {&lt;br /&gt;
&lt;br /&gt;
var dt = getprop(&amp;quot;/sim/time/delta-sec&amp;quot;);&lt;br /&gt;
time = time + dt;&lt;br /&gt;
&lt;br /&gt;
# horizontal motion&lt;br /&gt;
&lt;br /&gt;
var x = 0.0;&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 2.0)&lt;br /&gt;
	{x = -16.0 + 20.0 * time;}&lt;br /&gt;
else&lt;br /&gt;
	{x = 2.0 * time + 5.0 * time * time;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-dist&amp;quot;,x);&lt;br /&gt;
&lt;br /&gt;
# vertical motion&lt;br /&gt;
&lt;br /&gt;
var y = 0.0;&lt;br /&gt;
if (time &amp;gt; 5.0)&lt;br /&gt;
	{&lt;br /&gt;
	y = -2.5 + 0.6 * (time-5.0) * (time-5.0);&lt;br /&gt;
	}&lt;br /&gt;
else 	&lt;br /&gt;
	{&lt;br /&gt;
	y = -0.2 * time;&lt;br /&gt;
	}&lt;br /&gt;
if (y &amp;gt; 12.5) {y=12.5;}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-down&amp;quot;,y);&lt;br /&gt;
&lt;br /&gt;
# fold&lt;br /&gt;
&lt;br /&gt;
var f = 0.5 * time;&lt;br /&gt;
if (f&amp;gt; 1.0) {f = 1.0;}&lt;br /&gt;
if (time &amp;gt; 9.5)&lt;br /&gt;
	{f = 0.25 + 1.5 + (time-9.5);}&lt;br /&gt;
if (time &amp;gt; 6.0)&lt;br /&gt;
	{&lt;br /&gt;
 	f = f -0.3* (time-7.0); &lt;br /&gt;
	if (f&amp;lt;0.1) {f=0.1;}&lt;br /&gt;
	}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-fold&amp;quot;, f);&lt;br /&gt;
&lt;br /&gt;
# rotate&lt;br /&gt;
&lt;br /&gt;
var r = (time - 2.0) * 18.0;&lt;br /&gt;
if (r&amp;gt;90.0) {r=90.0;}&lt;br /&gt;
if (r&amp;lt;0.0) {r=0.0;}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-slant&amp;quot;, r);&lt;br /&gt;
&lt;br /&gt;
# bend&lt;br /&gt;
&lt;br /&gt;
var b = 0;&lt;br /&gt;
if (time &amp;gt; 7.5)&lt;br /&gt;
	{b = 0;}&lt;br /&gt;
else if (time &amp;gt;6.0)&lt;br /&gt;
	{b = 0.75 - 0.5 * (time - 6.0);} &lt;br /&gt;
else if (time &amp;gt; 4.5) &lt;br /&gt;
	{b = (time - 4.5) * 0.5;}&lt;br /&gt;
else {b=0;}	&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-bend&amp;quot;, b);&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 10.0) &lt;br /&gt;
	{&lt;br /&gt;
	print(&amp;quot;Exiting...&amp;quot;);&lt;br /&gt;
	settimer (func { setprop(&amp;quot;/controls/shuttle/drag-chute-deploy-timer&amp;quot;, 0); }, 0.5);&lt;br /&gt;
	return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/test/timer&amp;quot;, time);&lt;br /&gt;
&lt;br /&gt;
settimer( func{ drag_chute_jettison_animation (time); }, 0);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS glass effect ==&lt;br /&gt;
&lt;br /&gt;
As of FlightGear version 3.5, ALS supports a glass effect with dynamic response to the environment which can render, for instance, the splashes of raindrops on the canopy, frost or fogging.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass01.jpg|400px|Frost effect]]&lt;br /&gt;
[[File:Glass07.jpg|400px|Raindrop splashes]]&lt;br /&gt;
&lt;br /&gt;
The base effect properties are controlled via inheritance and the environment response run-time via properties residing in &amp;lt;b&amp;gt;/environment/aircraft-effects&amp;lt;/b&amp;gt;. Derived effects should inherit from &amp;lt;b&amp;gt;Effects/glass&amp;lt;/b&amp;gt;. Any surface using the glass effect will automatically register itself as transparent for use in [[Project Rembrandt| Rembrandt]]. &lt;br /&gt;
&lt;br /&gt;
The glass effect is primarily intended for interior views. In particular, no external fog or haze is rendered for the glass, i.e. if the effect is used in an outside view, it is the responsibility of the aircraft modeler to take care (e.g. with LOD settings or range animations) that no problems in bad visibility occur.&lt;br /&gt;
&lt;br /&gt;
=== Why a separate effect for glass seen from inside? ===&lt;br /&gt;
&lt;br /&gt;
Basically because the two situations are rather different. Slight dirt on the glass against the background of the sky from inside is rather prominent, against the background of the cockpit seen from outside it is not. Visuals from inside are dominated by Mie forward scattering of light, leading to a bright glare effect when looking at dirt, frost, fog or scratches close to the sun. From outside, reflected light rather than transmitted light is dominant. The reflection of any external object on the outside of the glass changes as the aircraft moves, this is not the case for the reflection of the cockpit in the glass seen from the inside. &lt;br /&gt;
&lt;br /&gt;
The viewing situation is also different. From the inside, we usually do not focus the eyes on the plane of the glass but look through it, from the outside the focus of the eyes is often close to the glass surface. For something half a meter before the eye, we also need to apply a lot more resolution and details than for an object typically seen from 10+ meters from the outside.&lt;br /&gt;
&lt;br /&gt;
Add to this that atmospheric fog is never relevant for glass seen from inside but for glass seen from outside, and it suddenly makes sense to use a different effect.&lt;br /&gt;
&lt;br /&gt;
The recommended effect for glass surfaces seen from outside is model-combined-transparent.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rain ===&lt;br /&gt;
Rain splashes will render automatically when the weather system reports rain via environment/rain-norm. In addition, the user can set rain splashes to render via &amp;lt;code&amp;gt;environment/aircraft-effects/ground-splash-norm&amp;lt;/code&amp;gt; (this is intended to allow splashes to be rendered e.g., for water landings of aircraft equipped with floats).&lt;br /&gt;
&lt;br /&gt;
By default, the rain splashes impact from above (more precisely the +z direction in model coordinates). This may be inadequate if the aircraft is moving. However, the shader can not know what the airstream at the glass will be, so the impact vector of rain splashes has to be modeled aircraft-side and set via &amp;lt;code&amp;gt;environment/aircraft-effects/splash-vector-x&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;splash-vector-y&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;splash-vector-z&amp;lt;/code&amp;gt;). These are likewise in model coordinates.&lt;br /&gt;
&lt;br /&gt;
As long as the length of the splash vector is less than 1, just the impact angle will change, as the length of the vector increases to 2, droplets will also be visibly moving. This allows fine control of the visuals dependent on any number of factors desired. A simple Nasal snipped varying the splash vector with airspeed for the F-16 is given below (but ''do not mindlessly copy and expect to work for any aircraft — it won't!''). This example is for normals pointing outwards, if the normals are pointing inwards the vector needs to be inverted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var splash_vec_loop = func(){&lt;br /&gt;
    var airspeed = getprop(&amp;quot;/velocities/airspeed-kt&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    # f16&lt;br /&gt;
    var airspeed_max = 120;&lt;br /&gt;
&lt;br /&gt;
    if (airspeed &amp;gt; airspeed_max) {&lt;br /&gt;
        airspeed = airspeed_max;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    airspeed = math.sqrt(airspeed / airspeed_max);&lt;br /&gt;
&lt;br /&gt;
    var splash_x = -0.1 - 2 * airspeed;&lt;br /&gt;
    var splash_y = 0.0;&lt;br /&gt;
    var splash_z = 1.0 - 1.35 * airspeed;&lt;br /&gt;
&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-x&amp;quot;, splash_x);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-y&amp;quot;, splash_y);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-z&amp;quot;, splash_z);&lt;br /&gt;
&lt;br /&gt;
    settimer(func(){&lt;br /&gt;
        splash_vec_loop();&lt;br /&gt;
    }, 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the timing constant of the loop — running the update per-frame leads to a spurious movement of the coordinate system in which rain is rendered and spoils the effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another method when using JSBSIM would be to use a combination of FCS Functions and Filters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashX&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashx&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashY&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashZ&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashz&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could reduce the above method and eliminate the &amp;quot;filters&amp;quot; by doing the following.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/airspeed-clamped-sqrt&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;  &lt;br /&gt;
                &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;min&amp;gt;&lt;br /&gt;
                            &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                            &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;/min&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashy&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
               &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yet another method (currently used in the c172p) limits movement to a range of table entries. This gives the developer the ability to control the behavior even more.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xa&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.7  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -2.1  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-za&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.17 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.35 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.3  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.9  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-zr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.127 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.29  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;0&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-x&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-y&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-z&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Frost and fogging ===&lt;br /&gt;
&lt;br /&gt;
Frost on the canopy is rendered when environment/aircraft-effects/frost-level is set in the range from 0 to 1. Again, it is up to the aircraft developer to decide at what exterior conditions frosting should happen and whether the aircraft is equipped with heating to remove the frost again.&lt;br /&gt;
&lt;br /&gt;
Fogging is controlled by environment/aircraft-effects/fog-level in the range 0 to 1. Unless a mask is used, fogging is homogeneous across the whole surface (it is really intended to be used with a mask).&lt;br /&gt;
&lt;br /&gt;
=== Tint ===&lt;br /&gt;
&lt;br /&gt;
Tinted glass can be easily created by changing &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;glass-tint type=&amp;quot;vec4d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 1.0&amp;lt;/glass-tint&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to any value desired. This will affect all effects assumed outside of the glass layer (frost and rain splashes) but not fogging inside the glass. Use primarily for development and quick tests, don't misuse the alpha value available here, it has odd side effects.&lt;br /&gt;
&lt;br /&gt;
=== Functional masks ===&lt;br /&gt;
&lt;br /&gt;
If the glass surface is uv-mapped and textured, it is possible to switch on a mask functionality in the inheritance via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;image&amp;gt;my_mask.png&amp;lt;/image&amp;gt;&lt;br /&gt;
	&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
	&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
	&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;use-mask type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-mask&amp;gt;&lt;br /&gt;
&amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The red channel in my_mask.png controls the strength of fogging, full red corresponds to maximal fogging, no red to zero fogging. This allows to selectively model the position of heaters in the cockpit. Use &amp;lt;b&amp;gt;/environment/aircraft-effects/fog-level&amp;lt;/b&amp;gt; to adjust the actual amount of fog runtime.&lt;br /&gt;
&lt;br /&gt;
The green channel of my_mask.png is the amount of reduction of rain in an area. This is intended for airplanes equipped with windshield wipers to partially clear the wiped area of the rain. Whether the windshield wiper is actually on or not is controlled runtime via &amp;lt;b&amp;gt;/environent/aircraft-effects/use-wipers&amp;lt;/b&amp;gt; (1 sets wipers to on).&lt;br /&gt;
&lt;br /&gt;
The blue channel of my_mask.png is reserved for an overlay pattern which will be drawn in an optionally specified &amp;lt;overlay-color&amp;gt; vector (white in the example xml above) - the primary function is to render damage on the glass, but with a different color, also dirt or an alternative more finely controlled frost pattern can be used. The strength of the pattern can be adjusted runtime via &amp;lt;b&amp;gt;/environment/aircraft-effects/overlay-alpha&amp;lt;/b&amp;gt;, allowing dynamical accumulation of dirt or sudden appearance of damage.&lt;br /&gt;
&lt;br /&gt;
Examples for the result of a fog mask and a damage mask are shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Glass12.jpg|400px|Crack pattern using a damage mask]]&lt;br /&gt;
[[File:Glass11.jpg|400px|Partial fogging using a mask texture]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note that by default all the runtime switches for the mask are off / set to zero! Remember to to switch them on when testing the effect!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mie scattering ===&lt;br /&gt;
&lt;br /&gt;
Most glass effects show prominent Mie forward scattering as in reality, i.e. frost patterns or fogging will appear much more prominent when looking almost towards the sun than under any other angle. While the frost pattern is normally not very prominent and one is able to look through unhindered, this changes substantially when looking into the sun, at which point it almost obscures the view.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass08.jpg|400px|Mie scattering of low light on frost]]&lt;br /&gt;
[[File:Glass13.jpg|400px|Morning sun Mie scattering on fog]]&lt;br /&gt;
&lt;br /&gt;
For frost and fog, the strength of the effect is set automatically, but for the damage/dirt layer it is under user control at effect design time. Changing the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;overlay-glare type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/overlay-glare&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from its default value allows to adjust the strength of the glare when looking through the overlay layer close to the sun.&lt;br /&gt;
&lt;br /&gt;
=== Internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
There is support for a reflection of the cockpit interior.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect.jpg|640px|Internal glass cube map reflection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This needs to be provided as a cubemap specific for the airplane and switched on via the flag &amp;lt;use-reflection&amp;gt; set to 1. The relative strength of the reflection can be optionally via &amp;lt;reflection-strength&amp;gt;. The strength of the reflection in the cockpit is dynamically adjusted for a number of factors, among them balance of direct to indirect light, the approximate amount of light falling on the surface seen in the reflection and the amount of direct sunlight falling into the eye.&lt;br /&gt;
&lt;br /&gt;
If the six cubemap faces are called my_cube_map_??.png, then using an effect file called c172p-reflect.eff the inheritance looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-reflect&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/glass&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;images&amp;gt;&lt;br /&gt;
        &amp;lt;positive-x&amp;gt;my_cube_map_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
        &amp;lt;negative-x&amp;gt;my_cube_map_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
        &amp;lt;positive-y&amp;gt;my_cube_map_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
        &amp;lt;negative-y&amp;gt;my_cube_map_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
        &amp;lt;positive-z&amp;gt;my_cube_map_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
        &amp;lt;negative-z&amp;gt;my_cube_map_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
        &amp;lt;/images&amp;gt;&lt;br /&gt;
    &amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;use-reflection type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection&amp;gt;&lt;br /&gt;
    &amp;lt;reflection-strength type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/reflection-strength&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The inheritance call includes all surface objects that use the effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-reflect&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;glas&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;rightwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;leftwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See below (Interior shading), for details on cube_map creation and orientation.&lt;br /&gt;
&lt;br /&gt;
=== Lightmaps for internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
If the cockpit is illuminated at night, the reflection map will not show this change by default. However,the glass effect supports a lightmap for the reflection, which can be used in parallel with the lightmap for the panels to show the reflection of a lit panel at night.&lt;br /&gt;
&lt;br /&gt;
Since the reflection map is a cube map, the lightmap for it has to be as well, the syntax is hence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use-reflection-lightmap type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection-lightmap&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
     &amp;lt;images&amp;gt;&lt;br /&gt;
          &amp;lt;positive-x&amp;gt;Models/Effects/interior/reflection/light-px.png&amp;lt;/positive-x&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-x&amp;gt;Models/Effects/interior/reflection/light-nx.png&amp;lt;/negative-x&amp;gt;   &lt;br /&gt;
          &amp;lt;positive-y&amp;gt;Models/Effects/interior/reflection/light-py.png&amp;lt;/positive-y&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-y&amp;gt;Models/Effects/interior/reflection/light-ny.png&amp;lt;/negative-y&amp;gt;    &lt;br /&gt;
          &amp;lt;positive-z&amp;gt;Models/Effects/interior/reflection/light-pz.png&amp;lt;/positive-z&amp;gt;      &lt;br /&gt;
          &amp;lt;negative-z&amp;gt;Models/Effects/interior/reflection/light-nz.png&amp;lt;/negative-z&amp;gt;      &lt;br /&gt;
      &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The control parameters of the lightmap otherwise parallel those of the [[Model-combined_effect]] or the model interior effect described below, i.e. up to four channels can be independently specified on the lightmap.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
By default, rain and frost are mapped to the shape of the canopy using coordinate systems that adapts to the splash vector and the canopy shape. This requires no particular action aircraft-side except to provide the bare geometry of a canopy/windshield, but may not be satisfactory in all instances - in particular for near vertical cockpit side windows the scheme does poorly.&lt;br /&gt;
&lt;br /&gt;
There are two alternative coordinate maps available in this case, controlled by the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;surface-mapping-scheme type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/surface-mapping-scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 1, the uv-mapping of the surface is used (it has to exist of course). For this to work properly, the uv-mapping needs to be sufficiently regular and roughly preserve the mapped area.&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 2, a local orthonormal system based on the normals of the surface is constructed. This no longer takes the splash vector consistently into account  and works poorly for surfaces which are flat in the (xy)-plane, but gives decent result for side windows.&lt;br /&gt;
&lt;br /&gt;
== The HUD effect ==&lt;br /&gt;
&lt;br /&gt;
The HUD effect is a variant of the glass effect designed to render the visuals of a head-up display (HUD) closer to real life. This only works if the HUD is custom-created via [[Canvas]], not via the native FG HUD mechanism as the latter by-passes the effect framework.&lt;br /&gt;
&lt;br /&gt;
The effect takes the same configuration options as the glass effect (i.e. it can render frost, damage, scratches, glare,...) but in addition it runs a blur over the HUD image and alters the color distribution of the projected symbols to de-saturate the bright parts in the center. The result looks less monochromatic and more like light projected onto a surface (left: bare canvas right: HUD effect)&lt;br /&gt;
&lt;br /&gt;
[[File:HUD effect.jpg|800px|Comparison between a bare canvas HUD (left) and the ALS HUD shader run over it (right)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
The effect is used from the model file by assigning it to the surface that also carries the canvas texture of the HUD via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Effects/hud&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;HUDImage&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should usually work out of the box, but if the HUD brightness should be changeable or the glass properties adjusted, a derived effect needs to be created.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
In addition to the parameters supported by the glass shader (which, for instance in the case of rain splashes, may or may not be appropriate for a HUD, this is left at user's discretion), the HUD effect takes the following special parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;brightness&amp;gt;1.0&amp;lt;/brightness&amp;gt;&lt;br /&gt;
   &amp;lt;sample-res&amp;gt;0.0006&amp;lt;/sample-res&amp;gt;&lt;br /&gt;
   &amp;lt;sample-far&amp;gt;2.5&amp;lt;/sample-far&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first one is the relative brightness setting of the HUD (which should equal the alpha value assigned to the canvas image of the symbols). This parameter is used to de-saturate colors in the symbol centers.&lt;br /&gt;
&lt;br /&gt;
Remaining two parameters represent the size and shape of the blur Kernel being used. The sample resolution (sample-res) determines the overall size of the blur region, the farthest sample (sample-far) how far out the tails of the blur region extend.&lt;br /&gt;
&lt;br /&gt;
Note: The number of sampling steps is not computed adaptive to these parameters, if the steps get too coarse, then multiple image echoes instead of a proper blur will be generated - adjust these parameters with care (if at all).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The display effect ==&lt;br /&gt;
&lt;br /&gt;
Like the HUD effect, the display effect augments the visuals of a canvas, but in this case it simulates the effects on a multi-function display in cockpit, i.e. emissive light from a dark background.&lt;br /&gt;
&lt;br /&gt;
For that reason, the effect takes the same set of configuration parameters as the [[#The ALS interior model effect|interior model effect]], i.e. it can be supplied for instance with an opacity map.&lt;br /&gt;
&lt;br /&gt;
The expected and tested structure of the effect is that the display content is rendered on a canvas with transparent background which in turn is above a different, dark-colored surface which stands for the display background. The best visuals are achieved when aircraft-internal shadows are rendered via opacity map on the dark surface and the corresponding contrast effects to the transparent canvas.&lt;br /&gt;
&lt;br /&gt;
Currently the effect does three major things:&lt;br /&gt;
&lt;br /&gt;
* at low light, it can make overly bright displays look slightly blurry and difficult to read as well as de-saturate the colors. This simulates the effects of a too-bright display on the eye and should prompt the user to dim the display.&lt;br /&gt;
&lt;br /&gt;
[[File:Display effect03.jpg|640px|Display effect: blur at low light (left)]]&lt;br /&gt;
&lt;br /&gt;
* at strong direct light, the effect can extinct the display content if it is set too dim. This should prompt the user to increase display brightness&lt;br /&gt;
&lt;br /&gt;
[[File:Display effect04.jpg|640px|Display effect: extinction at strong illumination]]&lt;br /&gt;
&lt;br /&gt;
* finally, if glancing light falls onto the display, the effect can render dust. Note that unlike normal diffuse lighting, the dust appears really strongest when the light almost hits the display from the side.&lt;br /&gt;
&lt;br /&gt;
[[File:Display shader dust.jpg|640px|Display effect: dust]]&lt;br /&gt;
&lt;br /&gt;
* in addition to that, the effect contains the same grain map the interior model effect offers. This can be used e.g. to superimpose a pixel raster (to simulate a CRT screen) or to dim the edges of the display as compared to the center as desired.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
== The ALS interior model effect  ==&lt;br /&gt;
&lt;br /&gt;
Since the interior of a cockpit is a large part of what a pilot gets to see in-flight, but this interior represents a rather special situation (light is reduced as it falls through windows, it may have artificial light, there is never any fog or haze,...) ALS offers a separate effect to specifically render the interior of a plane.&lt;br /&gt;
&lt;br /&gt;
This effect also includes optional features which will be available at higher quality settings of the model shader.&lt;br /&gt;
&lt;br /&gt;
=== Interior shadows and tinted glass effect ===&lt;br /&gt;
&lt;br /&gt;
With FlightGear version 3.5 and above, ALS now supports interior shading; i.e. the sun shining through the windows and casting shadows on the panel.&lt;br /&gt;
&lt;br /&gt;
[[File:interior01.jpg|640px|Interior shading effect]]&lt;br /&gt;
&lt;br /&gt;
This effect is based on an opacity map - a cube map of textures which tells the renderer where the cockpit is transparent and where not. The opacity map has to be created beforehand, which allows to make it quite detailed. In this map, white stands for a completely transparent surface, black for an opaque surface, colors for tinted glass which will create a colored light spot in the cockpit, grey hues for partial shadowing allowing to paint dirt effects onto the windows, and caustics can be drawn using the alpha channel: (1-alpha) will be used as an enhancement of the light at a certain spot.&lt;br /&gt;
&lt;br /&gt;
The effect is typically declared as derived by inheritance using an effect file such as c172-interior.eff which looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior-glass&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
	  &amp;lt;images&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-x&amp;gt;Models/Effects/interior/clr_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-x&amp;gt;Models/Effects/interior/clr_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-y&amp;gt;Models/Effects/interior/clr_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-y&amp;gt;Models/Effects/interior/clr_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-z&amp;gt;Models/Effects/interior/clr_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-z&amp;gt;Models/Effects/interior/clr_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
	  &amp;lt;/images&amp;gt;&lt;br /&gt;
	&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-center type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 0.5 0.0 0.3&amp;lt;/opacity-cube-center&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-scale type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.5 0.5 0.7&amp;lt;/opacity-cube-scale&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-angle type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/opacity-cube-angle&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is called by inheritance in the model.xml file.&lt;br /&gt;
&lt;br /&gt;
Imagine the opacity map as a box surrounding the cockpit and trying to closely follow its contours. The origin in the box needs to be placed into the center of the cockpit, which is what &amp;lt;b&amp;gt;&amp;lt;opacity-cube-center&amp;gt;&amp;lt;/b&amp;gt; does. Each of the three dimensions then needs to be stretched to roughly fit the layout of the canopy, this is done by &amp;lt;b&amp;gt;&amp;lt;opacity-cube-scale&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If opacity map center and scale are wrong, you will still see shadows, but they won't match the real cockpit layout (the lightspot of a window will be seen displaced and at a different size of the real window). Thus, carefully measuring the best box layout in a 3d tool is moderately important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aircraft-side the effect is called as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;PilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;CopilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;panel_1_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;InstrumentCover.001&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Panel_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Throttle&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Mixture&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Pedestal&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;TrimWheel&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;ParkingBrake&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;BackSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;FuelSelectorFace&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each object that you want the shadow effect to fall on must be included in the inheritance.&lt;br /&gt;
&lt;br /&gt;
Unless you supply a path, the cube_.png's need to reside in the same directory as the model.xml where you added the &amp;lt;effect&amp;gt; tag pair that calls c172-interior.eff, not where you put the aircraft_interior.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The orientation of the faces of each cube have to be adjusted based on the positive and negative axis of the model.&lt;br /&gt;
&lt;br /&gt;
For example, using the c172p model as a reference.&lt;br /&gt;
&lt;br /&gt;
The tail, right wing and top on the model are positive inside Blender. So the cube faces are laid out as follows.&lt;br /&gt;
&lt;br /&gt;
Note: Depending on the image's orientation when photographed the rotation direction will vary. This is assuming the images are being taken from the center of the cockpit looking out. Using compass headings to describe how to rotate the images.&lt;br /&gt;
&lt;br /&gt;
px (tail) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nx (nose) rotate 90 deg from N or S to E&lt;br /&gt;
&lt;br /&gt;
py (starboard/right) from N do not rotate&lt;br /&gt;
&lt;br /&gt;
ny (port/left) from N rotate 180 deg to S&lt;br /&gt;
&lt;br /&gt;
pz (top) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nz (bottom) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
[[File:C172p-cube.jpg|640px|Cube map layout of the c172p]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With Blender, it's pretty easy to create the cubemap.&lt;br /&gt;
&lt;br /&gt;
1. Add a camera where the cubemap will be. Set the FOV to 90 degrees.&lt;br /&gt;
2. Set the resolution to 1024x1024 (or any other square, power-of-two size).&lt;br /&gt;
3. Hide all lights and windows; disable ambient lighting (set it to black) and turn off ambient occlusion.&lt;br /&gt;
4. Set the world color to white.&lt;br /&gt;
5. Enable the compositor and add an invert node.&lt;br /&gt;
6. Render and save the six views as you would normally.&lt;br /&gt;
7. Add dirt, tinted glass color and caustics by hand&lt;br /&gt;
&lt;br /&gt;
This process depends on the model setup but it should work for most aircraft with a few tweaks.&lt;br /&gt;
&lt;br /&gt;
==== Cubemap Kit for Blender ====&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-shadow-blender-instructions.png|320px|How to make an interior cubemap with the cubemap kit]]&lt;br /&gt;
&lt;br /&gt;
See [http://chateau-logic.com/content/flightgear-interior-shadow-cubemap-kit flightgear-interior-shadow-cubemap-kit] for a premade kit to create the cubemap and the .eff sample file to use it.&lt;br /&gt;
&lt;br /&gt;
==== Important Notes ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Currently (May 2015) the effect does not deal gracefully with child models included into the main model with offsets and/or rotations because these introduce a different coordinate system in which the shadow does not match. The general idea of a code solution is known, but not implemented. Right now this can only be addressed by explicitly positioning child models in the *.ac file and not using any offsets when including them.&lt;br /&gt;
&lt;br /&gt;
=== ALS flashlight ===&lt;br /&gt;
&lt;br /&gt;
This effect is meant to imitate a hand held flashlight for use in getting instruments in the cockpit turned on in dark conditions.&lt;br /&gt;
It is almost identical in nature to ALS searchlight only it is applied using interior-model.eff.&lt;br /&gt;
It has two user defined light color filters that can be applied and also a user defined light radius setting.&lt;br /&gt;
&lt;br /&gt;
[[File:ALS flashlight.jpg|600px|ALS flashlight effect]]&lt;br /&gt;
&lt;br /&gt;
To implement this effect use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
A full definition looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-one type=&amp;quot;vec3d&amp;quot;&amp;gt;0.5 0.5 0.5&amp;lt;/light-filter-one&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-two type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.2 0.2&amp;lt;/light-filter-two&amp;gt;&lt;br /&gt;
	&amp;lt;light-radius type=&amp;quot;float&amp;quot;&amp;gt;13&amp;lt;/light-radius&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the example above light-filter-one is soft white light and light-filter-two is a soft red light.&lt;br /&gt;
&lt;br /&gt;
After defining as above you can turn it on using the following property&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 1 is light-filter-one&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 2 is light-filter-two&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The flashlight effect inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
At lowest quality level, the effect supports an implicit lightmap, i.e. a color range of the basic texture can be selected and declared to act as a lightmap. This is specifically useful to render panel backlighting as in the example below:&lt;br /&gt;
&lt;br /&gt;
[[File:Ilightmap.jpg|600px|An implicit lightmap used to simulate a backlit panel]]&lt;br /&gt;
&lt;br /&gt;
The effect is off by default and switched on by setting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/implicit-lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following parameters are available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-tag-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-tag-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the base color to be tagged, i.e. if the panel labels to be illuminated at night are white, the color needs to be set to white.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-low type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/implicit-lightmap-threshold-low&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-high type=&amp;quot;float&amp;quot;&amp;gt;1.5&amp;lt;/implicit-lightmap-threshold-high&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The thresholds determine how similar a color may be to the base color in order to be still illuminated. The measure is the Euklidean distance of the color vectors. The lower thresholds determines when illumination will start to fade, the higher threshold at what distance in color space illumination will no longer take place. The thresholds have to be adapted to the specific situation - the technique works best for high-contrast panels (white labels on black background) and may not work at all for low contrast panels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-emit-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-emit-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The emit color specifies at which color the pixel will show if it is tagged (see above) and the implicit lightmap is on (see below) - set this to the color of the backlight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-intensity type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/implicit-lightmap-intensity&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the intensity determines how brightly the illuminated pixel will shine.&lt;br /&gt;
&lt;br /&gt;
Ambiance lighting can be simulated with the following tags.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-r type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-r&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-g type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-g&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-g&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-b type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-b&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example note the use of the &amp;quot;use&amp;quot; tag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be any defined property or static value.&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The implicit lightmap inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Irradiance maps ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In the simplest rendering schemes, diffuse and specular light are assumed to be highly directional (i.e. it illuminates lit surfaces only) while ambient light is taken to be omnidirectional.&lt;br /&gt;
&lt;br /&gt;
In reality, that is hardly ever true. In a typical outside location, ambient light is mainly coming from the sky above (which is why the ground underneath a car is dark even in the absence of directional light when the sky is overcast and the sun is not visible). In an enclosed space (like a room, or an aircraft cockpit), ambient light has to fall through the windows, i.e. is mainly not coming above but falling in horizontally.&lt;br /&gt;
&lt;br /&gt;
The directional dependence is not very strong though, yet it leaves measurable effects. In rendering, this can be accounted for by irradiance maps. In the following, the interior of the C-172p is rendered in the first case using omnidirectional ambient light, in the second case using an irradiance map giving the ambient light the directionality of the cabin windows, i.e. the light falls in predominantly horizontally (in addition, a grain map is superimposed to provide structure). Note how the spatial structure of the roof, looking bland when rendered in omnidirectional light is brought out by the irradiance map.&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-irradiance01.jpg|400px|C-172p cabin interior rendered without irradiance and grain map]]&lt;br /&gt;
[[File:Als-interior-irradiance02.jpg|400px|C-172p cabin interior rendered with irradiance and grain map]]&lt;br /&gt;
&lt;br /&gt;
Irradiance mapping is configured by the following parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-type type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/irradiance-map-type&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-strength type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/irradiance-map-strength&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several pre-configured irradiance map functions which can be chosen by map type. &lt;br /&gt;
&lt;br /&gt;
0: (default) omndirectional light&lt;br /&gt;
1: light predominantly coming from above (most appropriate for fighter cockpits)&lt;br /&gt;
2: light predominantly coming from the horizon (most appropriate for GA aircraft)&lt;br /&gt;
&lt;br /&gt;
The strength of the irradiance map regulates how pronounced the asymmetry of the map will be. A strength of zero always makes the light omnidirectional, whereas a strength of 1 implies that no light is coming from any direction 90 degree to the main direction (i.e. for the option 2, a strength of 1.0 means that no ambient light will fall in from above or below and that hence horizontal surfaces will appear pitch black unless direct light falls on them)&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The irradiance map inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Explicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In addition to the implicit lightmap, it is also possible to explicitly specify a lightmap. The syntax for this exactly parallels the syntax of the [[Model-combined_effect]] which supplies lightmaps for the exterior.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/MyAircraft/Effects/my_lightmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-multi type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/lightmap-multi&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-factor type=&amp;quot;float&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0&amp;lt;/lightmap-factor&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 &amp;lt;/lightmap-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a single channel lightmap in which pixel color times the lightmap color provides the illumination. Using the multi-channel function, up to four different maps can be specified in which the (rgba) values of a pixel encode where the light falls and the associated lightmap color what color the illumination takes. Each of these maps can be switched on and off or dimmed in intensity independently.&lt;br /&gt;
&lt;br /&gt;
=== Grain map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
The grain map sets a repeating hires overlay texture which can supply a very credible illusion of structure to a surface for cheap. The syntax exactly parallels that of the [[Model-combined_effect]] ALS grain feature described above.&lt;br /&gt;
&lt;br /&gt;
For instance, the following&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/Effects/MyGrainmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;10&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a grain overlay with a 10-time higher resolution over the base texture layer.&lt;br /&gt;
&lt;br /&gt;
== ALS procedural lights ==&lt;br /&gt;
&lt;br /&gt;
The ALS framework supports procedurally generated lights (for instance aircraft position lights, strobe lights,... ) for aircraft and models. Note that the effect produces the visuals of the lights themselves, but they do not illuminate their surroundings.&lt;br /&gt;
&lt;br /&gt;
=== Why procedural lights? ===&lt;br /&gt;
&lt;br /&gt;
Traditionally aircraft position lights have been implemented as billboarded emissive textures. This technique is limited in scope, as it has difficulty producing a directional light or changes in the light appearance (for instance glare) with changed scene lighting. The ALS procedural lights are designed to give visuals consistent with the auto-generated scene lights (runway lighting, street lights) and support configurable directionality, glare and even the illumination of fog by the lights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic implementation ===&lt;br /&gt;
&lt;br /&gt;
The base of the light is a texture quad which has Effects/procedural-light.eff assigned. Start from including the template provided into your model as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;model&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;/Models/Effects/procedural_light.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
        &amp;lt;offsets&amp;gt;&lt;br /&gt;
            &amp;lt;x-m&amp;gt; 0 &amp;lt;/x-m&amp;gt;&lt;br /&gt;
            &amp;lt;y-m&amp;gt; 0 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
            &amp;lt;z-m&amp;gt; 2 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
        &amp;lt;/offsets&amp;gt;&lt;br /&gt;
 &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and configure from there according to your own needs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not billboard the light via animation!&amp;lt;/b&amp;gt; The GLSL code will take care of the billboarding. Use a scale animation to change the size of the light, do not change the quad (the *.ac) itself in size, the shader code requires its geometry to be fixed.&lt;br /&gt;
&lt;br /&gt;
The lights are currently not supported in the default or Rembrandt renderer and will simply be invisible in these frameworks.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the light ===&lt;br /&gt;
&lt;br /&gt;
Make your own derived effect inheriting from Effects/procedural-light.eff and assign it in the xml wrapper of the light.&lt;br /&gt;
&lt;br /&gt;
====The base light color set====&lt;br /&gt;
&lt;br /&gt;
The base light color can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These take the normal set of values ranging from 0 to 1. &lt;br /&gt;
&lt;br /&gt;
====Light full intensity in the center====&lt;br /&gt;
&lt;br /&gt;
Now the light appears at full intensity in the center can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea behind this is that lights give a better visual appearance if their center is rendered visually brighter and de-saturated, but this occurs only if the light is at full intensity.&lt;br /&gt;
&lt;br /&gt;
There are no sanity checks done, you can assign any center color you like even if this makes no sense - you can change center color or darken it, so use with care.&lt;br /&gt;
&lt;br /&gt;
====Runtime change the light intensity====&lt;br /&gt;
&lt;br /&gt;
To runtime change the light intensity, assign&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to a property and change that property in the range from 0 to 1. Eg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;intensity_scale&amp;gt;&lt;br /&gt;
       &amp;lt;use&amp;gt;/rendering/nav-lights-factor&amp;lt;/use&amp;gt;&lt;br /&gt;
     &amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Set directional lights====&lt;br /&gt;
&lt;br /&gt;
For directional lights, you need to assign a pointing vector in aircraft coordinates into which the light cone points and set the directionality flag to true to activate the computations. This is done via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;-1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
    &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It would be customary to pass a normalized vector, but if you don't know how to do it, the shader will do it for you. By assigning properties to the pointing coordinates, the light direction can be changed runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not use a rotation animation to change the light direction - it won't work.&amp;lt;/b&amp;gt; Make the pointing vector properties and change them to your needs.&lt;br /&gt;
&lt;br /&gt;
====Fading of a directional light====&lt;br /&gt;
[[File:Directional light.jpg|thumb|Explanation of a light radiation pattern]]&lt;br /&gt;
The fading of a directional light away from the pointing axis is controlled by passing angles (or rather sines of angles).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
    &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Up to inner_angle, the light will have full intensity. From inner to outer angle the light will linearly fade to outer_gain. From outer angle to zero angle, the light intensity will linearly fade to zero.&lt;br /&gt;
&lt;br /&gt;
====Strobe effect====&lt;br /&gt;
&lt;br /&gt;
For get an automatic strobe effect you can set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to true. If you want your own strobe pattern, generate a strobe function and use &amp;lt;b&amp;gt;intensity_scale&amp;lt;/b&amp;gt; instead to pass it to the shader.&lt;br /&gt;
&lt;br /&gt;
=== Complete example ===&lt;br /&gt;
&lt;br /&gt;
Here's the left nav light of the C-172p:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;name&amp;gt;procedural-light-nav-left&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/procedural-light&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.000&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
        &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Arc is 110 deg, is 55 deg per side, giving 35 deg from wing --&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.7002075382097097&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
        &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Angles are 0.0 at 0 deg from pointing direction, 1.0 at&lt;br /&gt;
             90/-90 deg, and 0.0 at 180/-180 deg.&lt;br /&gt;
&lt;br /&gt;
             For left navigation light we use -0/-35 .. +110/+145 for&lt;br /&gt;
             the inner/outer range. This gives an arc of 110/180 deg,&lt;br /&gt;
             or 55/90 deg from center.&lt;br /&gt;
&lt;br /&gt;
             Value = sin(angle in degrees)&lt;br /&gt;
&lt;br /&gt;
             0.8191520442889918 = 55 deg (* 2 = 110 deg inner angle)&lt;br /&gt;
             1.0000 = 90 deg (* 2 = 180 deg outer angle)&lt;br /&gt;
        --&amp;gt;&lt;br /&gt;
        &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.8191520442889918&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
        &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.982547593563&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
The Cessna 182 by Heiko Schulz and Gilberto Agostinho with procedural lights activated:&amp;lt;br&amp;gt;&lt;br /&gt;
:''(To percieve the effect well, you probably have to darken your room and switch to fullscreen)''&lt;br /&gt;
[[File:Cessna 182 with procedural lights.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
===Move dynamically the procedural light===&lt;br /&gt;
&lt;br /&gt;
The position of a procedural light is declared in the '''&amp;lt;model&amp;gt;''' section, within the '''&amp;lt;PropertyList&amp;gt;''' XML code, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;procedural-light-gear-white-left&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;path&amp;gt;Effects/lights/procedural_light_gear_white.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
      &amp;lt;offsets&amp;gt;&lt;br /&gt;
          &amp;lt;x-m&amp;gt; -3.08&amp;lt;/x-m&amp;gt;&lt;br /&gt;
          &amp;lt;y-m&amp;gt; -0.21 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
          &amp;lt;z-m&amp;gt; -1.18 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
      &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tag ''procedural-light-gear-white-left'' is very important because is the object name. This name will be used as the reference object.&amp;lt;BR&amp;gt;Next, we can define an animation in the same xml file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;GearFrontalDoor&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;gear/gear/position-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;axis&amp;gt;&lt;br /&gt;
          &amp;lt;x1-m&amp;gt;  -3.00240&amp;lt;/x1-m&amp;gt;&lt;br /&gt;
          &amp;lt;y1-m&amp;gt;  1.0&amp;lt;/y1-m&amp;gt;&lt;br /&gt;
          &amp;lt;z1-m&amp;gt;  -1.02906&amp;lt;/z1-m&amp;gt;&lt;br /&gt;
          &amp;lt;x2-m&amp;gt;  -3.00240&amp;lt;/x2-m&amp;gt;&lt;br /&gt;
          &amp;lt;y2-m&amp;gt;  -1.0&amp;lt;/y2-m&amp;gt;&lt;br /&gt;
          &amp;lt;z2-m&amp;gt;  -1.0290&amp;lt;/z2-m&amp;gt;&lt;br /&gt;
      &amp;lt;/axis&amp;gt;&lt;br /&gt;
      &amp;lt;interpolation&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.25&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.50&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;60&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.75&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;30&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;0&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
      &amp;lt;/interpolation&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''procedural light'' object code is this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS fuselage shadow effect ==&lt;br /&gt;
ALS supports the manipulation of a (simplified) ground shadow. This effect uses an existing simplified shadow animation configuration and by default uses the gear-agl-m property to calculate the ground placement of that simplified shadow.&lt;br /&gt;
&lt;br /&gt;
The system, techniques for using it, and several working examples are on [https://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=24859&amp;amp;start=135 this extensive forum thread about the ALS shadow effects].&lt;br /&gt;
&lt;br /&gt;
[[File:Alsshadow.jpg|800px|ALS Shadow]]&lt;br /&gt;
&lt;br /&gt;
The effect can be applied easily in any aircraft that report the gear-agl-m property by simply adding a declaration inheriting from shadow.eff.&lt;br /&gt;
&lt;br /&gt;
If the aircraft does not support the gear-agl-m property, (notably JSBSim), you need to create a [[Autopilot configuration reference | Property Rule]] to pass a supported AGL data to the gear-agl-m property. In this case we use altitude-agl-ft converted to meters using a property rule configuration file.&lt;br /&gt;
&lt;br /&gt;
For the first example we'll use the &amp;quot;supported gear-agl-m&amp;quot; method for aircraft that don't require a property rule.&lt;br /&gt;
&lt;br /&gt;
Simply add the following inheritance declaration after you declare your shadow animation statement.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;name_of_the_shadow_object&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the non-ALS simplified shadow code you normally use a &amp;quot;translate&amp;quot; animation to position the shadow on the ground.&lt;br /&gt;
When using the ALS method you must either remove, comment out, or apply a condition to restrict its use to non ALS shadow applications, because ALS is responsible for computing the shadows ground position.&lt;br /&gt;
&lt;br /&gt;
Here is how we apply a condition to the translation to limit it effect to non-ALS application only.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A complete shadow animation block looks like this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- opaque objects --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- transparent objects --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;not&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/rembrandt/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;/not&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;noshadow&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- pitch --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/pitch-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;-1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;1&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- roll --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/roll-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;1&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For aircraft requiring a [[Autopilot configuration reference | Property Rule]] there are a couple extra steps.&lt;br /&gt;
&lt;br /&gt;
In aircraft-set.xml you add the property rule call to the &amp;quot;configuration file&amp;quot; in between the PropertyList/sim/systems tag pairs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;property-rule n=&amp;quot;101&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;gear_agl-m&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;Aircraft/c172p/Systems/gearAGL.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
&amp;lt;/property-rule&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: the n=&amp;quot;101&amp;quot; needs to be =+100 as -100 is reserved for system wide property rules.&lt;br /&gt;
In the above example 101 was used because 100 was already being used by a previous property rule definition.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;configuration file&amp;quot; normally goes in /Systems.&lt;br /&gt;
In this example we named the configuration file /Systems/gearAGL.xml.&lt;br /&gt;
&lt;br /&gt;
Here is the complete /Systems/gearAGL.xml configuration file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;filter&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;reference&amp;gt;6&amp;lt;/reference&amp;gt;&lt;br /&gt;
    &amp;lt;output&amp;gt;/position/gear-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
  &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
What the configuration file does is convert the input of altitude-agl-ft to the output of (((altitude-agl-ft)-6)*0.3048) or (convert ft-6 to m) and pass it to /position/gear-agl-m.&lt;br /&gt;
 &lt;br /&gt;
See [[Autopilot configuration reference | Input and reference properties or values &amp;lt;input&amp;gt; and &amp;lt;reference&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
== ALS 3d shadow volume effect ==&lt;br /&gt;
What might be considered the next level of realism using a relatively &amp;quot;cheap&amp;quot; shadow effect is to use a 3d volume shadow.&lt;br /&gt;
&lt;br /&gt;
[[File:Shadow vol02.jpg|800px|ALS 3d Shadow Volume]]&lt;br /&gt;
&lt;br /&gt;
The procedure to implement the ALS shadow volume is similar to the ALS-shadow above with a few modifications.&lt;br /&gt;
&lt;br /&gt;
First you have to have a 3d shadow volume model of the aircraft you are applying the effect to. This model should be a low poly model that is optimized to be as little of a footprint as possible.&lt;br /&gt;
&lt;br /&gt;
A property rule is required, same as above. This is used to generate the above ground altitude in meters, (altitude-agl-m). The &amp;quot;altitude-agl-m&amp;quot; is used to place the shadow close to the ground in real time at an FDM rate of execution.&lt;br /&gt;
{{note|Do not confuse &amp;quot;altitude-agl-m&amp;quot; with the other type of non-3d ALS-shadow property of &amp;quot;gear-agl-m&amp;quot;. The shaders involved use these two different properties respectively for the two different effect. They are not interchangeable.}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
   &amp;lt;filter&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
      &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
      &amp;lt;reference&amp;gt;1.0&amp;lt;/reference&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;/position/altitude-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The other difference from the ALS-shadow above is that it uses a different inherited effect.&lt;br /&gt;
Instead of&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
you use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow-vol&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make sure there is no duplicate 3d model shown in other renderers besides ALS it is also important to use a different select animation:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- hide 3d shadow in non ALS mode --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Procedural Texturing]]&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS infrared vision]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;br /&gt;
[[Category:ALS]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116183</id>
		<title>ALS technical notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116183"/>
		<updated>2018-09-12T06:31:03Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* The display effect */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Quality level mapping ==&lt;br /&gt;
The rendering quality of ALS effects is controlled by two main sliders, the landmass effects and transition effects. The transition effects slider regulates the quality of overlaid textured, while the landmass effects slider regulates all other aspects of procedural texturing, such as pixel color post-processing (dust, snow or wet terrain effects) and apparent terrain roughness (bump and parallax mapping).&lt;br /&gt;
&lt;br /&gt;
In addition, specific effects for certain terrain types (water, urban, forest, agriculture, etc.) and models in the scene can be switched on separately. In some cases, this may be needed for a consistent visual impression. For example, if a dust effect is used on the terrain, the water needs to be rendered using a separate water shader, otherwise it will appear dusty as well. Likewise, if the Rayleigh haze is used in the highest quality terrain effect, then the highest quality water effect needs to be used to see the same Rayleigh scattering effect on the water.&lt;br /&gt;
&lt;br /&gt;
For technical reasons (landmass and transition control the same shader code) the settings are sometimes mutually dependent, e.g., if the transition quality is set to level 6, it won't have any effect until the landmass quality is also set to level 6.&lt;br /&gt;
&lt;br /&gt;
=== Transition ===&lt;br /&gt;
The mapping of quality to visuals of the transition slider is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| Base texture scheme&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| Alternative hires airport keep effect&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
|&lt;br /&gt;
* Base and overlay texture, runway effect (if landmass is above level 4)&lt;br /&gt;
* Secondary lights on runway and airport keep&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| Base, overlay and hires texture&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Base, overlay, hires, detail, grain, dot and rock texture (if landmass is level 6)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Landmass ===&lt;br /&gt;
{{Note|Quality levels 1 and 2 are reserved to represent fixed pipeline rendering and the &amp;quot;default renderer&amp;quot; in an eventually merged rendering GUI. However, ALS is currently switched on per checkbox and not by quality level, and so they do not have a function.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
| ALS-rendered position-differential haze and light, moonlight&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| &lt;br /&gt;
* Procedural snow cover on terrain&lt;br /&gt;
* Procedural dust and vegetation effects&lt;br /&gt;
* Wet terrain effect with approximate reflection half vector&lt;br /&gt;
* Patchy fog distribution&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Noise bump-mapping and parallax mapping of terrain&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 6&lt;br /&gt;
| (''Requires transition effect level 6'')&lt;br /&gt;
* Wet terrain effect with correct reflection half vector&lt;br /&gt;
* Hires bump mapping and snow patchiness&lt;br /&gt;
* Variable upper haze layer surface&lt;br /&gt;
* Rayleigh haze&lt;br /&gt;
* Secondary lights on all terrain types&lt;br /&gt;
* Slope line and strata effects&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ALS secondary lights ==&lt;br /&gt;
The ALS framework supports a generic implementation of landing lights and a searchlight which are based on a framerate-friendly computation in screen coordinates, i.e., the lights project correctly ''only if the light is close to the viewer'' (typically, that would be from cockpit view). In other words, this is not a full (and rather expensive) computation of light volumes as in Rembrandt, but a much faster test of illuminated screen areas.&lt;br /&gt;
&lt;br /&gt;
[[File:Landing light03.jpg|400px|Cessna 172P using generic ALS landing lights]]&lt;br /&gt;
&lt;br /&gt;
Two landing lights and a searchlight are supported. The landing lights have a fixed position with respect to the aircraft axis (technically, with respect to the default view axis as defined in the respective view), whereas the searchlight follows any offset of the view axis in view mode, i.e., when using the mouse to look around, the searchlight will follow the motion, the landing lights will not. The lights require ALS to run above basic quality level and work on runway and airport keep above transition setting 3 and everywhere else only at highest quality setting. All lights are controlled via properties in &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The names of the properties should be self-explanatory, if for instance if &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/use-searchlight&amp;lt;/code&amp;gt; is set to true, then the searchlight (which always follows the current view axis) is used. &lt;br /&gt;
&lt;br /&gt;
The properties &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light1-offset-deg&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light2-offset-deg&amp;lt;/code&amp;gt; allow to specify angular offsets for the landing light which are then not centered on the view axis. This can be used to simulate one or two landing lights set in the wings.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv2.jpg|400px|Secondary lights vertical offset demo]]&lt;br /&gt;
&lt;br /&gt;
A third offset &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light3-offset-deg&amp;lt;/code&amp;gt; is available which allows for a vertical offset. This is especially useful for tail dagger aircraft.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv.jpg|400px|Secondary lights vertical offset settings]]&lt;br /&gt;
&lt;br /&gt;
The lights can be switched on and off from the [[Property Browser]] for any aircraft without any modifications to the aircraft definition. Implementing them correctly aircraft side thus just involves linking the landing light switches to the ALS control properties and setting the correct angular offsets. Additionally, it is recommended to switch the lights off unless in a cockpit view, as they don't project correctly for any external view.&lt;br /&gt;
&lt;br /&gt;
Range, color, light cone opening angle or intensity of the lights can currently not be configured, and there are no plans to support such a feature in the near future.&lt;br /&gt;
&lt;br /&gt;
All three lights will illuminate fog (if dense enough) and precipitation.&lt;br /&gt;
&lt;br /&gt;
[[File:Als secondary light fog.jpg|400px|ALS generic lights illuminating dense fog]]&lt;br /&gt;
&lt;br /&gt;
== ALS specific features of the model effect ==&lt;br /&gt;
&lt;br /&gt;
In addition to the features supported by the model-combined-deferred effect in all three renderers (normal, light, specular, environment reflection and dirt map), ALS also supports a couple of unique effects (which, if configured, will not have any effect in other renderers.&lt;br /&gt;
&lt;br /&gt;
=== The grain texture  ===&lt;br /&gt;
&lt;br /&gt;
ALS supports a grain texture for models. This is a semi-transparent overlay texture that works just as [[Procedural Texturing#The grain texture|its equivalent for terrain texturing]] and provides the option of generating centimeter-scale details such as rust or discoloration on a surface without having to use huge textures. An example of a surface rendered with grain texture is the image of the USS Vinson flightdeck below:&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain01.jpg|700px|Grain and rain effects on Vinson's flightdeck]]&lt;br /&gt;
&lt;br /&gt;
This is done using the following effect declaration inheriting from '''model-combined-deferred.eff''' as&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt;flightdeck&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;inherits-from&amp;gt;Effects/model-combined-deferred&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
  &amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;image&amp;gt;Models/Geometry/Nimitz/rust_texture.png&amp;lt;/image&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt; &lt;br /&gt;
    &amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
    &amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
    &amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
  &amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The grain texture has the number 7 and needs to be enabled by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the value is set to 1, the grain texture uses the uv-mapping of the underlying surface. If that is very irregular (as in the case of the Vinson flightdeck), alternatively the grain can be mapped in xy-model coordinates if the parameter is set to 2, the uv-mapping of the base texture layer is then discarded.&lt;br /&gt;
&lt;br /&gt;
The resolution of the grain texture with respect to the base coordinate layer is specified by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the number is less than 0, the grain resolution is lower than the base layer. If the parameter is greater than 0, it is higher (note that in the above case, the grain is mapped to (xy) rather than (uv), hence the base size is 1 m, so the grain texture is mapped on a 10x10 m patch on the flightdeck, for which a 1024x1024 pixel texture provides ~1 cm sized details).&lt;br /&gt;
&lt;br /&gt;
=== The rain effect ===&lt;br /&gt;
&lt;br /&gt;
Any number greater than 0 passed to&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
enables the splash effect of raindrops on the surface if it points upward. The surface does not have to be flat for this to work, the effect checks for the surface normal automatically, see the rain enabled for the Citation Bravo.&lt;br /&gt;
&lt;br /&gt;
Thorsten noted about rain splashes: &amp;quot;Works fine here - runway needs to get really wet though before you see them (put the environment slider to max to achieve this quickly, it will take some waiting with just rain on).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain02.jpg|700px|Rain effect on the Citation Bravo]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Glossy surfaces ===&lt;br /&gt;
&lt;br /&gt;
To better treat the environment reflections on a glossy surface, ALS contains two options not present in the other renderers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-type type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/reflection-type&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter can currently be set to 1 or 2 and regulates how the color of the environment reflection is merged with the color of the glossy surface. If set to 1, the shader uses a color mixing as in the other two renderers, if set to 2 it uses a technique called 'grain merge' which gives different weight to the color channels. The reason for introducing type 2 was a grey tint which changed the reflected color in a unrealistic way. With FlightGear 2017.2.0 this will be fixed and  type set to 2 should be obsolete then.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-fresnel-factor type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/reflection-fresnel-factor&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter regulates how strong the Fresnel term of a glossy surface is. Many smooth surfaces reflect much more under shallow angles such that an environment reflection is not very prominent when looking under 90 degrees but dominates the visuals when looking under a grazing angle. The parameter sets the relative strength of a Fresnel reflection with respect to the basic reflection definition which is assumed to hold for vertical viewing (i.e. setting the parameter to 0.8 gives you extra glossiness under shallow angles).&lt;br /&gt;
&lt;br /&gt;
The following comparison shows the default color mixing (upper left) for a reflecting white livery and for grain merge (upper right). In addition, note the enhanced Fresnel reflectivity at the tail and the cowling on the pictures. The lower row shows (left) full reflection with default color mixing and (right) for grain merge. Default color mixing is more physically correct, while grain merge is less correct but preserves white color much better.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model default2.jpg|400px|Effect of color mixing in a reflection]]&lt;br /&gt;
[[File:Reflect Grain merge2.jpg|400px|Effect of grain merge in reflection]]&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model Default Full.jpg|400px|Full reflection with default ]]&lt;br /&gt;
[[File:Reflect Grain Merge Full.jpg|400px|Full reflection with grain merge]]&lt;br /&gt;
&lt;br /&gt;
== The exhaust flame effect ==&lt;br /&gt;
&lt;br /&gt;
Rendering proper flames of e.g. afterburners or rocket thrusters with diffuse edges is notoriously difficult - all solutions based on textured models tend to have unnaturally sharp edges. Usually the particle system is used in such cases, however at high velocities this has other issues - particles become easily separated, making flames look disrupted and detached from the exhaust.&lt;br /&gt;
&lt;br /&gt;
ALS includes a dedicated procedural effect in which the flame is rendered by numerically integrating a 3-dim distribution of glowing emitters inside a bounding box (i.e. re-creates the process by which a real flame would be seen). The function which determines the emitter distribution is partially user-controlled so that a wide range of shapes can be generated.&lt;br /&gt;
&lt;br /&gt;
To use the effect, first the bounding box has to be defined. Note that the shape and alignment of the bounding box needs to be standardized for the effect to work, i.e. you need to use either the default bounding box under Aircraft/Generic/Effects/Thruster/ or make a custom one which fits inside the default box at the same location in model coordinates.&lt;br /&gt;
&lt;br /&gt;
To change position, size and orientation of the bounding box to match with the airplane model, translate, scale and rotate animations or model offsets can later be used.&lt;br /&gt;
&lt;br /&gt;
=== Model definition for effect ===&lt;br /&gt;
This is a standard XML model definition that needs to specify the geometry, all animations and the effect to use. For the geometry you can use the standard ''Aircraft/Generic/Effects/Thruster/thrust_flame.ac'' or make your own. The F-15 uses a slightly different 3D model to allow for the nozzles. The 3D model needs to be big enough to contain the flame, bearing in mind that the flame is drawn as a cylinder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;path&amp;gt;Aircraft/Generic/Effects/Thruster/thrust_flame.ac&amp;lt;/path&amp;gt;&lt;br /&gt;
    &amp;lt;nopreview/&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;scale&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;property alias=&amp;quot;/params/augmentation-alight&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;x-min&amp;gt;0.2&amp;lt;/x-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-min&amp;gt;0.3&amp;lt;/y-min&amp;gt;&lt;br /&gt;
        &amp;lt;z-min&amp;gt;0.3&amp;lt;/z-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-max&amp;gt;1&amp;lt;/y-max&amp;gt;&lt;br /&gt;
        &amp;lt;z-max&amp;gt;1&amp;lt;/z-max&amp;gt;&lt;br /&gt;
        &amp;lt;x-factor&amp;gt;0.472&amp;lt;/x-factor&amp;gt;&lt;br /&gt;
        &amp;lt;y-factor&amp;gt;0.6&amp;lt;/y-factor&amp;gt;&lt;br /&gt;
        &amp;lt;z-factor&amp;gt;0.6&amp;lt;/z-factor&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- on the F-15 we have a property available that controls the ignition of the afterburner. If you do not wish to implement this&lt;br /&gt;
         remove the following animation tag --&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
        &amp;lt;condition&amp;gt;&lt;br /&gt;
            &amp;lt;greater-than&amp;gt;&lt;br /&gt;
                &amp;lt;property alias=&amp;quot;/params/augmentation-ignition&amp;quot;/&amp;gt;&lt;br /&gt;
                &amp;lt;value&amp;gt;0.8&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/greater-than&amp;gt;&lt;br /&gt;
        &amp;lt;/condition&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Aircraft/MyAircraft/Models/Effects/my-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''my-flame.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control how the flame looks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;AB-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
        &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;0.85&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.07&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.15&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.35&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
        &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
        &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
        &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
        &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a detailed version (utilizing 3d noise and a higher sampling resolution) available. This has to be explicitly requested in a derived effect by overriding the default shader choice with the detailed version, i.e. bu inserting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;technique n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;pass&amp;gt;&lt;br /&gt;
     &amp;lt;program&amp;gt;&lt;br /&gt;
         &amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/thrustflame-ALS-detailed.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
     &amp;lt;/program&amp;gt;&lt;br /&gt;
  &amp;lt;/pass&amp;gt;&lt;br /&gt;
  &amp;lt;/technique&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
below the parameter section.&lt;br /&gt;
&lt;br /&gt;
{{Note|The detailed shader uses four times as much performance at least - only use it if you really need it!}}&lt;br /&gt;
&lt;br /&gt;
=== F-15 Afterburner example image === &lt;br /&gt;
The F-15 afterburner flame shown below (at different ambient lighting based on time) uses the parameters above. The main parameters of importance, and therefore to tune, for an aircraft jet engine are the colors, the two densities, the flame radius fraction. The base density is at the start of the flame and this. The F-15 overlays a billboarded image to achieve the diamonds that are interleaved with the ALS drawn flame. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:F-15 afterburner using ALS Thrust Effect.jpg|700px|This shows the F-15 afterburner at different ambient light.]]&lt;br /&gt;
&lt;br /&gt;
The meaning of the parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_shocks&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; and &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_noise&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; are the parameters that control the random noise and the shock diamonds. Both are modestly computationally expensive, i.e. if these effects are not required it is better to switch them off by setting these values to zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(same for the (g,b) channels) set the color. base_flame refers to the part of the flame which is directly attached to the thruster and usually brightest. flame_color_high refers to the high density part of the flame, flame_color_low refers to the low density parts of the flame. (rgb) values always need to be [0:1]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
   &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determine the overall emitter density in the flame and in the base directly at the thruster respectively. There's no formal upper limit for the parameters, but a flame with density 1 already appears fairly opaque.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
governs how much of the bounding box the flame radius at the exhaust nozzle fills. If the flame needs to expand (as for the plume of a thruster operating in vacuum) or needs to bend (as for a flame deflected by the airstream) this parameter needs to be small, if the flame is essentially cylindrical the paramater can be chosen close to 1 to minimize clipping errors. Note that this determines the size of the flame relative to the bounding box - the overall size of the flame should be adjusted by using a scale animation on the bounding box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determined how turbulent the flame looks. noise_strength [0:1] determines how prominently the noise influences the flame and noise_scale (in meters relative to the original bounding box) determines how large the visible patches of turbulence are (given that the original bounding box is not larger than 5 m in the longest direction, the parameter should probably kept between 0.1 and 5).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
influences at what distance shock diamonds appear in the flame. Useful values are perhaps between 0.2 and 5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should take a value of between 0 and 1 and determines how collimated the flame is. For values &amp;gt; 0, the flame is widened - note that this requires a sufficiently small flame radius fraction to avoid clipping errors. For widened flames, the density is automatically lowered and shock diamonds are removed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0.&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be somewhere between 0 and 0.06 and gives a lateral deflection (such as by an airstream) to the flame. Note that this re-positions the origin of the flame in the bounding box to better utilize the bounding box volume, i.e. if you need a dynamical deflection, you also need a translate animation for the bounding box.&lt;br /&gt;
&lt;br /&gt;
Any of those parameters can be adjusted runtime  by replacing the value with &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use&amp;gt;/my-property&amp;lt;/use&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;. Dependent on how &amp;lt;code&amp;gt;/my-property&amp;lt;/code&amp;gt; is created it might be tied though (in particular JSBSim-computed properties are) in which case it is not picked up by the effect framework - you need to copy it via property rule to an untied property then. This allows to render dynamical changes of the flame.&lt;br /&gt;
&lt;br /&gt;
For instance the [[SpaceShuttle - Project Overview|Space Shuttle]] main engines use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;ssme-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r&amp;gt;0.9&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g&amp;gt;0.7&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b&amp;gt;0.5&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r&amp;gt;0.7&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g&amp;gt;0.7&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-collimation&amp;lt;/use&amp;gt;&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-density&amp;lt;/use&amp;gt;&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength&amp;gt;0.3&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale&amp;gt;0.1&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to simulate the change of flame geometry in the thin upper atmosphere during ascent:&lt;br /&gt;
&lt;br /&gt;
[[File:Shuttle flame05.jpg|400px|Space Shuttle main engine flames during early ascent]]&lt;br /&gt;
[[File:Shuttle flame06.jpg|400px|Space Shuttle main engine flames during late ascent]]&lt;br /&gt;
&lt;br /&gt;
Using the deflection parameter, the curved SRB separation motor flames are rendered using&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;SRBsep-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.55&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;-0.06&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flame_sep.jpg|700px|Space Shuttle SRB separation motor flames]]&lt;br /&gt;
&lt;br /&gt;
Application of the effect is not limited to flames, it can also do heat blur (think a very transparent, high-noise dark emitter distribution) or vapour trails and other smoke.&lt;br /&gt;
&lt;br /&gt;
By itself, the effect does however not compute ambient and diffuse light channels, i.e. for non-emissive distributions lighting is the responsibility of the user. One quick way of obtaining a correct fading of color with light in the scene is to create an untied property based on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/rendering/scene/diffuse/red&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and used this to scale all color values.&lt;br /&gt;
&lt;br /&gt;
{{note|Do not use the full (rgb) information in the property tree for ALS, it will produce pronounced color mismatches with the rest of the scene as ALS determines light inside the shader and never uses the properties.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rotor wash ==&lt;br /&gt;
&lt;br /&gt;
ALS provides an interface to render rotor wash on various terrain types - currently this is implemented for the volumetric grass as well as procedural water. This interface needs to be written aircraft-side for the effect to be rendered.&lt;br /&gt;
&lt;br /&gt;
[[File:Rotor wash.jpg|600px|Rotor wash rendered on volumetric grass]]&lt;br /&gt;
&lt;br /&gt;
Aircraft maintainers need to set three parameters in &amp;lt;b&amp;gt;/environment/aircraft-effects/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The position of the downwash column needs to be specified in &amp;lt;i&amp;gt;eye-relative&amp;lt;/i&amp;gt; coordinates by setting &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-x&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-y&amp;lt;/b&amp;gt;. If these are zero, the air column is assumed to be right underneath the eye point, any non-zero values displace the center northward or eastward from the eye point. To work in external views, the displacement needs to be computed by e.g. a Nasal script or property rules, the same is true if the rotor is not close to the eye point.&lt;br /&gt;
&lt;br /&gt;
The strength of the downwash column &amp;lt;i&amp;gt;on the ground&amp;lt;/i&amp;gt; is set by &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-strength&amp;lt;/b&amp;gt;. The parameter influences both the radius in which the effect is visible as well as the overall strength (up to a maximum). Aircraft maintainers need to adjust strength based on parameters like altitude AGL, rotor RPM, rotor radius and whatever else might influence the downwash.&lt;br /&gt;
&lt;br /&gt;
== Chute animation effect ==&lt;br /&gt;
&lt;br /&gt;
The chute animation effect is designed to provide a natural appearance of the deformation and the fluttering motion of a piece of cloth under changing stress.&lt;br /&gt;
&lt;br /&gt;
[[File:Chute seq01.jpg|400px|Drag chute separation sequence 1]] [[File:Chute seq03.jpg|400px|Drag chute separation sequence 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coordinate system ===&lt;br /&gt;
&lt;br /&gt;
The shader assumes that the 3d mesh of the chute is oriented in a particular coordinate system. The z-axis (upward) should extend from the zero point where the various ropes come together to the canopy above through the center of the model. The canopy of the chute should therefore roughly be in the xy plane.&lt;br /&gt;
&lt;br /&gt;
To position the chute correctly with the aircraft, you then need to use appropriate offsets and rotations when loading.&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''mychute.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control the behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;mychute&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/chute&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
	&amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	&amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The meaning of these parameters is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the distance of the branching point of the various lines leading to the canopy (at model coordinate zero) to the edge of the canopy. All transformations affecting the shape of the canopy (in particular the collapse of the canopy if the force is gone) will be applied with respect to this reference plane.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a normalized force applied to the canopy. The chute should be modeled with a deformation corresponding to a force parameter of 1 - any higher value will narrow the chute's radius, deepen the chute's deformation along the z-axis and increase the motion, any lower value will widen chute radius (compare screenshots above) and lessen its depth and slow down motion. The normal parameter range should be from [0:2], any higher or lower may look odd.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	 &amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are deformation modes used to animate a chute after jettison when it is no longer pulled into shape and can flutter through the air. The first one [0:1] is a general collapse into the projection plane with random deformations around, the second one [-1:1] is a gross bending mode of the projection plane itself. Before jettison, these parameters should default to 0.&lt;br /&gt;
&lt;br /&gt;
=== Jettison animation ===&lt;br /&gt;
&lt;br /&gt;
A complete animated jettison sequence is quite complex and would usually require a Nasal sequence taking the chute through a deceleration trajectory (utilizing translation and rotation animations), bending ad folding oscillations and finally some unfolding as it sinks through the air. The Space Shuttle chute uses the following control loop for 10 seconds of jettison dynamics:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var drag_chute_jettison_animation = func (time) {&lt;br /&gt;
&lt;br /&gt;
var dt = getprop(&amp;quot;/sim/time/delta-sec&amp;quot;);&lt;br /&gt;
time = time + dt;&lt;br /&gt;
&lt;br /&gt;
# horizontal motion&lt;br /&gt;
&lt;br /&gt;
var x = 0.0;&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 2.0)&lt;br /&gt;
	{x = -16.0 + 20.0 * time;}&lt;br /&gt;
else&lt;br /&gt;
	{x = 2.0 * time + 5.0 * time * time;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-dist&amp;quot;,x);&lt;br /&gt;
&lt;br /&gt;
# vertical motion&lt;br /&gt;
&lt;br /&gt;
var y = 0.0;&lt;br /&gt;
if (time &amp;gt; 5.0)&lt;br /&gt;
	{&lt;br /&gt;
	y = -2.5 + 0.6 * (time-5.0) * (time-5.0);&lt;br /&gt;
	}&lt;br /&gt;
else 	&lt;br /&gt;
	{&lt;br /&gt;
	y = -0.2 * time;&lt;br /&gt;
	}&lt;br /&gt;
if (y &amp;gt; 12.5) {y=12.5;}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-down&amp;quot;,y);&lt;br /&gt;
&lt;br /&gt;
# fold&lt;br /&gt;
&lt;br /&gt;
var f = 0.5 * time;&lt;br /&gt;
if (f&amp;gt; 1.0) {f = 1.0;}&lt;br /&gt;
if (time &amp;gt; 9.5)&lt;br /&gt;
	{f = 0.25 + 1.5 + (time-9.5);}&lt;br /&gt;
if (time &amp;gt; 6.0)&lt;br /&gt;
	{&lt;br /&gt;
 	f = f -0.3* (time-7.0); &lt;br /&gt;
	if (f&amp;lt;0.1) {f=0.1;}&lt;br /&gt;
	}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-fold&amp;quot;, f);&lt;br /&gt;
&lt;br /&gt;
# rotate&lt;br /&gt;
&lt;br /&gt;
var r = (time - 2.0) * 18.0;&lt;br /&gt;
if (r&amp;gt;90.0) {r=90.0;}&lt;br /&gt;
if (r&amp;lt;0.0) {r=0.0;}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-slant&amp;quot;, r);&lt;br /&gt;
&lt;br /&gt;
# bend&lt;br /&gt;
&lt;br /&gt;
var b = 0;&lt;br /&gt;
if (time &amp;gt; 7.5)&lt;br /&gt;
	{b = 0;}&lt;br /&gt;
else if (time &amp;gt;6.0)&lt;br /&gt;
	{b = 0.75 - 0.5 * (time - 6.0);} &lt;br /&gt;
else if (time &amp;gt; 4.5) &lt;br /&gt;
	{b = (time - 4.5) * 0.5;}&lt;br /&gt;
else {b=0;}	&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-bend&amp;quot;, b);&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 10.0) &lt;br /&gt;
	{&lt;br /&gt;
	print(&amp;quot;Exiting...&amp;quot;);&lt;br /&gt;
	settimer (func { setprop(&amp;quot;/controls/shuttle/drag-chute-deploy-timer&amp;quot;, 0); }, 0.5);&lt;br /&gt;
	return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/test/timer&amp;quot;, time);&lt;br /&gt;
&lt;br /&gt;
settimer( func{ drag_chute_jettison_animation (time); }, 0);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS glass effect ==&lt;br /&gt;
&lt;br /&gt;
As of FlightGear version 3.5, ALS supports a glass effect with dynamic response to the environment which can render, for instance, the splashes of raindrops on the canopy, frost or fogging.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass01.jpg|400px|Frost effect]]&lt;br /&gt;
[[File:Glass07.jpg|400px|Raindrop splashes]]&lt;br /&gt;
&lt;br /&gt;
The base effect properties are controlled via inheritance and the environment response run-time via properties residing in &amp;lt;b&amp;gt;/environment/aircraft-effects&amp;lt;/b&amp;gt;. Derived effects should inherit from &amp;lt;b&amp;gt;Effects/glass&amp;lt;/b&amp;gt;. Any surface using the glass effect will automatically register itself as transparent for use in [[Project Rembrandt| Rembrandt]]. &lt;br /&gt;
&lt;br /&gt;
The glass effect is primarily intended for interior views. In particular, no external fog or haze is rendered for the glass, i.e. if the effect is used in an outside view, it is the responsibility of the aircraft modeler to take care (e.g. with LOD settings or range animations) that no problems in bad visibility occur.&lt;br /&gt;
&lt;br /&gt;
=== Why a separate effect for glass seen from inside? ===&lt;br /&gt;
&lt;br /&gt;
Basically because the two situations are rather different. Slight dirt on the glass against the background of the sky from inside is rather prominent, against the background of the cockpit seen from outside it is not. Visuals from inside are dominated by Mie forward scattering of light, leading to a bright glare effect when looking at dirt, frost, fog or scratches close to the sun. From outside, reflected light rather than transmitted light is dominant. The reflection of any external object on the outside of the glass changes as the aircraft moves, this is not the case for the reflection of the cockpit in the glass seen from the inside. &lt;br /&gt;
&lt;br /&gt;
The viewing situation is also different. From the inside, we usually do not focus the eyes on the plane of the glass but look through it, from the outside the focus of the eyes is often close to the glass surface. For something half a meter before the eye, we also need to apply a lot more resolution and details than for an object typically seen from 10+ meters from the outside.&lt;br /&gt;
&lt;br /&gt;
Add to this that atmospheric fog is never relevant for glass seen from inside but for glass seen from outside, and it suddenly makes sense to use a different effect.&lt;br /&gt;
&lt;br /&gt;
The recommended effect for glass surfaces seen from outside is model-combined-transparent.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rain ===&lt;br /&gt;
Rain splashes will render automatically when the weather system reports rain via environment/rain-norm. In addition, the user can set rain splashes to render via &amp;lt;code&amp;gt;environment/aircraft-effects/ground-splash-norm&amp;lt;/code&amp;gt; (this is intended to allow splashes to be rendered e.g., for water landings of aircraft equipped with floats).&lt;br /&gt;
&lt;br /&gt;
By default, the rain splashes impact from above (more precisely the +z direction in model coordinates). This may be inadequate if the aircraft is moving. However, the shader can not know what the airstream at the glass will be, so the impact vector of rain splashes has to be modeled aircraft-side and set via &amp;lt;code&amp;gt;environment/aircraft-effects/splash-vector-x&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;splash-vector-y&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;splash-vector-z&amp;lt;/code&amp;gt;). These are likewise in model coordinates.&lt;br /&gt;
&lt;br /&gt;
As long as the length of the splash vector is less than 1, just the impact angle will change, as the length of the vector increases to 2, droplets will also be visibly moving. This allows fine control of the visuals dependent on any number of factors desired. A simple Nasal snipped varying the splash vector with airspeed for the F-16 is given below (but ''do not mindlessly copy and expect to work for any aircraft — it won't!''). This example is for normals pointing outwards, if the normals are pointing inwards the vector needs to be inverted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var splash_vec_loop = func(){&lt;br /&gt;
    var airspeed = getprop(&amp;quot;/velocities/airspeed-kt&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    # f16&lt;br /&gt;
    var airspeed_max = 120;&lt;br /&gt;
&lt;br /&gt;
    if (airspeed &amp;gt; airspeed_max) {&lt;br /&gt;
        airspeed = airspeed_max;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    airspeed = math.sqrt(airspeed / airspeed_max);&lt;br /&gt;
&lt;br /&gt;
    var splash_x = -0.1 - 2 * airspeed;&lt;br /&gt;
    var splash_y = 0.0;&lt;br /&gt;
    var splash_z = 1.0 - 1.35 * airspeed;&lt;br /&gt;
&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-x&amp;quot;, splash_x);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-y&amp;quot;, splash_y);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-z&amp;quot;, splash_z);&lt;br /&gt;
&lt;br /&gt;
    settimer(func(){&lt;br /&gt;
        splash_vec_loop();&lt;br /&gt;
    }, 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the timing constant of the loop — running the update per-frame leads to a spurious movement of the coordinate system in which rain is rendered and spoils the effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another method when using JSBSIM would be to use a combination of FCS Functions and Filters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashX&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashx&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashY&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashZ&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashz&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could reduce the above method and eliminate the &amp;quot;filters&amp;quot; by doing the following.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/airspeed-clamped-sqrt&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;  &lt;br /&gt;
                &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;min&amp;gt;&lt;br /&gt;
                            &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                            &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;/min&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashy&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
               &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yet another method (currently used in the c172p) limits movement to a range of table entries. This gives the developer the ability to control the behavior even more.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xa&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.7  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -2.1  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-za&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.17 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.35 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.3  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.9  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-zr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.127 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.29  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;0&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-x&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-y&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-z&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Frost and fogging ===&lt;br /&gt;
&lt;br /&gt;
Frost on the canopy is rendered when environment/aircraft-effects/frost-level is set in the range from 0 to 1. Again, it is up to the aircraft developer to decide at what exterior conditions frosting should happen and whether the aircraft is equipped with heating to remove the frost again.&lt;br /&gt;
&lt;br /&gt;
Fogging is controlled by environment/aircraft-effects/fog-level in the range 0 to 1. Unless a mask is used, fogging is homogeneous across the whole surface (it is really intended to be used with a mask).&lt;br /&gt;
&lt;br /&gt;
=== Tint ===&lt;br /&gt;
&lt;br /&gt;
Tinted glass can be easily created by changing &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;glass-tint type=&amp;quot;vec4d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 1.0&amp;lt;/glass-tint&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to any value desired. This will affect all effects assumed outside of the glass layer (frost and rain splashes) but not fogging inside the glass. Use primarily for development and quick tests, don't misuse the alpha value available here, it has odd side effects.&lt;br /&gt;
&lt;br /&gt;
=== Functional masks ===&lt;br /&gt;
&lt;br /&gt;
If the glass surface is uv-mapped and textured, it is possible to switch on a mask functionality in the inheritance via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;image&amp;gt;my_mask.png&amp;lt;/image&amp;gt;&lt;br /&gt;
	&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
	&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
	&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;use-mask type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-mask&amp;gt;&lt;br /&gt;
&amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The red channel in my_mask.png controls the strength of fogging, full red corresponds to maximal fogging, no red to zero fogging. This allows to selectively model the position of heaters in the cockpit. Use &amp;lt;b&amp;gt;/environment/aircraft-effects/fog-level&amp;lt;/b&amp;gt; to adjust the actual amount of fog runtime.&lt;br /&gt;
&lt;br /&gt;
The green channel of my_mask.png is the amount of reduction of rain in an area. This is intended for airplanes equipped with windshield wipers to partially clear the wiped area of the rain. Whether the windshield wiper is actually on or not is controlled runtime via &amp;lt;b&amp;gt;/environent/aircraft-effects/use-wipers&amp;lt;/b&amp;gt; (1 sets wipers to on).&lt;br /&gt;
&lt;br /&gt;
The blue channel of my_mask.png is reserved for an overlay pattern which will be drawn in an optionally specified &amp;lt;overlay-color&amp;gt; vector (white in the example xml above) - the primary function is to render damage on the glass, but with a different color, also dirt or an alternative more finely controlled frost pattern can be used. The strength of the pattern can be adjusted runtime via &amp;lt;b&amp;gt;/environment/aircraft-effects/overlay-alpha&amp;lt;/b&amp;gt;, allowing dynamical accumulation of dirt or sudden appearance of damage.&lt;br /&gt;
&lt;br /&gt;
Examples for the result of a fog mask and a damage mask are shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Glass12.jpg|400px|Crack pattern using a damage mask]]&lt;br /&gt;
[[File:Glass11.jpg|400px|Partial fogging using a mask texture]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note that by default all the runtime switches for the mask are off / set to zero! Remember to to switch them on when testing the effect!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mie scattering ===&lt;br /&gt;
&lt;br /&gt;
Most glass effects show prominent Mie forward scattering as in reality, i.e. frost patterns or fogging will appear much more prominent when looking almost towards the sun than under any other angle. While the frost pattern is normally not very prominent and one is able to look through unhindered, this changes substantially when looking into the sun, at which point it almost obscures the view.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass08.jpg|400px|Mie scattering of low light on frost]]&lt;br /&gt;
[[File:Glass13.jpg|400px|Morning sun Mie scattering on fog]]&lt;br /&gt;
&lt;br /&gt;
For frost and fog, the strength of the effect is set automatically, but for the damage/dirt layer it is under user control at effect design time. Changing the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;overlay-glare type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/overlay-glare&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from its default value allows to adjust the strength of the glare when looking through the overlay layer close to the sun.&lt;br /&gt;
&lt;br /&gt;
=== Internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
There is support for a reflection of the cockpit interior.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect.jpg|640px|Internal glass cube map reflection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This needs to be provided as a cubemap specific for the airplane and switched on via the flag &amp;lt;use-reflection&amp;gt; set to 1. The relative strength of the reflection can be optionally via &amp;lt;reflection-strength&amp;gt;. The strength of the reflection in the cockpit is dynamically adjusted for a number of factors, among them balance of direct to indirect light, the approximate amount of light falling on the surface seen in the reflection and the amount of direct sunlight falling into the eye.&lt;br /&gt;
&lt;br /&gt;
If the six cubemap faces are called my_cube_map_??.png, then using an effect file called c172p-reflect.eff the inheritance looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-reflect&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/glass&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;images&amp;gt;&lt;br /&gt;
        &amp;lt;positive-x&amp;gt;my_cube_map_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
        &amp;lt;negative-x&amp;gt;my_cube_map_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
        &amp;lt;positive-y&amp;gt;my_cube_map_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
        &amp;lt;negative-y&amp;gt;my_cube_map_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
        &amp;lt;positive-z&amp;gt;my_cube_map_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
        &amp;lt;negative-z&amp;gt;my_cube_map_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
        &amp;lt;/images&amp;gt;&lt;br /&gt;
    &amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;use-reflection type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection&amp;gt;&lt;br /&gt;
    &amp;lt;reflection-strength type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/reflection-strength&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The inheritance call includes all surface objects that use the effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-reflect&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;glas&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;rightwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;leftwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See below (Interior shading), for details on cube_map creation and orientation.&lt;br /&gt;
&lt;br /&gt;
=== Lightmaps for internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
If the cockpit is illuminated at night, the reflection map will not show this change by default. However,the glass effect supports a lightmap for the reflection, which can be used in parallel with the lightmap for the panels to show the reflection of a lit panel at night.&lt;br /&gt;
&lt;br /&gt;
Since the reflection map is a cube map, the lightmap for it has to be as well, the syntax is hence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use-reflection-lightmap type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection-lightmap&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
     &amp;lt;images&amp;gt;&lt;br /&gt;
          &amp;lt;positive-x&amp;gt;Models/Effects/interior/reflection/light-px.png&amp;lt;/positive-x&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-x&amp;gt;Models/Effects/interior/reflection/light-nx.png&amp;lt;/negative-x&amp;gt;   &lt;br /&gt;
          &amp;lt;positive-y&amp;gt;Models/Effects/interior/reflection/light-py.png&amp;lt;/positive-y&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-y&amp;gt;Models/Effects/interior/reflection/light-ny.png&amp;lt;/negative-y&amp;gt;    &lt;br /&gt;
          &amp;lt;positive-z&amp;gt;Models/Effects/interior/reflection/light-pz.png&amp;lt;/positive-z&amp;gt;      &lt;br /&gt;
          &amp;lt;negative-z&amp;gt;Models/Effects/interior/reflection/light-nz.png&amp;lt;/negative-z&amp;gt;      &lt;br /&gt;
      &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The control parameters of the lightmap otherwise parallel those of the [[Model-combined_effect]] or the model interior effect described below, i.e. up to four channels can be independently specified on the lightmap.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
By default, rain and frost are mapped to the shape of the canopy using coordinate systems that adapts to the splash vector and the canopy shape. This requires no particular action aircraft-side except to provide the bare geometry of a canopy/windshield, but may not be satisfactory in all instances - in particular for near vertical cockpit side windows the scheme does poorly.&lt;br /&gt;
&lt;br /&gt;
There are two alternative coordinate maps available in this case, controlled by the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;surface-mapping-scheme type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/surface-mapping-scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 1, the uv-mapping of the surface is used (it has to exist of course). For this to work properly, the uv-mapping needs to be sufficiently regular and roughly preserve the mapped area.&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 2, a local orthonormal system based on the normals of the surface is constructed. This no longer takes the splash vector consistently into account  and works poorly for surfaces which are flat in the (xy)-plane, but gives decent result for side windows.&lt;br /&gt;
&lt;br /&gt;
== The HUD effect ==&lt;br /&gt;
&lt;br /&gt;
The HUD effect is a variant of the glass effect designed to render the visuals of a head-up display (HUD) closer to real life. This only works if the HUD is custom-created via [[Canvas]], not via the native FG HUD mechanism as the latter by-passes the effect framework.&lt;br /&gt;
&lt;br /&gt;
The effect takes the same configuration options as the glass effect (i.e. it can render frost, damage, scratches, glare,...) but in addition it runs a blur over the HUD image and alters the color distribution of the projected symbols to de-saturate the bright parts in the center. The result looks less monochromatic and more like light projected onto a surface (left: bare canvas right: HUD effect)&lt;br /&gt;
&lt;br /&gt;
[[File:HUD effect.jpg|800px|Comparison between a bare canvas HUD (left) and the ALS HUD shader run over it (right)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
The effect is used from the model file by assigning it to the surface that also carries the canvas texture of the HUD via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Effects/hud&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;HUDImage&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should usually work out of the box, but if the HUD brightness should be changeable or the glass properties adjusted, a derived effect needs to be created.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
In addition to the parameters supported by the glass shader (which, for instance in the case of rain splashes, may or may not be appropriate for a HUD, this is left at user's discretion), the HUD effect takes the following special parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;brightness&amp;gt;1.0&amp;lt;/brightness&amp;gt;&lt;br /&gt;
   &amp;lt;sample-res&amp;gt;0.0006&amp;lt;/sample-res&amp;gt;&lt;br /&gt;
   &amp;lt;sample-far&amp;gt;2.5&amp;lt;/sample-far&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first one is the relative brightness setting of the HUD (which should equal the alpha value assigned to the canvas image of the symbols). This parameter is used to de-saturate colors in the symbol centers.&lt;br /&gt;
&lt;br /&gt;
Remaining two parameters represent the size and shape of the blur Kernel being used. The sample resolution (sample-res) determines the overall size of the blur region, the farthest sample (sample-far) how far out the tails of the blur region extend.&lt;br /&gt;
&lt;br /&gt;
Note: The number of sampling steps is not computed adaptive to these parameters, if the steps get too coarse, then multiple image echoes instead of a proper blur will be generated - adjust these parameters with care (if at all).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The display effect ==&lt;br /&gt;
&lt;br /&gt;
Like the HUD effect, the display effect augments the visuals of a canvas, but in this case it simulates the effects on a multi-function display in cockpit, i.e. emissive light from a dark background.&lt;br /&gt;
&lt;br /&gt;
For that reason, the effect takes the same set of configuration parameters as the [[#The ALS interior model effect|interior model effect]], i.e. it can be supplied for instance with an opacity map.&lt;br /&gt;
&lt;br /&gt;
The expected and tested structure of the effect is that the display content is rendered on a canvas with transparent background which in turn is above a different, dark-colored surface which stands for the display background. The best visuals are achieved when aircraft-internal shadows are rendered via opacity map on the dark surface and the corresponding contrast effects to the transparent canvas.&lt;br /&gt;
&lt;br /&gt;
[[File:Display effect03.jpg|640px|Display effect: blur at low light (left)]]&lt;br /&gt;
&lt;br /&gt;
[[File:Display effect04.jpg|640px|Display effect: extinction at strong illumination]]&lt;br /&gt;
&lt;br /&gt;
[[File:Display shader dust.jpg|640px|Display effect: dust]]&lt;br /&gt;
&lt;br /&gt;
== The ALS interior model effect  ==&lt;br /&gt;
&lt;br /&gt;
Since the interior of a cockpit is a large part of what a pilot gets to see in-flight, but this interior represents a rather special situation (light is reduced as it falls through windows, it may have artificial light, there is never any fog or haze,...) ALS offers a separate effect to specifically render the interior of a plane.&lt;br /&gt;
&lt;br /&gt;
This effect also includes optional features which will be available at higher quality settings of the model shader.&lt;br /&gt;
&lt;br /&gt;
=== Interior shadows and tinted glass effect ===&lt;br /&gt;
&lt;br /&gt;
With FlightGear version 3.5 and above, ALS now supports interior shading; i.e. the sun shining through the windows and casting shadows on the panel.&lt;br /&gt;
&lt;br /&gt;
[[File:interior01.jpg|640px|Interior shading effect]]&lt;br /&gt;
&lt;br /&gt;
This effect is based on an opacity map - a cube map of textures which tells the renderer where the cockpit is transparent and where not. The opacity map has to be created beforehand, which allows to make it quite detailed. In this map, white stands for a completely transparent surface, black for an opaque surface, colors for tinted glass which will create a colored light spot in the cockpit, grey hues for partial shadowing allowing to paint dirt effects onto the windows, and caustics can be drawn using the alpha channel: (1-alpha) will be used as an enhancement of the light at a certain spot.&lt;br /&gt;
&lt;br /&gt;
The effect is typically declared as derived by inheritance using an effect file such as c172-interior.eff which looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior-glass&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
	  &amp;lt;images&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-x&amp;gt;Models/Effects/interior/clr_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-x&amp;gt;Models/Effects/interior/clr_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-y&amp;gt;Models/Effects/interior/clr_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-y&amp;gt;Models/Effects/interior/clr_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-z&amp;gt;Models/Effects/interior/clr_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-z&amp;gt;Models/Effects/interior/clr_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
	  &amp;lt;/images&amp;gt;&lt;br /&gt;
	&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-center type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 0.5 0.0 0.3&amp;lt;/opacity-cube-center&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-scale type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.5 0.5 0.7&amp;lt;/opacity-cube-scale&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-angle type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/opacity-cube-angle&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is called by inheritance in the model.xml file.&lt;br /&gt;
&lt;br /&gt;
Imagine the opacity map as a box surrounding the cockpit and trying to closely follow its contours. The origin in the box needs to be placed into the center of the cockpit, which is what &amp;lt;b&amp;gt;&amp;lt;opacity-cube-center&amp;gt;&amp;lt;/b&amp;gt; does. Each of the three dimensions then needs to be stretched to roughly fit the layout of the canopy, this is done by &amp;lt;b&amp;gt;&amp;lt;opacity-cube-scale&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If opacity map center and scale are wrong, you will still see shadows, but they won't match the real cockpit layout (the lightspot of a window will be seen displaced and at a different size of the real window). Thus, carefully measuring the best box layout in a 3d tool is moderately important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aircraft-side the effect is called as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;PilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;CopilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;panel_1_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;InstrumentCover.001&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Panel_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Throttle&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Mixture&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Pedestal&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;TrimWheel&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;ParkingBrake&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;BackSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;FuelSelectorFace&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each object that you want the shadow effect to fall on must be included in the inheritance.&lt;br /&gt;
&lt;br /&gt;
Unless you supply a path, the cube_.png's need to reside in the same directory as the model.xml where you added the &amp;lt;effect&amp;gt; tag pair that calls c172-interior.eff, not where you put the aircraft_interior.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The orientation of the faces of each cube have to be adjusted based on the positive and negative axis of the model.&lt;br /&gt;
&lt;br /&gt;
For example, using the c172p model as a reference.&lt;br /&gt;
&lt;br /&gt;
The tail, right wing and top on the model are positive inside Blender. So the cube faces are laid out as follows.&lt;br /&gt;
&lt;br /&gt;
Note: Depending on the image's orientation when photographed the rotation direction will vary. This is assuming the images are being taken from the center of the cockpit looking out. Using compass headings to describe how to rotate the images.&lt;br /&gt;
&lt;br /&gt;
px (tail) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nx (nose) rotate 90 deg from N or S to E&lt;br /&gt;
&lt;br /&gt;
py (starboard/right) from N do not rotate&lt;br /&gt;
&lt;br /&gt;
ny (port/left) from N rotate 180 deg to S&lt;br /&gt;
&lt;br /&gt;
pz (top) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nz (bottom) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
[[File:C172p-cube.jpg|640px|Cube map layout of the c172p]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With Blender, it's pretty easy to create the cubemap.&lt;br /&gt;
&lt;br /&gt;
1. Add a camera where the cubemap will be. Set the FOV to 90 degrees.&lt;br /&gt;
2. Set the resolution to 1024x1024 (or any other square, power-of-two size).&lt;br /&gt;
3. Hide all lights and windows; disable ambient lighting (set it to black) and turn off ambient occlusion.&lt;br /&gt;
4. Set the world color to white.&lt;br /&gt;
5. Enable the compositor and add an invert node.&lt;br /&gt;
6. Render and save the six views as you would normally.&lt;br /&gt;
7. Add dirt, tinted glass color and caustics by hand&lt;br /&gt;
&lt;br /&gt;
This process depends on the model setup but it should work for most aircraft with a few tweaks.&lt;br /&gt;
&lt;br /&gt;
==== Cubemap Kit for Blender ====&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-shadow-blender-instructions.png|320px|How to make an interior cubemap with the cubemap kit]]&lt;br /&gt;
&lt;br /&gt;
See [http://chateau-logic.com/content/flightgear-interior-shadow-cubemap-kit flightgear-interior-shadow-cubemap-kit] for a premade kit to create the cubemap and the .eff sample file to use it.&lt;br /&gt;
&lt;br /&gt;
==== Important Notes ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Currently (May 2015) the effect does not deal gracefully with child models included into the main model with offsets and/or rotations because these introduce a different coordinate system in which the shadow does not match. The general idea of a code solution is known, but not implemented. Right now this can only be addressed by explicitly positioning child models in the *.ac file and not using any offsets when including them.&lt;br /&gt;
&lt;br /&gt;
=== ALS flashlight ===&lt;br /&gt;
&lt;br /&gt;
This effect is meant to imitate a hand held flashlight for use in getting instruments in the cockpit turned on in dark conditions.&lt;br /&gt;
It is almost identical in nature to ALS searchlight only it is applied using interior-model.eff.&lt;br /&gt;
It has two user defined light color filters that can be applied and also a user defined light radius setting.&lt;br /&gt;
&lt;br /&gt;
[[File:ALS flashlight.jpg|600px|ALS flashlight effect]]&lt;br /&gt;
&lt;br /&gt;
To implement this effect use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
A full definition looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-one type=&amp;quot;vec3d&amp;quot;&amp;gt;0.5 0.5 0.5&amp;lt;/light-filter-one&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-two type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.2 0.2&amp;lt;/light-filter-two&amp;gt;&lt;br /&gt;
	&amp;lt;light-radius type=&amp;quot;float&amp;quot;&amp;gt;13&amp;lt;/light-radius&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the example above light-filter-one is soft white light and light-filter-two is a soft red light.&lt;br /&gt;
&lt;br /&gt;
After defining as above you can turn it on using the following property&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 1 is light-filter-one&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 2 is light-filter-two&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The flashlight effect inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
At lowest quality level, the effect supports an implicit lightmap, i.e. a color range of the basic texture can be selected and declared to act as a lightmap. This is specifically useful to render panel backlighting as in the example below:&lt;br /&gt;
&lt;br /&gt;
[[File:Ilightmap.jpg|600px|An implicit lightmap used to simulate a backlit panel]]&lt;br /&gt;
&lt;br /&gt;
The effect is off by default and switched on by setting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/implicit-lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following parameters are available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-tag-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-tag-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the base color to be tagged, i.e. if the panel labels to be illuminated at night are white, the color needs to be set to white.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-low type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/implicit-lightmap-threshold-low&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-high type=&amp;quot;float&amp;quot;&amp;gt;1.5&amp;lt;/implicit-lightmap-threshold-high&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The thresholds determine how similar a color may be to the base color in order to be still illuminated. The measure is the Euklidean distance of the color vectors. The lower thresholds determines when illumination will start to fade, the higher threshold at what distance in color space illumination will no longer take place. The thresholds have to be adapted to the specific situation - the technique works best for high-contrast panels (white labels on black background) and may not work at all for low contrast panels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-emit-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-emit-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The emit color specifies at which color the pixel will show if it is tagged (see above) and the implicit lightmap is on (see below) - set this to the color of the backlight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-intensity type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/implicit-lightmap-intensity&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the intensity determines how brightly the illuminated pixel will shine.&lt;br /&gt;
&lt;br /&gt;
Ambiance lighting can be simulated with the following tags.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-r type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-r&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-g type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-g&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-g&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-b type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-b&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example note the use of the &amp;quot;use&amp;quot; tag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be any defined property or static value.&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The implicit lightmap inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Irradiance maps ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In the simplest rendering schemes, diffuse and specular light are assumed to be highly directional (i.e. it illuminates lit surfaces only) while ambient light is taken to be omnidirectional.&lt;br /&gt;
&lt;br /&gt;
In reality, that is hardly ever true. In a typical outside location, ambient light is mainly coming from the sky above (which is why the ground underneath a car is dark even in the absence of directional light when the sky is overcast and the sun is not visible). In an enclosed space (like a room, or an aircraft cockpit), ambient light has to fall through the windows, i.e. is mainly not coming above but falling in horizontally.&lt;br /&gt;
&lt;br /&gt;
The directional dependence is not very strong though, yet it leaves measurable effects. In rendering, this can be accounted for by irradiance maps. In the following, the interior of the C-172p is rendered in the first case using omnidirectional ambient light, in the second case using an irradiance map giving the ambient light the directionality of the cabin windows, i.e. the light falls in predominantly horizontally (in addition, a grain map is superimposed to provide structure). Note how the spatial structure of the roof, looking bland when rendered in omnidirectional light is brought out by the irradiance map.&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-irradiance01.jpg|400px|C-172p cabin interior rendered without irradiance and grain map]]&lt;br /&gt;
[[File:Als-interior-irradiance02.jpg|400px|C-172p cabin interior rendered with irradiance and grain map]]&lt;br /&gt;
&lt;br /&gt;
Irradiance mapping is configured by the following parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-type type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/irradiance-map-type&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-strength type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/irradiance-map-strength&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several pre-configured irradiance map functions which can be chosen by map type. &lt;br /&gt;
&lt;br /&gt;
0: (default) omndirectional light&lt;br /&gt;
1: light predominantly coming from above (most appropriate for fighter cockpits)&lt;br /&gt;
2: light predominantly coming from the horizon (most appropriate for GA aircraft)&lt;br /&gt;
&lt;br /&gt;
The strength of the irradiance map regulates how pronounced the asymmetry of the map will be. A strength of zero always makes the light omnidirectional, whereas a strength of 1 implies that no light is coming from any direction 90 degree to the main direction (i.e. for the option 2, a strength of 1.0 means that no ambient light will fall in from above or below and that hence horizontal surfaces will appear pitch black unless direct light falls on them)&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The irradiance map inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Explicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In addition to the implicit lightmap, it is also possible to explicitly specify a lightmap. The syntax for this exactly parallels the syntax of the [[Model-combined_effect]] which supplies lightmaps for the exterior.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/MyAircraft/Effects/my_lightmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-multi type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/lightmap-multi&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-factor type=&amp;quot;float&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0&amp;lt;/lightmap-factor&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 &amp;lt;/lightmap-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a single channel lightmap in which pixel color times the lightmap color provides the illumination. Using the multi-channel function, up to four different maps can be specified in which the (rgba) values of a pixel encode where the light falls and the associated lightmap color what color the illumination takes. Each of these maps can be switched on and off or dimmed in intensity independently.&lt;br /&gt;
&lt;br /&gt;
=== Grain map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
The grain map sets a repeating hires overlay texture which can supply a very credible illusion of structure to a surface for cheap. The syntax exactly parallels that of the [[Model-combined_effect]] ALS grain feature described above.&lt;br /&gt;
&lt;br /&gt;
For instance, the following&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/Effects/MyGrainmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;10&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a grain overlay with a 10-time higher resolution over the base texture layer.&lt;br /&gt;
&lt;br /&gt;
== ALS procedural lights ==&lt;br /&gt;
&lt;br /&gt;
The ALS framework supports procedurally generated lights (for instance aircraft position lights, strobe lights,... ) for aircraft and models. Note that the effect produces the visuals of the lights themselves, but they do not illuminate their surroundings.&lt;br /&gt;
&lt;br /&gt;
=== Why procedural lights? ===&lt;br /&gt;
&lt;br /&gt;
Traditionally aircraft position lights have been implemented as billboarded emissive textures. This technique is limited in scope, as it has difficulty producing a directional light or changes in the light appearance (for instance glare) with changed scene lighting. The ALS procedural lights are designed to give visuals consistent with the auto-generated scene lights (runway lighting, street lights) and support configurable directionality, glare and even the illumination of fog by the lights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic implementation ===&lt;br /&gt;
&lt;br /&gt;
The base of the light is a texture quad which has Effects/procedural-light.eff assigned. Start from including the template provided into your model as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;model&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;/Models/Effects/procedural_light.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
        &amp;lt;offsets&amp;gt;&lt;br /&gt;
            &amp;lt;x-m&amp;gt; 0 &amp;lt;/x-m&amp;gt;&lt;br /&gt;
            &amp;lt;y-m&amp;gt; 0 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
            &amp;lt;z-m&amp;gt; 2 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
        &amp;lt;/offsets&amp;gt;&lt;br /&gt;
 &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and configure from there according to your own needs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not billboard the light via animation!&amp;lt;/b&amp;gt; The GLSL code will take care of the billboarding. Use a scale animation to change the size of the light, do not change the quad (the *.ac) itself in size, the shader code requires its geometry to be fixed.&lt;br /&gt;
&lt;br /&gt;
The lights are currently not supported in the default or Rembrandt renderer and will simply be invisible in these frameworks.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the light ===&lt;br /&gt;
&lt;br /&gt;
Make your own derived effect inheriting from Effects/procedural-light.eff and assign it in the xml wrapper of the light.&lt;br /&gt;
&lt;br /&gt;
====The base light color set====&lt;br /&gt;
&lt;br /&gt;
The base light color can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These take the normal set of values ranging from 0 to 1. &lt;br /&gt;
&lt;br /&gt;
====Light full intensity in the center====&lt;br /&gt;
&lt;br /&gt;
Now the light appears at full intensity in the center can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea behind this is that lights give a better visual appearance if their center is rendered visually brighter and de-saturated, but this occurs only if the light is at full intensity.&lt;br /&gt;
&lt;br /&gt;
There are no sanity checks done, you can assign any center color you like even if this makes no sense - you can change center color or darken it, so use with care.&lt;br /&gt;
&lt;br /&gt;
====Runtime change the light intensity====&lt;br /&gt;
&lt;br /&gt;
To runtime change the light intensity, assign&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to a property and change that property in the range from 0 to 1. Eg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;intensity_scale&amp;gt;&lt;br /&gt;
       &amp;lt;use&amp;gt;/rendering/nav-lights-factor&amp;lt;/use&amp;gt;&lt;br /&gt;
     &amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Set directional lights====&lt;br /&gt;
&lt;br /&gt;
For directional lights, you need to assign a pointing vector in aircraft coordinates into which the light cone points and set the directionality flag to true to activate the computations. This is done via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;-1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
    &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It would be customary to pass a normalized vector, but if you don't know how to do it, the shader will do it for you. By assigning properties to the pointing coordinates, the light direction can be changed runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not use a rotation animation to change the light direction - it won't work.&amp;lt;/b&amp;gt; Make the pointing vector properties and change them to your needs.&lt;br /&gt;
&lt;br /&gt;
====Fading of a directional light====&lt;br /&gt;
[[File:Directional light.jpg|thumb|Explanation of a light radiation pattern]]&lt;br /&gt;
The fading of a directional light away from the pointing axis is controlled by passing angles (or rather sines of angles).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
    &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Up to inner_angle, the light will have full intensity. From inner to outer angle the light will linearly fade to outer_gain. From outer angle to zero angle, the light intensity will linearly fade to zero.&lt;br /&gt;
&lt;br /&gt;
====Strobe effect====&lt;br /&gt;
&lt;br /&gt;
For get an automatic strobe effect you can set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to true. If you want your own strobe pattern, generate a strobe function and use &amp;lt;b&amp;gt;intensity_scale&amp;lt;/b&amp;gt; instead to pass it to the shader.&lt;br /&gt;
&lt;br /&gt;
=== Complete example ===&lt;br /&gt;
&lt;br /&gt;
Here's the left nav light of the C-172p:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;name&amp;gt;procedural-light-nav-left&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/procedural-light&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.000&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
        &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Arc is 110 deg, is 55 deg per side, giving 35 deg from wing --&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.7002075382097097&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
        &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Angles are 0.0 at 0 deg from pointing direction, 1.0 at&lt;br /&gt;
             90/-90 deg, and 0.0 at 180/-180 deg.&lt;br /&gt;
&lt;br /&gt;
             For left navigation light we use -0/-35 .. +110/+145 for&lt;br /&gt;
             the inner/outer range. This gives an arc of 110/180 deg,&lt;br /&gt;
             or 55/90 deg from center.&lt;br /&gt;
&lt;br /&gt;
             Value = sin(angle in degrees)&lt;br /&gt;
&lt;br /&gt;
             0.8191520442889918 = 55 deg (* 2 = 110 deg inner angle)&lt;br /&gt;
             1.0000 = 90 deg (* 2 = 180 deg outer angle)&lt;br /&gt;
        --&amp;gt;&lt;br /&gt;
        &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.8191520442889918&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
        &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.982547593563&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
The Cessna 182 by Heiko Schulz and Gilberto Agostinho with procedural lights activated:&amp;lt;br&amp;gt;&lt;br /&gt;
:''(To percieve the effect well, you probably have to darken your room and switch to fullscreen)''&lt;br /&gt;
[[File:Cessna 182 with procedural lights.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
===Move dynamically the procedural light===&lt;br /&gt;
&lt;br /&gt;
The position of a procedural light is declared in the '''&amp;lt;model&amp;gt;''' section, within the '''&amp;lt;PropertyList&amp;gt;''' XML code, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;procedural-light-gear-white-left&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;path&amp;gt;Effects/lights/procedural_light_gear_white.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
      &amp;lt;offsets&amp;gt;&lt;br /&gt;
          &amp;lt;x-m&amp;gt; -3.08&amp;lt;/x-m&amp;gt;&lt;br /&gt;
          &amp;lt;y-m&amp;gt; -0.21 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
          &amp;lt;z-m&amp;gt; -1.18 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
      &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tag ''procedural-light-gear-white-left'' is very important because is the object name. This name will be used as the reference object.&amp;lt;BR&amp;gt;Next, we can define an animation in the same xml file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;GearFrontalDoor&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;gear/gear/position-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;axis&amp;gt;&lt;br /&gt;
          &amp;lt;x1-m&amp;gt;  -3.00240&amp;lt;/x1-m&amp;gt;&lt;br /&gt;
          &amp;lt;y1-m&amp;gt;  1.0&amp;lt;/y1-m&amp;gt;&lt;br /&gt;
          &amp;lt;z1-m&amp;gt;  -1.02906&amp;lt;/z1-m&amp;gt;&lt;br /&gt;
          &amp;lt;x2-m&amp;gt;  -3.00240&amp;lt;/x2-m&amp;gt;&lt;br /&gt;
          &amp;lt;y2-m&amp;gt;  -1.0&amp;lt;/y2-m&amp;gt;&lt;br /&gt;
          &amp;lt;z2-m&amp;gt;  -1.0290&amp;lt;/z2-m&amp;gt;&lt;br /&gt;
      &amp;lt;/axis&amp;gt;&lt;br /&gt;
      &amp;lt;interpolation&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.25&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.50&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;60&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.75&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;30&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;0&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
      &amp;lt;/interpolation&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''procedural light'' object code is this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS fuselage shadow effect ==&lt;br /&gt;
ALS supports the manipulation of a (simplified) ground shadow. This effect uses an existing simplified shadow animation configuration and by default uses the gear-agl-m property to calculate the ground placement of that simplified shadow.&lt;br /&gt;
&lt;br /&gt;
The system, techniques for using it, and several working examples are on [https://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=24859&amp;amp;start=135 this extensive forum thread about the ALS shadow effects].&lt;br /&gt;
&lt;br /&gt;
[[File:Alsshadow.jpg|800px|ALS Shadow]]&lt;br /&gt;
&lt;br /&gt;
The effect can be applied easily in any aircraft that report the gear-agl-m property by simply adding a declaration inheriting from shadow.eff.&lt;br /&gt;
&lt;br /&gt;
If the aircraft does not support the gear-agl-m property, (notably JSBSim), you need to create a [[Autopilot configuration reference | Property Rule]] to pass a supported AGL data to the gear-agl-m property. In this case we use altitude-agl-ft converted to meters using a property rule configuration file.&lt;br /&gt;
&lt;br /&gt;
For the first example we'll use the &amp;quot;supported gear-agl-m&amp;quot; method for aircraft that don't require a property rule.&lt;br /&gt;
&lt;br /&gt;
Simply add the following inheritance declaration after you declare your shadow animation statement.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;name_of_the_shadow_object&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the non-ALS simplified shadow code you normally use a &amp;quot;translate&amp;quot; animation to position the shadow on the ground.&lt;br /&gt;
When using the ALS method you must either remove, comment out, or apply a condition to restrict its use to non ALS shadow applications, because ALS is responsible for computing the shadows ground position.&lt;br /&gt;
&lt;br /&gt;
Here is how we apply a condition to the translation to limit it effect to non-ALS application only.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A complete shadow animation block looks like this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- opaque objects --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- transparent objects --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;not&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/rembrandt/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;/not&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;noshadow&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- pitch --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/pitch-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;-1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;1&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- roll --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/roll-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;1&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For aircraft requiring a [[Autopilot configuration reference | Property Rule]] there are a couple extra steps.&lt;br /&gt;
&lt;br /&gt;
In aircraft-set.xml you add the property rule call to the &amp;quot;configuration file&amp;quot; in between the PropertyList/sim/systems tag pairs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;property-rule n=&amp;quot;101&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;gear_agl-m&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;Aircraft/c172p/Systems/gearAGL.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
&amp;lt;/property-rule&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: the n=&amp;quot;101&amp;quot; needs to be =+100 as -100 is reserved for system wide property rules.&lt;br /&gt;
In the above example 101 was used because 100 was already being used by a previous property rule definition.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;configuration file&amp;quot; normally goes in /Systems.&lt;br /&gt;
In this example we named the configuration file /Systems/gearAGL.xml.&lt;br /&gt;
&lt;br /&gt;
Here is the complete /Systems/gearAGL.xml configuration file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;filter&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;reference&amp;gt;6&amp;lt;/reference&amp;gt;&lt;br /&gt;
    &amp;lt;output&amp;gt;/position/gear-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
  &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
What the configuration file does is convert the input of altitude-agl-ft to the output of (((altitude-agl-ft)-6)*0.3048) or (convert ft-6 to m) and pass it to /position/gear-agl-m.&lt;br /&gt;
 &lt;br /&gt;
See [[Autopilot configuration reference | Input and reference properties or values &amp;lt;input&amp;gt; and &amp;lt;reference&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
== ALS 3d shadow volume effect ==&lt;br /&gt;
What might be considered the next level of realism using a relatively &amp;quot;cheap&amp;quot; shadow effect is to use a 3d volume shadow.&lt;br /&gt;
&lt;br /&gt;
[[File:Shadow vol02.jpg|800px|ALS 3d Shadow Volume]]&lt;br /&gt;
&lt;br /&gt;
The procedure to implement the ALS shadow volume is similar to the ALS-shadow above with a few modifications.&lt;br /&gt;
&lt;br /&gt;
First you have to have a 3d shadow volume model of the aircraft you are applying the effect to. This model should be a low poly model that is optimized to be as little of a footprint as possible.&lt;br /&gt;
&lt;br /&gt;
A property rule is required, same as above. This is used to generate the above ground altitude in meters, (altitude-agl-m). The &amp;quot;altitude-agl-m&amp;quot; is used to place the shadow close to the ground in real time at an FDM rate of execution.&lt;br /&gt;
{{note|Do not confuse &amp;quot;altitude-agl-m&amp;quot; with the other type of non-3d ALS-shadow property of &amp;quot;gear-agl-m&amp;quot;. The shaders involved use these two different properties respectively for the two different effect. They are not interchangeable.}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
   &amp;lt;filter&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
      &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
      &amp;lt;reference&amp;gt;1.0&amp;lt;/reference&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;/position/altitude-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The other difference from the ALS-shadow above is that it uses a different inherited effect.&lt;br /&gt;
Instead of&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
you use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow-vol&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make sure there is no duplicate 3d model shown in other renderers besides ALS it is also important to use a different select animation:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- hide 3d shadow in non ALS mode --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Procedural Texturing]]&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS infrared vision]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;br /&gt;
[[Category:ALS]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Display_effect04.jpg&amp;diff=116182</id>
		<title>File:Display effect04.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Display_effect04.jpg&amp;diff=116182"/>
		<updated>2018-09-12T06:28:55Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=The display effect doing extinction in strong light}}&lt;br /&gt;
|date=2018-09-12&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Shaders]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Display_shader_dust.jpg&amp;diff=116181</id>
		<title>File:Display shader dust.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Display_shader_dust.jpg&amp;diff=116181"/>
		<updated>2018-09-12T06:28:55Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=The display shader rendering dust}}&lt;br /&gt;
|date=2018-09-12&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Shaders]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Display_effect03.jpg&amp;diff=116180</id>
		<title>File:Display effect03.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Display_effect03.jpg&amp;diff=116180"/>
		<updated>2018-09-12T06:28:54Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=The display shader at low light}}&lt;br /&gt;
|date=2018-09-12&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Shaders]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116179</id>
		<title>ALS technical notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116179"/>
		<updated>2018-09-12T06:25:41Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* The display effect */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Quality level mapping ==&lt;br /&gt;
The rendering quality of ALS effects is controlled by two main sliders, the landmass effects and transition effects. The transition effects slider regulates the quality of overlaid textured, while the landmass effects slider regulates all other aspects of procedural texturing, such as pixel color post-processing (dust, snow or wet terrain effects) and apparent terrain roughness (bump and parallax mapping).&lt;br /&gt;
&lt;br /&gt;
In addition, specific effects for certain terrain types (water, urban, forest, agriculture, etc.) and models in the scene can be switched on separately. In some cases, this may be needed for a consistent visual impression. For example, if a dust effect is used on the terrain, the water needs to be rendered using a separate water shader, otherwise it will appear dusty as well. Likewise, if the Rayleigh haze is used in the highest quality terrain effect, then the highest quality water effect needs to be used to see the same Rayleigh scattering effect on the water.&lt;br /&gt;
&lt;br /&gt;
For technical reasons (landmass and transition control the same shader code) the settings are sometimes mutually dependent, e.g., if the transition quality is set to level 6, it won't have any effect until the landmass quality is also set to level 6.&lt;br /&gt;
&lt;br /&gt;
=== Transition ===&lt;br /&gt;
The mapping of quality to visuals of the transition slider is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| Base texture scheme&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| Alternative hires airport keep effect&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
|&lt;br /&gt;
* Base and overlay texture, runway effect (if landmass is above level 4)&lt;br /&gt;
* Secondary lights on runway and airport keep&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| Base, overlay and hires texture&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Base, overlay, hires, detail, grain, dot and rock texture (if landmass is level 6)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Landmass ===&lt;br /&gt;
{{Note|Quality levels 1 and 2 are reserved to represent fixed pipeline rendering and the &amp;quot;default renderer&amp;quot; in an eventually merged rendering GUI. However, ALS is currently switched on per checkbox and not by quality level, and so they do not have a function.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
| ALS-rendered position-differential haze and light, moonlight&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| &lt;br /&gt;
* Procedural snow cover on terrain&lt;br /&gt;
* Procedural dust and vegetation effects&lt;br /&gt;
* Wet terrain effect with approximate reflection half vector&lt;br /&gt;
* Patchy fog distribution&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Noise bump-mapping and parallax mapping of terrain&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 6&lt;br /&gt;
| (''Requires transition effect level 6'')&lt;br /&gt;
* Wet terrain effect with correct reflection half vector&lt;br /&gt;
* Hires bump mapping and snow patchiness&lt;br /&gt;
* Variable upper haze layer surface&lt;br /&gt;
* Rayleigh haze&lt;br /&gt;
* Secondary lights on all terrain types&lt;br /&gt;
* Slope line and strata effects&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ALS secondary lights ==&lt;br /&gt;
The ALS framework supports a generic implementation of landing lights and a searchlight which are based on a framerate-friendly computation in screen coordinates, i.e., the lights project correctly ''only if the light is close to the viewer'' (typically, that would be from cockpit view). In other words, this is not a full (and rather expensive) computation of light volumes as in Rembrandt, but a much faster test of illuminated screen areas.&lt;br /&gt;
&lt;br /&gt;
[[File:Landing light03.jpg|400px|Cessna 172P using generic ALS landing lights]]&lt;br /&gt;
&lt;br /&gt;
Two landing lights and a searchlight are supported. The landing lights have a fixed position with respect to the aircraft axis (technically, with respect to the default view axis as defined in the respective view), whereas the searchlight follows any offset of the view axis in view mode, i.e., when using the mouse to look around, the searchlight will follow the motion, the landing lights will not. The lights require ALS to run above basic quality level and work on runway and airport keep above transition setting 3 and everywhere else only at highest quality setting. All lights are controlled via properties in &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The names of the properties should be self-explanatory, if for instance if &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/use-searchlight&amp;lt;/code&amp;gt; is set to true, then the searchlight (which always follows the current view axis) is used. &lt;br /&gt;
&lt;br /&gt;
The properties &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light1-offset-deg&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light2-offset-deg&amp;lt;/code&amp;gt; allow to specify angular offsets for the landing light which are then not centered on the view axis. This can be used to simulate one or two landing lights set in the wings.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv2.jpg|400px|Secondary lights vertical offset demo]]&lt;br /&gt;
&lt;br /&gt;
A third offset &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light3-offset-deg&amp;lt;/code&amp;gt; is available which allows for a vertical offset. This is especially useful for tail dagger aircraft.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv.jpg|400px|Secondary lights vertical offset settings]]&lt;br /&gt;
&lt;br /&gt;
The lights can be switched on and off from the [[Property Browser]] for any aircraft without any modifications to the aircraft definition. Implementing them correctly aircraft side thus just involves linking the landing light switches to the ALS control properties and setting the correct angular offsets. Additionally, it is recommended to switch the lights off unless in a cockpit view, as they don't project correctly for any external view.&lt;br /&gt;
&lt;br /&gt;
Range, color, light cone opening angle or intensity of the lights can currently not be configured, and there are no plans to support such a feature in the near future.&lt;br /&gt;
&lt;br /&gt;
All three lights will illuminate fog (if dense enough) and precipitation.&lt;br /&gt;
&lt;br /&gt;
[[File:Als secondary light fog.jpg|400px|ALS generic lights illuminating dense fog]]&lt;br /&gt;
&lt;br /&gt;
== ALS specific features of the model effect ==&lt;br /&gt;
&lt;br /&gt;
In addition to the features supported by the model-combined-deferred effect in all three renderers (normal, light, specular, environment reflection and dirt map), ALS also supports a couple of unique effects (which, if configured, will not have any effect in other renderers.&lt;br /&gt;
&lt;br /&gt;
=== The grain texture  ===&lt;br /&gt;
&lt;br /&gt;
ALS supports a grain texture for models. This is a semi-transparent overlay texture that works just as [[Procedural Texturing#The grain texture|its equivalent for terrain texturing]] and provides the option of generating centimeter-scale details such as rust or discoloration on a surface without having to use huge textures. An example of a surface rendered with grain texture is the image of the USS Vinson flightdeck below:&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain01.jpg|700px|Grain and rain effects on Vinson's flightdeck]]&lt;br /&gt;
&lt;br /&gt;
This is done using the following effect declaration inheriting from '''model-combined-deferred.eff''' as&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt;flightdeck&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;inherits-from&amp;gt;Effects/model-combined-deferred&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
  &amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;image&amp;gt;Models/Geometry/Nimitz/rust_texture.png&amp;lt;/image&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt; &lt;br /&gt;
    &amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
    &amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
    &amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
  &amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The grain texture has the number 7 and needs to be enabled by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the value is set to 1, the grain texture uses the uv-mapping of the underlying surface. If that is very irregular (as in the case of the Vinson flightdeck), alternatively the grain can be mapped in xy-model coordinates if the parameter is set to 2, the uv-mapping of the base texture layer is then discarded.&lt;br /&gt;
&lt;br /&gt;
The resolution of the grain texture with respect to the base coordinate layer is specified by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the number is less than 0, the grain resolution is lower than the base layer. If the parameter is greater than 0, it is higher (note that in the above case, the grain is mapped to (xy) rather than (uv), hence the base size is 1 m, so the grain texture is mapped on a 10x10 m patch on the flightdeck, for which a 1024x1024 pixel texture provides ~1 cm sized details).&lt;br /&gt;
&lt;br /&gt;
=== The rain effect ===&lt;br /&gt;
&lt;br /&gt;
Any number greater than 0 passed to&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
enables the splash effect of raindrops on the surface if it points upward. The surface does not have to be flat for this to work, the effect checks for the surface normal automatically, see the rain enabled for the Citation Bravo.&lt;br /&gt;
&lt;br /&gt;
Thorsten noted about rain splashes: &amp;quot;Works fine here - runway needs to get really wet though before you see them (put the environment slider to max to achieve this quickly, it will take some waiting with just rain on).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain02.jpg|700px|Rain effect on the Citation Bravo]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Glossy surfaces ===&lt;br /&gt;
&lt;br /&gt;
To better treat the environment reflections on a glossy surface, ALS contains two options not present in the other renderers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-type type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/reflection-type&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter can currently be set to 1 or 2 and regulates how the color of the environment reflection is merged with the color of the glossy surface. If set to 1, the shader uses a color mixing as in the other two renderers, if set to 2 it uses a technique called 'grain merge' which gives different weight to the color channels. The reason for introducing type 2 was a grey tint which changed the reflected color in a unrealistic way. With FlightGear 2017.2.0 this will be fixed and  type set to 2 should be obsolete then.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-fresnel-factor type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/reflection-fresnel-factor&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter regulates how strong the Fresnel term of a glossy surface is. Many smooth surfaces reflect much more under shallow angles such that an environment reflection is not very prominent when looking under 90 degrees but dominates the visuals when looking under a grazing angle. The parameter sets the relative strength of a Fresnel reflection with respect to the basic reflection definition which is assumed to hold for vertical viewing (i.e. setting the parameter to 0.8 gives you extra glossiness under shallow angles).&lt;br /&gt;
&lt;br /&gt;
The following comparison shows the default color mixing (upper left) for a reflecting white livery and for grain merge (upper right). In addition, note the enhanced Fresnel reflectivity at the tail and the cowling on the pictures. The lower row shows (left) full reflection with default color mixing and (right) for grain merge. Default color mixing is more physically correct, while grain merge is less correct but preserves white color much better.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model default2.jpg|400px|Effect of color mixing in a reflection]]&lt;br /&gt;
[[File:Reflect Grain merge2.jpg|400px|Effect of grain merge in reflection]]&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model Default Full.jpg|400px|Full reflection with default ]]&lt;br /&gt;
[[File:Reflect Grain Merge Full.jpg|400px|Full reflection with grain merge]]&lt;br /&gt;
&lt;br /&gt;
== The exhaust flame effect ==&lt;br /&gt;
&lt;br /&gt;
Rendering proper flames of e.g. afterburners or rocket thrusters with diffuse edges is notoriously difficult - all solutions based on textured models tend to have unnaturally sharp edges. Usually the particle system is used in such cases, however at high velocities this has other issues - particles become easily separated, making flames look disrupted and detached from the exhaust.&lt;br /&gt;
&lt;br /&gt;
ALS includes a dedicated procedural effect in which the flame is rendered by numerically integrating a 3-dim distribution of glowing emitters inside a bounding box (i.e. re-creates the process by which a real flame would be seen). The function which determines the emitter distribution is partially user-controlled so that a wide range of shapes can be generated.&lt;br /&gt;
&lt;br /&gt;
To use the effect, first the bounding box has to be defined. Note that the shape and alignment of the bounding box needs to be standardized for the effect to work, i.e. you need to use either the default bounding box under Aircraft/Generic/Effects/Thruster/ or make a custom one which fits inside the default box at the same location in model coordinates.&lt;br /&gt;
&lt;br /&gt;
To change position, size and orientation of the bounding box to match with the airplane model, translate, scale and rotate animations or model offsets can later be used.&lt;br /&gt;
&lt;br /&gt;
=== Model definition for effect ===&lt;br /&gt;
This is a standard XML model definition that needs to specify the geometry, all animations and the effect to use. For the geometry you can use the standard ''Aircraft/Generic/Effects/Thruster/thrust_flame.ac'' or make your own. The F-15 uses a slightly different 3D model to allow for the nozzles. The 3D model needs to be big enough to contain the flame, bearing in mind that the flame is drawn as a cylinder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;path&amp;gt;Aircraft/Generic/Effects/Thruster/thrust_flame.ac&amp;lt;/path&amp;gt;&lt;br /&gt;
    &amp;lt;nopreview/&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;scale&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;property alias=&amp;quot;/params/augmentation-alight&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;x-min&amp;gt;0.2&amp;lt;/x-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-min&amp;gt;0.3&amp;lt;/y-min&amp;gt;&lt;br /&gt;
        &amp;lt;z-min&amp;gt;0.3&amp;lt;/z-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-max&amp;gt;1&amp;lt;/y-max&amp;gt;&lt;br /&gt;
        &amp;lt;z-max&amp;gt;1&amp;lt;/z-max&amp;gt;&lt;br /&gt;
        &amp;lt;x-factor&amp;gt;0.472&amp;lt;/x-factor&amp;gt;&lt;br /&gt;
        &amp;lt;y-factor&amp;gt;0.6&amp;lt;/y-factor&amp;gt;&lt;br /&gt;
        &amp;lt;z-factor&amp;gt;0.6&amp;lt;/z-factor&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- on the F-15 we have a property available that controls the ignition of the afterburner. If you do not wish to implement this&lt;br /&gt;
         remove the following animation tag --&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
        &amp;lt;condition&amp;gt;&lt;br /&gt;
            &amp;lt;greater-than&amp;gt;&lt;br /&gt;
                &amp;lt;property alias=&amp;quot;/params/augmentation-ignition&amp;quot;/&amp;gt;&lt;br /&gt;
                &amp;lt;value&amp;gt;0.8&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/greater-than&amp;gt;&lt;br /&gt;
        &amp;lt;/condition&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Aircraft/MyAircraft/Models/Effects/my-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''my-flame.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control how the flame looks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;AB-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
        &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;0.85&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.07&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.15&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.35&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
        &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
        &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
        &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
        &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a detailed version (utilizing 3d noise and a higher sampling resolution) available. This has to be explicitly requested in a derived effect by overriding the default shader choice with the detailed version, i.e. bu inserting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;technique n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;pass&amp;gt;&lt;br /&gt;
     &amp;lt;program&amp;gt;&lt;br /&gt;
         &amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/thrustflame-ALS-detailed.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
     &amp;lt;/program&amp;gt;&lt;br /&gt;
  &amp;lt;/pass&amp;gt;&lt;br /&gt;
  &amp;lt;/technique&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
below the parameter section.&lt;br /&gt;
&lt;br /&gt;
{{Note|The detailed shader uses four times as much performance at least - only use it if you really need it!}}&lt;br /&gt;
&lt;br /&gt;
=== F-15 Afterburner example image === &lt;br /&gt;
The F-15 afterburner flame shown below (at different ambient lighting based on time) uses the parameters above. The main parameters of importance, and therefore to tune, for an aircraft jet engine are the colors, the two densities, the flame radius fraction. The base density is at the start of the flame and this. The F-15 overlays a billboarded image to achieve the diamonds that are interleaved with the ALS drawn flame. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:F-15 afterburner using ALS Thrust Effect.jpg|700px|This shows the F-15 afterburner at different ambient light.]]&lt;br /&gt;
&lt;br /&gt;
The meaning of the parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_shocks&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; and &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_noise&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; are the parameters that control the random noise and the shock diamonds. Both are modestly computationally expensive, i.e. if these effects are not required it is better to switch them off by setting these values to zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(same for the (g,b) channels) set the color. base_flame refers to the part of the flame which is directly attached to the thruster and usually brightest. flame_color_high refers to the high density part of the flame, flame_color_low refers to the low density parts of the flame. (rgb) values always need to be [0:1]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
   &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determine the overall emitter density in the flame and in the base directly at the thruster respectively. There's no formal upper limit for the parameters, but a flame with density 1 already appears fairly opaque.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
governs how much of the bounding box the flame radius at the exhaust nozzle fills. If the flame needs to expand (as for the plume of a thruster operating in vacuum) or needs to bend (as for a flame deflected by the airstream) this parameter needs to be small, if the flame is essentially cylindrical the paramater can be chosen close to 1 to minimize clipping errors. Note that this determines the size of the flame relative to the bounding box - the overall size of the flame should be adjusted by using a scale animation on the bounding box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determined how turbulent the flame looks. noise_strength [0:1] determines how prominently the noise influences the flame and noise_scale (in meters relative to the original bounding box) determines how large the visible patches of turbulence are (given that the original bounding box is not larger than 5 m in the longest direction, the parameter should probably kept between 0.1 and 5).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
influences at what distance shock diamonds appear in the flame. Useful values are perhaps between 0.2 and 5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should take a value of between 0 and 1 and determines how collimated the flame is. For values &amp;gt; 0, the flame is widened - note that this requires a sufficiently small flame radius fraction to avoid clipping errors. For widened flames, the density is automatically lowered and shock diamonds are removed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0.&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be somewhere between 0 and 0.06 and gives a lateral deflection (such as by an airstream) to the flame. Note that this re-positions the origin of the flame in the bounding box to better utilize the bounding box volume, i.e. if you need a dynamical deflection, you also need a translate animation for the bounding box.&lt;br /&gt;
&lt;br /&gt;
Any of those parameters can be adjusted runtime  by replacing the value with &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use&amp;gt;/my-property&amp;lt;/use&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;. Dependent on how &amp;lt;code&amp;gt;/my-property&amp;lt;/code&amp;gt; is created it might be tied though (in particular JSBSim-computed properties are) in which case it is not picked up by the effect framework - you need to copy it via property rule to an untied property then. This allows to render dynamical changes of the flame.&lt;br /&gt;
&lt;br /&gt;
For instance the [[SpaceShuttle - Project Overview|Space Shuttle]] main engines use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;ssme-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r&amp;gt;0.9&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g&amp;gt;0.7&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b&amp;gt;0.5&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r&amp;gt;0.7&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g&amp;gt;0.7&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-collimation&amp;lt;/use&amp;gt;&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-density&amp;lt;/use&amp;gt;&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength&amp;gt;0.3&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale&amp;gt;0.1&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to simulate the change of flame geometry in the thin upper atmosphere during ascent:&lt;br /&gt;
&lt;br /&gt;
[[File:Shuttle flame05.jpg|400px|Space Shuttle main engine flames during early ascent]]&lt;br /&gt;
[[File:Shuttle flame06.jpg|400px|Space Shuttle main engine flames during late ascent]]&lt;br /&gt;
&lt;br /&gt;
Using the deflection parameter, the curved SRB separation motor flames are rendered using&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;SRBsep-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.55&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;-0.06&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flame_sep.jpg|700px|Space Shuttle SRB separation motor flames]]&lt;br /&gt;
&lt;br /&gt;
Application of the effect is not limited to flames, it can also do heat blur (think a very transparent, high-noise dark emitter distribution) or vapour trails and other smoke.&lt;br /&gt;
&lt;br /&gt;
By itself, the effect does however not compute ambient and diffuse light channels, i.e. for non-emissive distributions lighting is the responsibility of the user. One quick way of obtaining a correct fading of color with light in the scene is to create an untied property based on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/rendering/scene/diffuse/red&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and used this to scale all color values.&lt;br /&gt;
&lt;br /&gt;
{{note|Do not use the full (rgb) information in the property tree for ALS, it will produce pronounced color mismatches with the rest of the scene as ALS determines light inside the shader and never uses the properties.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rotor wash ==&lt;br /&gt;
&lt;br /&gt;
ALS provides an interface to render rotor wash on various terrain types - currently this is implemented for the volumetric grass as well as procedural water. This interface needs to be written aircraft-side for the effect to be rendered.&lt;br /&gt;
&lt;br /&gt;
[[File:Rotor wash.jpg|600px|Rotor wash rendered on volumetric grass]]&lt;br /&gt;
&lt;br /&gt;
Aircraft maintainers need to set three parameters in &amp;lt;b&amp;gt;/environment/aircraft-effects/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The position of the downwash column needs to be specified in &amp;lt;i&amp;gt;eye-relative&amp;lt;/i&amp;gt; coordinates by setting &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-x&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-y&amp;lt;/b&amp;gt;. If these are zero, the air column is assumed to be right underneath the eye point, any non-zero values displace the center northward or eastward from the eye point. To work in external views, the displacement needs to be computed by e.g. a Nasal script or property rules, the same is true if the rotor is not close to the eye point.&lt;br /&gt;
&lt;br /&gt;
The strength of the downwash column &amp;lt;i&amp;gt;on the ground&amp;lt;/i&amp;gt; is set by &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-strength&amp;lt;/b&amp;gt;. The parameter influences both the radius in which the effect is visible as well as the overall strength (up to a maximum). Aircraft maintainers need to adjust strength based on parameters like altitude AGL, rotor RPM, rotor radius and whatever else might influence the downwash.&lt;br /&gt;
&lt;br /&gt;
== Chute animation effect ==&lt;br /&gt;
&lt;br /&gt;
The chute animation effect is designed to provide a natural appearance of the deformation and the fluttering motion of a piece of cloth under changing stress.&lt;br /&gt;
&lt;br /&gt;
[[File:Chute seq01.jpg|400px|Drag chute separation sequence 1]] [[File:Chute seq03.jpg|400px|Drag chute separation sequence 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coordinate system ===&lt;br /&gt;
&lt;br /&gt;
The shader assumes that the 3d mesh of the chute is oriented in a particular coordinate system. The z-axis (upward) should extend from the zero point where the various ropes come together to the canopy above through the center of the model. The canopy of the chute should therefore roughly be in the xy plane.&lt;br /&gt;
&lt;br /&gt;
To position the chute correctly with the aircraft, you then need to use appropriate offsets and rotations when loading.&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''mychute.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control the behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;mychute&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/chute&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
	&amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	&amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The meaning of these parameters is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the distance of the branching point of the various lines leading to the canopy (at model coordinate zero) to the edge of the canopy. All transformations affecting the shape of the canopy (in particular the collapse of the canopy if the force is gone) will be applied with respect to this reference plane.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a normalized force applied to the canopy. The chute should be modeled with a deformation corresponding to a force parameter of 1 - any higher value will narrow the chute's radius, deepen the chute's deformation along the z-axis and increase the motion, any lower value will widen chute radius (compare screenshots above) and lessen its depth and slow down motion. The normal parameter range should be from [0:2], any higher or lower may look odd.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	 &amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are deformation modes used to animate a chute after jettison when it is no longer pulled into shape and can flutter through the air. The first one [0:1] is a general collapse into the projection plane with random deformations around, the second one [-1:1] is a gross bending mode of the projection plane itself. Before jettison, these parameters should default to 0.&lt;br /&gt;
&lt;br /&gt;
=== Jettison animation ===&lt;br /&gt;
&lt;br /&gt;
A complete animated jettison sequence is quite complex and would usually require a Nasal sequence taking the chute through a deceleration trajectory (utilizing translation and rotation animations), bending ad folding oscillations and finally some unfolding as it sinks through the air. The Space Shuttle chute uses the following control loop for 10 seconds of jettison dynamics:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var drag_chute_jettison_animation = func (time) {&lt;br /&gt;
&lt;br /&gt;
var dt = getprop(&amp;quot;/sim/time/delta-sec&amp;quot;);&lt;br /&gt;
time = time + dt;&lt;br /&gt;
&lt;br /&gt;
# horizontal motion&lt;br /&gt;
&lt;br /&gt;
var x = 0.0;&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 2.0)&lt;br /&gt;
	{x = -16.0 + 20.0 * time;}&lt;br /&gt;
else&lt;br /&gt;
	{x = 2.0 * time + 5.0 * time * time;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-dist&amp;quot;,x);&lt;br /&gt;
&lt;br /&gt;
# vertical motion&lt;br /&gt;
&lt;br /&gt;
var y = 0.0;&lt;br /&gt;
if (time &amp;gt; 5.0)&lt;br /&gt;
	{&lt;br /&gt;
	y = -2.5 + 0.6 * (time-5.0) * (time-5.0);&lt;br /&gt;
	}&lt;br /&gt;
else 	&lt;br /&gt;
	{&lt;br /&gt;
	y = -0.2 * time;&lt;br /&gt;
	}&lt;br /&gt;
if (y &amp;gt; 12.5) {y=12.5;}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-down&amp;quot;,y);&lt;br /&gt;
&lt;br /&gt;
# fold&lt;br /&gt;
&lt;br /&gt;
var f = 0.5 * time;&lt;br /&gt;
if (f&amp;gt; 1.0) {f = 1.0;}&lt;br /&gt;
if (time &amp;gt; 9.5)&lt;br /&gt;
	{f = 0.25 + 1.5 + (time-9.5);}&lt;br /&gt;
if (time &amp;gt; 6.0)&lt;br /&gt;
	{&lt;br /&gt;
 	f = f -0.3* (time-7.0); &lt;br /&gt;
	if (f&amp;lt;0.1) {f=0.1;}&lt;br /&gt;
	}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-fold&amp;quot;, f);&lt;br /&gt;
&lt;br /&gt;
# rotate&lt;br /&gt;
&lt;br /&gt;
var r = (time - 2.0) * 18.0;&lt;br /&gt;
if (r&amp;gt;90.0) {r=90.0;}&lt;br /&gt;
if (r&amp;lt;0.0) {r=0.0;}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-slant&amp;quot;, r);&lt;br /&gt;
&lt;br /&gt;
# bend&lt;br /&gt;
&lt;br /&gt;
var b = 0;&lt;br /&gt;
if (time &amp;gt; 7.5)&lt;br /&gt;
	{b = 0;}&lt;br /&gt;
else if (time &amp;gt;6.0)&lt;br /&gt;
	{b = 0.75 - 0.5 * (time - 6.0);} &lt;br /&gt;
else if (time &amp;gt; 4.5) &lt;br /&gt;
	{b = (time - 4.5) * 0.5;}&lt;br /&gt;
else {b=0;}	&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-bend&amp;quot;, b);&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 10.0) &lt;br /&gt;
	{&lt;br /&gt;
	print(&amp;quot;Exiting...&amp;quot;);&lt;br /&gt;
	settimer (func { setprop(&amp;quot;/controls/shuttle/drag-chute-deploy-timer&amp;quot;, 0); }, 0.5);&lt;br /&gt;
	return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/test/timer&amp;quot;, time);&lt;br /&gt;
&lt;br /&gt;
settimer( func{ drag_chute_jettison_animation (time); }, 0);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS glass effect ==&lt;br /&gt;
&lt;br /&gt;
As of FlightGear version 3.5, ALS supports a glass effect with dynamic response to the environment which can render, for instance, the splashes of raindrops on the canopy, frost or fogging.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass01.jpg|400px|Frost effect]]&lt;br /&gt;
[[File:Glass07.jpg|400px|Raindrop splashes]]&lt;br /&gt;
&lt;br /&gt;
The base effect properties are controlled via inheritance and the environment response run-time via properties residing in &amp;lt;b&amp;gt;/environment/aircraft-effects&amp;lt;/b&amp;gt;. Derived effects should inherit from &amp;lt;b&amp;gt;Effects/glass&amp;lt;/b&amp;gt;. Any surface using the glass effect will automatically register itself as transparent for use in [[Project Rembrandt| Rembrandt]]. &lt;br /&gt;
&lt;br /&gt;
The glass effect is primarily intended for interior views. In particular, no external fog or haze is rendered for the glass, i.e. if the effect is used in an outside view, it is the responsibility of the aircraft modeler to take care (e.g. with LOD settings or range animations) that no problems in bad visibility occur.&lt;br /&gt;
&lt;br /&gt;
=== Why a separate effect for glass seen from inside? ===&lt;br /&gt;
&lt;br /&gt;
Basically because the two situations are rather different. Slight dirt on the glass against the background of the sky from inside is rather prominent, against the background of the cockpit seen from outside it is not. Visuals from inside are dominated by Mie forward scattering of light, leading to a bright glare effect when looking at dirt, frost, fog or scratches close to the sun. From outside, reflected light rather than transmitted light is dominant. The reflection of any external object on the outside of the glass changes as the aircraft moves, this is not the case for the reflection of the cockpit in the glass seen from the inside. &lt;br /&gt;
&lt;br /&gt;
The viewing situation is also different. From the inside, we usually do not focus the eyes on the plane of the glass but look through it, from the outside the focus of the eyes is often close to the glass surface. For something half a meter before the eye, we also need to apply a lot more resolution and details than for an object typically seen from 10+ meters from the outside.&lt;br /&gt;
&lt;br /&gt;
Add to this that atmospheric fog is never relevant for glass seen from inside but for glass seen from outside, and it suddenly makes sense to use a different effect.&lt;br /&gt;
&lt;br /&gt;
The recommended effect for glass surfaces seen from outside is model-combined-transparent.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rain ===&lt;br /&gt;
Rain splashes will render automatically when the weather system reports rain via environment/rain-norm. In addition, the user can set rain splashes to render via &amp;lt;code&amp;gt;environment/aircraft-effects/ground-splash-norm&amp;lt;/code&amp;gt; (this is intended to allow splashes to be rendered e.g., for water landings of aircraft equipped with floats).&lt;br /&gt;
&lt;br /&gt;
By default, the rain splashes impact from above (more precisely the +z direction in model coordinates). This may be inadequate if the aircraft is moving. However, the shader can not know what the airstream at the glass will be, so the impact vector of rain splashes has to be modeled aircraft-side and set via &amp;lt;code&amp;gt;environment/aircraft-effects/splash-vector-x&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;splash-vector-y&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;splash-vector-z&amp;lt;/code&amp;gt;). These are likewise in model coordinates.&lt;br /&gt;
&lt;br /&gt;
As long as the length of the splash vector is less than 1, just the impact angle will change, as the length of the vector increases to 2, droplets will also be visibly moving. This allows fine control of the visuals dependent on any number of factors desired. A simple Nasal snipped varying the splash vector with airspeed for the F-16 is given below (but ''do not mindlessly copy and expect to work for any aircraft — it won't!''). This example is for normals pointing outwards, if the normals are pointing inwards the vector needs to be inverted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var splash_vec_loop = func(){&lt;br /&gt;
    var airspeed = getprop(&amp;quot;/velocities/airspeed-kt&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    # f16&lt;br /&gt;
    var airspeed_max = 120;&lt;br /&gt;
&lt;br /&gt;
    if (airspeed &amp;gt; airspeed_max) {&lt;br /&gt;
        airspeed = airspeed_max;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    airspeed = math.sqrt(airspeed / airspeed_max);&lt;br /&gt;
&lt;br /&gt;
    var splash_x = -0.1 - 2 * airspeed;&lt;br /&gt;
    var splash_y = 0.0;&lt;br /&gt;
    var splash_z = 1.0 - 1.35 * airspeed;&lt;br /&gt;
&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-x&amp;quot;, splash_x);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-y&amp;quot;, splash_y);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-z&amp;quot;, splash_z);&lt;br /&gt;
&lt;br /&gt;
    settimer(func(){&lt;br /&gt;
        splash_vec_loop();&lt;br /&gt;
    }, 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the timing constant of the loop — running the update per-frame leads to a spurious movement of the coordinate system in which rain is rendered and spoils the effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another method when using JSBSIM would be to use a combination of FCS Functions and Filters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashX&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashx&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashY&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashZ&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashz&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could reduce the above method and eliminate the &amp;quot;filters&amp;quot; by doing the following.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/airspeed-clamped-sqrt&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;  &lt;br /&gt;
                &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;min&amp;gt;&lt;br /&gt;
                            &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                            &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;/min&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashy&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
               &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yet another method (currently used in the c172p) limits movement to a range of table entries. This gives the developer the ability to control the behavior even more.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xa&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.7  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -2.1  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-za&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.17 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.35 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.3  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.9  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-zr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.127 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.29  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;0&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-x&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-y&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-z&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Frost and fogging ===&lt;br /&gt;
&lt;br /&gt;
Frost on the canopy is rendered when environment/aircraft-effects/frost-level is set in the range from 0 to 1. Again, it is up to the aircraft developer to decide at what exterior conditions frosting should happen and whether the aircraft is equipped with heating to remove the frost again.&lt;br /&gt;
&lt;br /&gt;
Fogging is controlled by environment/aircraft-effects/fog-level in the range 0 to 1. Unless a mask is used, fogging is homogeneous across the whole surface (it is really intended to be used with a mask).&lt;br /&gt;
&lt;br /&gt;
=== Tint ===&lt;br /&gt;
&lt;br /&gt;
Tinted glass can be easily created by changing &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;glass-tint type=&amp;quot;vec4d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 1.0&amp;lt;/glass-tint&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to any value desired. This will affect all effects assumed outside of the glass layer (frost and rain splashes) but not fogging inside the glass. Use primarily for development and quick tests, don't misuse the alpha value available here, it has odd side effects.&lt;br /&gt;
&lt;br /&gt;
=== Functional masks ===&lt;br /&gt;
&lt;br /&gt;
If the glass surface is uv-mapped and textured, it is possible to switch on a mask functionality in the inheritance via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;image&amp;gt;my_mask.png&amp;lt;/image&amp;gt;&lt;br /&gt;
	&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
	&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
	&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;use-mask type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-mask&amp;gt;&lt;br /&gt;
&amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The red channel in my_mask.png controls the strength of fogging, full red corresponds to maximal fogging, no red to zero fogging. This allows to selectively model the position of heaters in the cockpit. Use &amp;lt;b&amp;gt;/environment/aircraft-effects/fog-level&amp;lt;/b&amp;gt; to adjust the actual amount of fog runtime.&lt;br /&gt;
&lt;br /&gt;
The green channel of my_mask.png is the amount of reduction of rain in an area. This is intended for airplanes equipped with windshield wipers to partially clear the wiped area of the rain. Whether the windshield wiper is actually on or not is controlled runtime via &amp;lt;b&amp;gt;/environent/aircraft-effects/use-wipers&amp;lt;/b&amp;gt; (1 sets wipers to on).&lt;br /&gt;
&lt;br /&gt;
The blue channel of my_mask.png is reserved for an overlay pattern which will be drawn in an optionally specified &amp;lt;overlay-color&amp;gt; vector (white in the example xml above) - the primary function is to render damage on the glass, but with a different color, also dirt or an alternative more finely controlled frost pattern can be used. The strength of the pattern can be adjusted runtime via &amp;lt;b&amp;gt;/environment/aircraft-effects/overlay-alpha&amp;lt;/b&amp;gt;, allowing dynamical accumulation of dirt or sudden appearance of damage.&lt;br /&gt;
&lt;br /&gt;
Examples for the result of a fog mask and a damage mask are shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Glass12.jpg|400px|Crack pattern using a damage mask]]&lt;br /&gt;
[[File:Glass11.jpg|400px|Partial fogging using a mask texture]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note that by default all the runtime switches for the mask are off / set to zero! Remember to to switch them on when testing the effect!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mie scattering ===&lt;br /&gt;
&lt;br /&gt;
Most glass effects show prominent Mie forward scattering as in reality, i.e. frost patterns or fogging will appear much more prominent when looking almost towards the sun than under any other angle. While the frost pattern is normally not very prominent and one is able to look through unhindered, this changes substantially when looking into the sun, at which point it almost obscures the view.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass08.jpg|400px|Mie scattering of low light on frost]]&lt;br /&gt;
[[File:Glass13.jpg|400px|Morning sun Mie scattering on fog]]&lt;br /&gt;
&lt;br /&gt;
For frost and fog, the strength of the effect is set automatically, but for the damage/dirt layer it is under user control at effect design time. Changing the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;overlay-glare type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/overlay-glare&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from its default value allows to adjust the strength of the glare when looking through the overlay layer close to the sun.&lt;br /&gt;
&lt;br /&gt;
=== Internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
There is support for a reflection of the cockpit interior.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect.jpg|640px|Internal glass cube map reflection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This needs to be provided as a cubemap specific for the airplane and switched on via the flag &amp;lt;use-reflection&amp;gt; set to 1. The relative strength of the reflection can be optionally via &amp;lt;reflection-strength&amp;gt;. The strength of the reflection in the cockpit is dynamically adjusted for a number of factors, among them balance of direct to indirect light, the approximate amount of light falling on the surface seen in the reflection and the amount of direct sunlight falling into the eye.&lt;br /&gt;
&lt;br /&gt;
If the six cubemap faces are called my_cube_map_??.png, then using an effect file called c172p-reflect.eff the inheritance looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-reflect&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/glass&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;images&amp;gt;&lt;br /&gt;
        &amp;lt;positive-x&amp;gt;my_cube_map_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
        &amp;lt;negative-x&amp;gt;my_cube_map_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
        &amp;lt;positive-y&amp;gt;my_cube_map_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
        &amp;lt;negative-y&amp;gt;my_cube_map_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
        &amp;lt;positive-z&amp;gt;my_cube_map_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
        &amp;lt;negative-z&amp;gt;my_cube_map_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
        &amp;lt;/images&amp;gt;&lt;br /&gt;
    &amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;use-reflection type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection&amp;gt;&lt;br /&gt;
    &amp;lt;reflection-strength type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/reflection-strength&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The inheritance call includes all surface objects that use the effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-reflect&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;glas&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;rightwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;leftwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See below (Interior shading), for details on cube_map creation and orientation.&lt;br /&gt;
&lt;br /&gt;
=== Lightmaps for internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
If the cockpit is illuminated at night, the reflection map will not show this change by default. However,the glass effect supports a lightmap for the reflection, which can be used in parallel with the lightmap for the panels to show the reflection of a lit panel at night.&lt;br /&gt;
&lt;br /&gt;
Since the reflection map is a cube map, the lightmap for it has to be as well, the syntax is hence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use-reflection-lightmap type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection-lightmap&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
     &amp;lt;images&amp;gt;&lt;br /&gt;
          &amp;lt;positive-x&amp;gt;Models/Effects/interior/reflection/light-px.png&amp;lt;/positive-x&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-x&amp;gt;Models/Effects/interior/reflection/light-nx.png&amp;lt;/negative-x&amp;gt;   &lt;br /&gt;
          &amp;lt;positive-y&amp;gt;Models/Effects/interior/reflection/light-py.png&amp;lt;/positive-y&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-y&amp;gt;Models/Effects/interior/reflection/light-ny.png&amp;lt;/negative-y&amp;gt;    &lt;br /&gt;
          &amp;lt;positive-z&amp;gt;Models/Effects/interior/reflection/light-pz.png&amp;lt;/positive-z&amp;gt;      &lt;br /&gt;
          &amp;lt;negative-z&amp;gt;Models/Effects/interior/reflection/light-nz.png&amp;lt;/negative-z&amp;gt;      &lt;br /&gt;
      &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The control parameters of the lightmap otherwise parallel those of the [[Model-combined_effect]] or the model interior effect described below, i.e. up to four channels can be independently specified on the lightmap.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
By default, rain and frost are mapped to the shape of the canopy using coordinate systems that adapts to the splash vector and the canopy shape. This requires no particular action aircraft-side except to provide the bare geometry of a canopy/windshield, but may not be satisfactory in all instances - in particular for near vertical cockpit side windows the scheme does poorly.&lt;br /&gt;
&lt;br /&gt;
There are two alternative coordinate maps available in this case, controlled by the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;surface-mapping-scheme type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/surface-mapping-scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 1, the uv-mapping of the surface is used (it has to exist of course). For this to work properly, the uv-mapping needs to be sufficiently regular and roughly preserve the mapped area.&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 2, a local orthonormal system based on the normals of the surface is constructed. This no longer takes the splash vector consistently into account  and works poorly for surfaces which are flat in the (xy)-plane, but gives decent result for side windows.&lt;br /&gt;
&lt;br /&gt;
== The HUD effect ==&lt;br /&gt;
&lt;br /&gt;
The HUD effect is a variant of the glass effect designed to render the visuals of a head-up display (HUD) closer to real life. This only works if the HUD is custom-created via [[Canvas]], not via the native FG HUD mechanism as the latter by-passes the effect framework.&lt;br /&gt;
&lt;br /&gt;
The effect takes the same configuration options as the glass effect (i.e. it can render frost, damage, scratches, glare,...) but in addition it runs a blur over the HUD image and alters the color distribution of the projected symbols to de-saturate the bright parts in the center. The result looks less monochromatic and more like light projected onto a surface (left: bare canvas right: HUD effect)&lt;br /&gt;
&lt;br /&gt;
[[File:HUD effect.jpg|800px|Comparison between a bare canvas HUD (left) and the ALS HUD shader run over it (right)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
The effect is used from the model file by assigning it to the surface that also carries the canvas texture of the HUD via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Effects/hud&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;HUDImage&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should usually work out of the box, but if the HUD brightness should be changeable or the glass properties adjusted, a derived effect needs to be created.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
In addition to the parameters supported by the glass shader (which, for instance in the case of rain splashes, may or may not be appropriate for a HUD, this is left at user's discretion), the HUD effect takes the following special parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;brightness&amp;gt;1.0&amp;lt;/brightness&amp;gt;&lt;br /&gt;
   &amp;lt;sample-res&amp;gt;0.0006&amp;lt;/sample-res&amp;gt;&lt;br /&gt;
   &amp;lt;sample-far&amp;gt;2.5&amp;lt;/sample-far&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first one is the relative brightness setting of the HUD (which should equal the alpha value assigned to the canvas image of the symbols). This parameter is used to de-saturate colors in the symbol centers.&lt;br /&gt;
&lt;br /&gt;
Remaining two parameters represent the size and shape of the blur Kernel being used. The sample resolution (sample-res) determines the overall size of the blur region, the farthest sample (sample-far) how far out the tails of the blur region extend.&lt;br /&gt;
&lt;br /&gt;
Note: The number of sampling steps is not computed adaptive to these parameters, if the steps get too coarse, then multiple image echoes instead of a proper blur will be generated - adjust these parameters with care (if at all).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The display effect ==&lt;br /&gt;
&lt;br /&gt;
Like the HUD effect, the display effect augments the visuals of a canvas, but in this case it simulates the effects on a multi-function display in cockpit, i.e. emissive light from a dark background.&lt;br /&gt;
&lt;br /&gt;
For that reason, the effect takes the same set of configuration parameters as the [[#The ALS interior model effect|interior model effect]], i.e. it can be supplied for instance with an opacity map.&lt;br /&gt;
&lt;br /&gt;
The expected and tested structure of the effect is that the display content is rendered on a canvas with transparent background which in turn is above a different, dark-colored surface which stands for the display background. The best visuals are achieved when aircraft-internal shadows are rendered via opacity map on the dark surface and the corresponding contrast effects to the transparent canvas.&lt;br /&gt;
&lt;br /&gt;
== The ALS interior model effect  ==&lt;br /&gt;
&lt;br /&gt;
Since the interior of a cockpit is a large part of what a pilot gets to see in-flight, but this interior represents a rather special situation (light is reduced as it falls through windows, it may have artificial light, there is never any fog or haze,...) ALS offers a separate effect to specifically render the interior of a plane.&lt;br /&gt;
&lt;br /&gt;
This effect also includes optional features which will be available at higher quality settings of the model shader.&lt;br /&gt;
&lt;br /&gt;
=== Interior shadows and tinted glass effect ===&lt;br /&gt;
&lt;br /&gt;
With FlightGear version 3.5 and above, ALS now supports interior shading; i.e. the sun shining through the windows and casting shadows on the panel.&lt;br /&gt;
&lt;br /&gt;
[[File:interior01.jpg|640px|Interior shading effect]]&lt;br /&gt;
&lt;br /&gt;
This effect is based on an opacity map - a cube map of textures which tells the renderer where the cockpit is transparent and where not. The opacity map has to be created beforehand, which allows to make it quite detailed. In this map, white stands for a completely transparent surface, black for an opaque surface, colors for tinted glass which will create a colored light spot in the cockpit, grey hues for partial shadowing allowing to paint dirt effects onto the windows, and caustics can be drawn using the alpha channel: (1-alpha) will be used as an enhancement of the light at a certain spot.&lt;br /&gt;
&lt;br /&gt;
The effect is typically declared as derived by inheritance using an effect file such as c172-interior.eff which looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior-glass&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
	  &amp;lt;images&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-x&amp;gt;Models/Effects/interior/clr_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-x&amp;gt;Models/Effects/interior/clr_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-y&amp;gt;Models/Effects/interior/clr_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-y&amp;gt;Models/Effects/interior/clr_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-z&amp;gt;Models/Effects/interior/clr_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-z&amp;gt;Models/Effects/interior/clr_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
	  &amp;lt;/images&amp;gt;&lt;br /&gt;
	&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-center type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 0.5 0.0 0.3&amp;lt;/opacity-cube-center&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-scale type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.5 0.5 0.7&amp;lt;/opacity-cube-scale&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-angle type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/opacity-cube-angle&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is called by inheritance in the model.xml file.&lt;br /&gt;
&lt;br /&gt;
Imagine the opacity map as a box surrounding the cockpit and trying to closely follow its contours. The origin in the box needs to be placed into the center of the cockpit, which is what &amp;lt;b&amp;gt;&amp;lt;opacity-cube-center&amp;gt;&amp;lt;/b&amp;gt; does. Each of the three dimensions then needs to be stretched to roughly fit the layout of the canopy, this is done by &amp;lt;b&amp;gt;&amp;lt;opacity-cube-scale&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If opacity map center and scale are wrong, you will still see shadows, but they won't match the real cockpit layout (the lightspot of a window will be seen displaced and at a different size of the real window). Thus, carefully measuring the best box layout in a 3d tool is moderately important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aircraft-side the effect is called as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;PilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;CopilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;panel_1_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;InstrumentCover.001&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Panel_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Throttle&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Mixture&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Pedestal&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;TrimWheel&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;ParkingBrake&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;BackSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;FuelSelectorFace&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each object that you want the shadow effect to fall on must be included in the inheritance.&lt;br /&gt;
&lt;br /&gt;
Unless you supply a path, the cube_.png's need to reside in the same directory as the model.xml where you added the &amp;lt;effect&amp;gt; tag pair that calls c172-interior.eff, not where you put the aircraft_interior.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The orientation of the faces of each cube have to be adjusted based on the positive and negative axis of the model.&lt;br /&gt;
&lt;br /&gt;
For example, using the c172p model as a reference.&lt;br /&gt;
&lt;br /&gt;
The tail, right wing and top on the model are positive inside Blender. So the cube faces are laid out as follows.&lt;br /&gt;
&lt;br /&gt;
Note: Depending on the image's orientation when photographed the rotation direction will vary. This is assuming the images are being taken from the center of the cockpit looking out. Using compass headings to describe how to rotate the images.&lt;br /&gt;
&lt;br /&gt;
px (tail) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nx (nose) rotate 90 deg from N or S to E&lt;br /&gt;
&lt;br /&gt;
py (starboard/right) from N do not rotate&lt;br /&gt;
&lt;br /&gt;
ny (port/left) from N rotate 180 deg to S&lt;br /&gt;
&lt;br /&gt;
pz (top) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nz (bottom) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
[[File:C172p-cube.jpg|640px|Cube map layout of the c172p]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With Blender, it's pretty easy to create the cubemap.&lt;br /&gt;
&lt;br /&gt;
1. Add a camera where the cubemap will be. Set the FOV to 90 degrees.&lt;br /&gt;
2. Set the resolution to 1024x1024 (or any other square, power-of-two size).&lt;br /&gt;
3. Hide all lights and windows; disable ambient lighting (set it to black) and turn off ambient occlusion.&lt;br /&gt;
4. Set the world color to white.&lt;br /&gt;
5. Enable the compositor and add an invert node.&lt;br /&gt;
6. Render and save the six views as you would normally.&lt;br /&gt;
7. Add dirt, tinted glass color and caustics by hand&lt;br /&gt;
&lt;br /&gt;
This process depends on the model setup but it should work for most aircraft with a few tweaks.&lt;br /&gt;
&lt;br /&gt;
==== Cubemap Kit for Blender ====&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-shadow-blender-instructions.png|320px|How to make an interior cubemap with the cubemap kit]]&lt;br /&gt;
&lt;br /&gt;
See [http://chateau-logic.com/content/flightgear-interior-shadow-cubemap-kit flightgear-interior-shadow-cubemap-kit] for a premade kit to create the cubemap and the .eff sample file to use it.&lt;br /&gt;
&lt;br /&gt;
==== Important Notes ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Currently (May 2015) the effect does not deal gracefully with child models included into the main model with offsets and/or rotations because these introduce a different coordinate system in which the shadow does not match. The general idea of a code solution is known, but not implemented. Right now this can only be addressed by explicitly positioning child models in the *.ac file and not using any offsets when including them.&lt;br /&gt;
&lt;br /&gt;
=== ALS flashlight ===&lt;br /&gt;
&lt;br /&gt;
This effect is meant to imitate a hand held flashlight for use in getting instruments in the cockpit turned on in dark conditions.&lt;br /&gt;
It is almost identical in nature to ALS searchlight only it is applied using interior-model.eff.&lt;br /&gt;
It has two user defined light color filters that can be applied and also a user defined light radius setting.&lt;br /&gt;
&lt;br /&gt;
[[File:ALS flashlight.jpg|600px|ALS flashlight effect]]&lt;br /&gt;
&lt;br /&gt;
To implement this effect use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
A full definition looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-one type=&amp;quot;vec3d&amp;quot;&amp;gt;0.5 0.5 0.5&amp;lt;/light-filter-one&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-two type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.2 0.2&amp;lt;/light-filter-two&amp;gt;&lt;br /&gt;
	&amp;lt;light-radius type=&amp;quot;float&amp;quot;&amp;gt;13&amp;lt;/light-radius&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the example above light-filter-one is soft white light and light-filter-two is a soft red light.&lt;br /&gt;
&lt;br /&gt;
After defining as above you can turn it on using the following property&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 1 is light-filter-one&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 2 is light-filter-two&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The flashlight effect inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
At lowest quality level, the effect supports an implicit lightmap, i.e. a color range of the basic texture can be selected and declared to act as a lightmap. This is specifically useful to render panel backlighting as in the example below:&lt;br /&gt;
&lt;br /&gt;
[[File:Ilightmap.jpg|600px|An implicit lightmap used to simulate a backlit panel]]&lt;br /&gt;
&lt;br /&gt;
The effect is off by default and switched on by setting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/implicit-lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following parameters are available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-tag-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-tag-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the base color to be tagged, i.e. if the panel labels to be illuminated at night are white, the color needs to be set to white.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-low type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/implicit-lightmap-threshold-low&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-high type=&amp;quot;float&amp;quot;&amp;gt;1.5&amp;lt;/implicit-lightmap-threshold-high&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The thresholds determine how similar a color may be to the base color in order to be still illuminated. The measure is the Euklidean distance of the color vectors. The lower thresholds determines when illumination will start to fade, the higher threshold at what distance in color space illumination will no longer take place. The thresholds have to be adapted to the specific situation - the technique works best for high-contrast panels (white labels on black background) and may not work at all for low contrast panels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-emit-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-emit-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The emit color specifies at which color the pixel will show if it is tagged (see above) and the implicit lightmap is on (see below) - set this to the color of the backlight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-intensity type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/implicit-lightmap-intensity&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the intensity determines how brightly the illuminated pixel will shine.&lt;br /&gt;
&lt;br /&gt;
Ambiance lighting can be simulated with the following tags.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-r type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-r&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-g type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-g&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-g&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-b type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-b&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example note the use of the &amp;quot;use&amp;quot; tag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be any defined property or static value.&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The implicit lightmap inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Irradiance maps ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In the simplest rendering schemes, diffuse and specular light are assumed to be highly directional (i.e. it illuminates lit surfaces only) while ambient light is taken to be omnidirectional.&lt;br /&gt;
&lt;br /&gt;
In reality, that is hardly ever true. In a typical outside location, ambient light is mainly coming from the sky above (which is why the ground underneath a car is dark even in the absence of directional light when the sky is overcast and the sun is not visible). In an enclosed space (like a room, or an aircraft cockpit), ambient light has to fall through the windows, i.e. is mainly not coming above but falling in horizontally.&lt;br /&gt;
&lt;br /&gt;
The directional dependence is not very strong though, yet it leaves measurable effects. In rendering, this can be accounted for by irradiance maps. In the following, the interior of the C-172p is rendered in the first case using omnidirectional ambient light, in the second case using an irradiance map giving the ambient light the directionality of the cabin windows, i.e. the light falls in predominantly horizontally (in addition, a grain map is superimposed to provide structure). Note how the spatial structure of the roof, looking bland when rendered in omnidirectional light is brought out by the irradiance map.&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-irradiance01.jpg|400px|C-172p cabin interior rendered without irradiance and grain map]]&lt;br /&gt;
[[File:Als-interior-irradiance02.jpg|400px|C-172p cabin interior rendered with irradiance and grain map]]&lt;br /&gt;
&lt;br /&gt;
Irradiance mapping is configured by the following parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-type type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/irradiance-map-type&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-strength type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/irradiance-map-strength&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several pre-configured irradiance map functions which can be chosen by map type. &lt;br /&gt;
&lt;br /&gt;
0: (default) omndirectional light&lt;br /&gt;
1: light predominantly coming from above (most appropriate for fighter cockpits)&lt;br /&gt;
2: light predominantly coming from the horizon (most appropriate for GA aircraft)&lt;br /&gt;
&lt;br /&gt;
The strength of the irradiance map regulates how pronounced the asymmetry of the map will be. A strength of zero always makes the light omnidirectional, whereas a strength of 1 implies that no light is coming from any direction 90 degree to the main direction (i.e. for the option 2, a strength of 1.0 means that no ambient light will fall in from above or below and that hence horizontal surfaces will appear pitch black unless direct light falls on them)&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The irradiance map inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Explicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In addition to the implicit lightmap, it is also possible to explicitly specify a lightmap. The syntax for this exactly parallels the syntax of the [[Model-combined_effect]] which supplies lightmaps for the exterior.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/MyAircraft/Effects/my_lightmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-multi type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/lightmap-multi&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-factor type=&amp;quot;float&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0&amp;lt;/lightmap-factor&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 &amp;lt;/lightmap-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a single channel lightmap in which pixel color times the lightmap color provides the illumination. Using the multi-channel function, up to four different maps can be specified in which the (rgba) values of a pixel encode where the light falls and the associated lightmap color what color the illumination takes. Each of these maps can be switched on and off or dimmed in intensity independently.&lt;br /&gt;
&lt;br /&gt;
=== Grain map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
The grain map sets a repeating hires overlay texture which can supply a very credible illusion of structure to a surface for cheap. The syntax exactly parallels that of the [[Model-combined_effect]] ALS grain feature described above.&lt;br /&gt;
&lt;br /&gt;
For instance, the following&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/Effects/MyGrainmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;10&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a grain overlay with a 10-time higher resolution over the base texture layer.&lt;br /&gt;
&lt;br /&gt;
== ALS procedural lights ==&lt;br /&gt;
&lt;br /&gt;
The ALS framework supports procedurally generated lights (for instance aircraft position lights, strobe lights,... ) for aircraft and models. Note that the effect produces the visuals of the lights themselves, but they do not illuminate their surroundings.&lt;br /&gt;
&lt;br /&gt;
=== Why procedural lights? ===&lt;br /&gt;
&lt;br /&gt;
Traditionally aircraft position lights have been implemented as billboarded emissive textures. This technique is limited in scope, as it has difficulty producing a directional light or changes in the light appearance (for instance glare) with changed scene lighting. The ALS procedural lights are designed to give visuals consistent with the auto-generated scene lights (runway lighting, street lights) and support configurable directionality, glare and even the illumination of fog by the lights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic implementation ===&lt;br /&gt;
&lt;br /&gt;
The base of the light is a texture quad which has Effects/procedural-light.eff assigned. Start from including the template provided into your model as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;model&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;/Models/Effects/procedural_light.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
        &amp;lt;offsets&amp;gt;&lt;br /&gt;
            &amp;lt;x-m&amp;gt; 0 &amp;lt;/x-m&amp;gt;&lt;br /&gt;
            &amp;lt;y-m&amp;gt; 0 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
            &amp;lt;z-m&amp;gt; 2 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
        &amp;lt;/offsets&amp;gt;&lt;br /&gt;
 &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and configure from there according to your own needs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not billboard the light via animation!&amp;lt;/b&amp;gt; The GLSL code will take care of the billboarding. Use a scale animation to change the size of the light, do not change the quad (the *.ac) itself in size, the shader code requires its geometry to be fixed.&lt;br /&gt;
&lt;br /&gt;
The lights are currently not supported in the default or Rembrandt renderer and will simply be invisible in these frameworks.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the light ===&lt;br /&gt;
&lt;br /&gt;
Make your own derived effect inheriting from Effects/procedural-light.eff and assign it in the xml wrapper of the light.&lt;br /&gt;
&lt;br /&gt;
====The base light color set====&lt;br /&gt;
&lt;br /&gt;
The base light color can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These take the normal set of values ranging from 0 to 1. &lt;br /&gt;
&lt;br /&gt;
====Light full intensity in the center====&lt;br /&gt;
&lt;br /&gt;
Now the light appears at full intensity in the center can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea behind this is that lights give a better visual appearance if their center is rendered visually brighter and de-saturated, but this occurs only if the light is at full intensity.&lt;br /&gt;
&lt;br /&gt;
There are no sanity checks done, you can assign any center color you like even if this makes no sense - you can change center color or darken it, so use with care.&lt;br /&gt;
&lt;br /&gt;
====Runtime change the light intensity====&lt;br /&gt;
&lt;br /&gt;
To runtime change the light intensity, assign&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to a property and change that property in the range from 0 to 1. Eg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;intensity_scale&amp;gt;&lt;br /&gt;
       &amp;lt;use&amp;gt;/rendering/nav-lights-factor&amp;lt;/use&amp;gt;&lt;br /&gt;
     &amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Set directional lights====&lt;br /&gt;
&lt;br /&gt;
For directional lights, you need to assign a pointing vector in aircraft coordinates into which the light cone points and set the directionality flag to true to activate the computations. This is done via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;-1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
    &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It would be customary to pass a normalized vector, but if you don't know how to do it, the shader will do it for you. By assigning properties to the pointing coordinates, the light direction can be changed runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not use a rotation animation to change the light direction - it won't work.&amp;lt;/b&amp;gt; Make the pointing vector properties and change them to your needs.&lt;br /&gt;
&lt;br /&gt;
====Fading of a directional light====&lt;br /&gt;
[[File:Directional light.jpg|thumb|Explanation of a light radiation pattern]]&lt;br /&gt;
The fading of a directional light away from the pointing axis is controlled by passing angles (or rather sines of angles).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
    &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Up to inner_angle, the light will have full intensity. From inner to outer angle the light will linearly fade to outer_gain. From outer angle to zero angle, the light intensity will linearly fade to zero.&lt;br /&gt;
&lt;br /&gt;
====Strobe effect====&lt;br /&gt;
&lt;br /&gt;
For get an automatic strobe effect you can set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to true. If you want your own strobe pattern, generate a strobe function and use &amp;lt;b&amp;gt;intensity_scale&amp;lt;/b&amp;gt; instead to pass it to the shader.&lt;br /&gt;
&lt;br /&gt;
=== Complete example ===&lt;br /&gt;
&lt;br /&gt;
Here's the left nav light of the C-172p:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;name&amp;gt;procedural-light-nav-left&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/procedural-light&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.000&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
        &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Arc is 110 deg, is 55 deg per side, giving 35 deg from wing --&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.7002075382097097&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
        &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Angles are 0.0 at 0 deg from pointing direction, 1.0 at&lt;br /&gt;
             90/-90 deg, and 0.0 at 180/-180 deg.&lt;br /&gt;
&lt;br /&gt;
             For left navigation light we use -0/-35 .. +110/+145 for&lt;br /&gt;
             the inner/outer range. This gives an arc of 110/180 deg,&lt;br /&gt;
             or 55/90 deg from center.&lt;br /&gt;
&lt;br /&gt;
             Value = sin(angle in degrees)&lt;br /&gt;
&lt;br /&gt;
             0.8191520442889918 = 55 deg (* 2 = 110 deg inner angle)&lt;br /&gt;
             1.0000 = 90 deg (* 2 = 180 deg outer angle)&lt;br /&gt;
        --&amp;gt;&lt;br /&gt;
        &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.8191520442889918&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
        &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.982547593563&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
The Cessna 182 by Heiko Schulz and Gilberto Agostinho with procedural lights activated:&amp;lt;br&amp;gt;&lt;br /&gt;
:''(To percieve the effect well, you probably have to darken your room and switch to fullscreen)''&lt;br /&gt;
[[File:Cessna 182 with procedural lights.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
===Move dynamically the procedural light===&lt;br /&gt;
&lt;br /&gt;
The position of a procedural light is declared in the '''&amp;lt;model&amp;gt;''' section, within the '''&amp;lt;PropertyList&amp;gt;''' XML code, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;procedural-light-gear-white-left&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;path&amp;gt;Effects/lights/procedural_light_gear_white.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
      &amp;lt;offsets&amp;gt;&lt;br /&gt;
          &amp;lt;x-m&amp;gt; -3.08&amp;lt;/x-m&amp;gt;&lt;br /&gt;
          &amp;lt;y-m&amp;gt; -0.21 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
          &amp;lt;z-m&amp;gt; -1.18 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
      &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tag ''procedural-light-gear-white-left'' is very important because is the object name. This name will be used as the reference object.&amp;lt;BR&amp;gt;Next, we can define an animation in the same xml file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;GearFrontalDoor&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;gear/gear/position-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;axis&amp;gt;&lt;br /&gt;
          &amp;lt;x1-m&amp;gt;  -3.00240&amp;lt;/x1-m&amp;gt;&lt;br /&gt;
          &amp;lt;y1-m&amp;gt;  1.0&amp;lt;/y1-m&amp;gt;&lt;br /&gt;
          &amp;lt;z1-m&amp;gt;  -1.02906&amp;lt;/z1-m&amp;gt;&lt;br /&gt;
          &amp;lt;x2-m&amp;gt;  -3.00240&amp;lt;/x2-m&amp;gt;&lt;br /&gt;
          &amp;lt;y2-m&amp;gt;  -1.0&amp;lt;/y2-m&amp;gt;&lt;br /&gt;
          &amp;lt;z2-m&amp;gt;  -1.0290&amp;lt;/z2-m&amp;gt;&lt;br /&gt;
      &amp;lt;/axis&amp;gt;&lt;br /&gt;
      &amp;lt;interpolation&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.25&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.50&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;60&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.75&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;30&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;0&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
      &amp;lt;/interpolation&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''procedural light'' object code is this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS fuselage shadow effect ==&lt;br /&gt;
ALS supports the manipulation of a (simplified) ground shadow. This effect uses an existing simplified shadow animation configuration and by default uses the gear-agl-m property to calculate the ground placement of that simplified shadow.&lt;br /&gt;
&lt;br /&gt;
The system, techniques for using it, and several working examples are on [https://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=24859&amp;amp;start=135 this extensive forum thread about the ALS shadow effects].&lt;br /&gt;
&lt;br /&gt;
[[File:Alsshadow.jpg|800px|ALS Shadow]]&lt;br /&gt;
&lt;br /&gt;
The effect can be applied easily in any aircraft that report the gear-agl-m property by simply adding a declaration inheriting from shadow.eff.&lt;br /&gt;
&lt;br /&gt;
If the aircraft does not support the gear-agl-m property, (notably JSBSim), you need to create a [[Autopilot configuration reference | Property Rule]] to pass a supported AGL data to the gear-agl-m property. In this case we use altitude-agl-ft converted to meters using a property rule configuration file.&lt;br /&gt;
&lt;br /&gt;
For the first example we'll use the &amp;quot;supported gear-agl-m&amp;quot; method for aircraft that don't require a property rule.&lt;br /&gt;
&lt;br /&gt;
Simply add the following inheritance declaration after you declare your shadow animation statement.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;name_of_the_shadow_object&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the non-ALS simplified shadow code you normally use a &amp;quot;translate&amp;quot; animation to position the shadow on the ground.&lt;br /&gt;
When using the ALS method you must either remove, comment out, or apply a condition to restrict its use to non ALS shadow applications, because ALS is responsible for computing the shadows ground position.&lt;br /&gt;
&lt;br /&gt;
Here is how we apply a condition to the translation to limit it effect to non-ALS application only.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A complete shadow animation block looks like this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- opaque objects --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- transparent objects --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;not&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/rembrandt/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;/not&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;noshadow&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- pitch --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/pitch-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;-1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;1&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- roll --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/roll-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;1&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For aircraft requiring a [[Autopilot configuration reference | Property Rule]] there are a couple extra steps.&lt;br /&gt;
&lt;br /&gt;
In aircraft-set.xml you add the property rule call to the &amp;quot;configuration file&amp;quot; in between the PropertyList/sim/systems tag pairs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;property-rule n=&amp;quot;101&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;gear_agl-m&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;Aircraft/c172p/Systems/gearAGL.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
&amp;lt;/property-rule&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: the n=&amp;quot;101&amp;quot; needs to be =+100 as -100 is reserved for system wide property rules.&lt;br /&gt;
In the above example 101 was used because 100 was already being used by a previous property rule definition.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;configuration file&amp;quot; normally goes in /Systems.&lt;br /&gt;
In this example we named the configuration file /Systems/gearAGL.xml.&lt;br /&gt;
&lt;br /&gt;
Here is the complete /Systems/gearAGL.xml configuration file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;filter&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;reference&amp;gt;6&amp;lt;/reference&amp;gt;&lt;br /&gt;
    &amp;lt;output&amp;gt;/position/gear-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
  &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
What the configuration file does is convert the input of altitude-agl-ft to the output of (((altitude-agl-ft)-6)*0.3048) or (convert ft-6 to m) and pass it to /position/gear-agl-m.&lt;br /&gt;
 &lt;br /&gt;
See [[Autopilot configuration reference | Input and reference properties or values &amp;lt;input&amp;gt; and &amp;lt;reference&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
== ALS 3d shadow volume effect ==&lt;br /&gt;
What might be considered the next level of realism using a relatively &amp;quot;cheap&amp;quot; shadow effect is to use a 3d volume shadow.&lt;br /&gt;
&lt;br /&gt;
[[File:Shadow vol02.jpg|800px|ALS 3d Shadow Volume]]&lt;br /&gt;
&lt;br /&gt;
The procedure to implement the ALS shadow volume is similar to the ALS-shadow above with a few modifications.&lt;br /&gt;
&lt;br /&gt;
First you have to have a 3d shadow volume model of the aircraft you are applying the effect to. This model should be a low poly model that is optimized to be as little of a footprint as possible.&lt;br /&gt;
&lt;br /&gt;
A property rule is required, same as above. This is used to generate the above ground altitude in meters, (altitude-agl-m). The &amp;quot;altitude-agl-m&amp;quot; is used to place the shadow close to the ground in real time at an FDM rate of execution.&lt;br /&gt;
{{note|Do not confuse &amp;quot;altitude-agl-m&amp;quot; with the other type of non-3d ALS-shadow property of &amp;quot;gear-agl-m&amp;quot;. The shaders involved use these two different properties respectively for the two different effect. They are not interchangeable.}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
   &amp;lt;filter&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
      &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
      &amp;lt;reference&amp;gt;1.0&amp;lt;/reference&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;/position/altitude-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The other difference from the ALS-shadow above is that it uses a different inherited effect.&lt;br /&gt;
Instead of&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
you use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow-vol&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make sure there is no duplicate 3d model shown in other renderers besides ALS it is also important to use a different select animation:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- hide 3d shadow in non ALS mode --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Procedural Texturing]]&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS infrared vision]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;br /&gt;
[[Category:ALS]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116178</id>
		<title>ALS technical notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=116178"/>
		<updated>2018-09-12T06:20:29Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* The HUD effect */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Quality level mapping ==&lt;br /&gt;
The rendering quality of ALS effects is controlled by two main sliders, the landmass effects and transition effects. The transition effects slider regulates the quality of overlaid textured, while the landmass effects slider regulates all other aspects of procedural texturing, such as pixel color post-processing (dust, snow or wet terrain effects) and apparent terrain roughness (bump and parallax mapping).&lt;br /&gt;
&lt;br /&gt;
In addition, specific effects for certain terrain types (water, urban, forest, agriculture, etc.) and models in the scene can be switched on separately. In some cases, this may be needed for a consistent visual impression. For example, if a dust effect is used on the terrain, the water needs to be rendered using a separate water shader, otherwise it will appear dusty as well. Likewise, if the Rayleigh haze is used in the highest quality terrain effect, then the highest quality water effect needs to be used to see the same Rayleigh scattering effect on the water.&lt;br /&gt;
&lt;br /&gt;
For technical reasons (landmass and transition control the same shader code) the settings are sometimes mutually dependent, e.g., if the transition quality is set to level 6, it won't have any effect until the landmass quality is also set to level 6.&lt;br /&gt;
&lt;br /&gt;
=== Transition ===&lt;br /&gt;
The mapping of quality to visuals of the transition slider is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| Base texture scheme&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| Alternative hires airport keep effect&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
|&lt;br /&gt;
* Base and overlay texture, runway effect (if landmass is above level 4)&lt;br /&gt;
* Secondary lights on runway and airport keep&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| Base, overlay and hires texture&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Base, overlay, hires, detail, grain, dot and rock texture (if landmass is level 6)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Landmass ===&lt;br /&gt;
{{Note|Quality levels 1 and 2 are reserved to represent fixed pipeline rendering and the &amp;quot;default renderer&amp;quot; in an eventually merged rendering GUI. However, ALS is currently switched on per checkbox and not by quality level, and so they do not have a function.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
| ALS-rendered position-differential haze and light, moonlight&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| &lt;br /&gt;
* Procedural snow cover on terrain&lt;br /&gt;
* Procedural dust and vegetation effects&lt;br /&gt;
* Wet terrain effect with approximate reflection half vector&lt;br /&gt;
* Patchy fog distribution&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Noise bump-mapping and parallax mapping of terrain&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 6&lt;br /&gt;
| (''Requires transition effect level 6'')&lt;br /&gt;
* Wet terrain effect with correct reflection half vector&lt;br /&gt;
* Hires bump mapping and snow patchiness&lt;br /&gt;
* Variable upper haze layer surface&lt;br /&gt;
* Rayleigh haze&lt;br /&gt;
* Secondary lights on all terrain types&lt;br /&gt;
* Slope line and strata effects&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ALS secondary lights ==&lt;br /&gt;
The ALS framework supports a generic implementation of landing lights and a searchlight which are based on a framerate-friendly computation in screen coordinates, i.e., the lights project correctly ''only if the light is close to the viewer'' (typically, that would be from cockpit view). In other words, this is not a full (and rather expensive) computation of light volumes as in Rembrandt, but a much faster test of illuminated screen areas.&lt;br /&gt;
&lt;br /&gt;
[[File:Landing light03.jpg|400px|Cessna 172P using generic ALS landing lights]]&lt;br /&gt;
&lt;br /&gt;
Two landing lights and a searchlight are supported. The landing lights have a fixed position with respect to the aircraft axis (technically, with respect to the default view axis as defined in the respective view), whereas the searchlight follows any offset of the view axis in view mode, i.e., when using the mouse to look around, the searchlight will follow the motion, the landing lights will not. The lights require ALS to run above basic quality level and work on runway and airport keep above transition setting 3 and everywhere else only at highest quality setting. All lights are controlled via properties in &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The names of the properties should be self-explanatory, if for instance if &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/use-searchlight&amp;lt;/code&amp;gt; is set to true, then the searchlight (which always follows the current view axis) is used. &lt;br /&gt;
&lt;br /&gt;
The properties &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light1-offset-deg&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light2-offset-deg&amp;lt;/code&amp;gt; allow to specify angular offsets for the landing light which are then not centered on the view axis. This can be used to simulate one or two landing lights set in the wings.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv2.jpg|400px|Secondary lights vertical offset demo]]&lt;br /&gt;
&lt;br /&gt;
A third offset &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light3-offset-deg&amp;lt;/code&amp;gt; is available which allows for a vertical offset. This is especially useful for tail dagger aircraft.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv.jpg|400px|Secondary lights vertical offset settings]]&lt;br /&gt;
&lt;br /&gt;
The lights can be switched on and off from the [[Property Browser]] for any aircraft without any modifications to the aircraft definition. Implementing them correctly aircraft side thus just involves linking the landing light switches to the ALS control properties and setting the correct angular offsets. Additionally, it is recommended to switch the lights off unless in a cockpit view, as they don't project correctly for any external view.&lt;br /&gt;
&lt;br /&gt;
Range, color, light cone opening angle or intensity of the lights can currently not be configured, and there are no plans to support such a feature in the near future.&lt;br /&gt;
&lt;br /&gt;
All three lights will illuminate fog (if dense enough) and precipitation.&lt;br /&gt;
&lt;br /&gt;
[[File:Als secondary light fog.jpg|400px|ALS generic lights illuminating dense fog]]&lt;br /&gt;
&lt;br /&gt;
== ALS specific features of the model effect ==&lt;br /&gt;
&lt;br /&gt;
In addition to the features supported by the model-combined-deferred effect in all three renderers (normal, light, specular, environment reflection and dirt map), ALS also supports a couple of unique effects (which, if configured, will not have any effect in other renderers.&lt;br /&gt;
&lt;br /&gt;
=== The grain texture  ===&lt;br /&gt;
&lt;br /&gt;
ALS supports a grain texture for models. This is a semi-transparent overlay texture that works just as [[Procedural Texturing#The grain texture|its equivalent for terrain texturing]] and provides the option of generating centimeter-scale details such as rust or discoloration on a surface without having to use huge textures. An example of a surface rendered with grain texture is the image of the USS Vinson flightdeck below:&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain01.jpg|700px|Grain and rain effects on Vinson's flightdeck]]&lt;br /&gt;
&lt;br /&gt;
This is done using the following effect declaration inheriting from '''model-combined-deferred.eff''' as&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt;flightdeck&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;inherits-from&amp;gt;Effects/model-combined-deferred&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
  &amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;image&amp;gt;Models/Geometry/Nimitz/rust_texture.png&amp;lt;/image&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt; &lt;br /&gt;
    &amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
    &amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
    &amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
  &amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The grain texture has the number 7 and needs to be enabled by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the value is set to 1, the grain texture uses the uv-mapping of the underlying surface. If that is very irregular (as in the case of the Vinson flightdeck), alternatively the grain can be mapped in xy-model coordinates if the parameter is set to 2, the uv-mapping of the base texture layer is then discarded.&lt;br /&gt;
&lt;br /&gt;
The resolution of the grain texture with respect to the base coordinate layer is specified by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the number is less than 0, the grain resolution is lower than the base layer. If the parameter is greater than 0, it is higher (note that in the above case, the grain is mapped to (xy) rather than (uv), hence the base size is 1 m, so the grain texture is mapped on a 10x10 m patch on the flightdeck, for which a 1024x1024 pixel texture provides ~1 cm sized details).&lt;br /&gt;
&lt;br /&gt;
=== The rain effect ===&lt;br /&gt;
&lt;br /&gt;
Any number greater than 0 passed to&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
enables the splash effect of raindrops on the surface if it points upward. The surface does not have to be flat for this to work, the effect checks for the surface normal automatically, see the rain enabled for the Citation Bravo.&lt;br /&gt;
&lt;br /&gt;
Thorsten noted about rain splashes: &amp;quot;Works fine here - runway needs to get really wet though before you see them (put the environment slider to max to achieve this quickly, it will take some waiting with just rain on).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain02.jpg|700px|Rain effect on the Citation Bravo]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Glossy surfaces ===&lt;br /&gt;
&lt;br /&gt;
To better treat the environment reflections on a glossy surface, ALS contains two options not present in the other renderers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-type type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/reflection-type&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter can currently be set to 1 or 2 and regulates how the color of the environment reflection is merged with the color of the glossy surface. If set to 1, the shader uses a color mixing as in the other two renderers, if set to 2 it uses a technique called 'grain merge' which gives different weight to the color channels. The reason for introducing type 2 was a grey tint which changed the reflected color in a unrealistic way. With FlightGear 2017.2.0 this will be fixed and  type set to 2 should be obsolete then.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-fresnel-factor type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/reflection-fresnel-factor&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter regulates how strong the Fresnel term of a glossy surface is. Many smooth surfaces reflect much more under shallow angles such that an environment reflection is not very prominent when looking under 90 degrees but dominates the visuals when looking under a grazing angle. The parameter sets the relative strength of a Fresnel reflection with respect to the basic reflection definition which is assumed to hold for vertical viewing (i.e. setting the parameter to 0.8 gives you extra glossiness under shallow angles).&lt;br /&gt;
&lt;br /&gt;
The following comparison shows the default color mixing (upper left) for a reflecting white livery and for grain merge (upper right). In addition, note the enhanced Fresnel reflectivity at the tail and the cowling on the pictures. The lower row shows (left) full reflection with default color mixing and (right) for grain merge. Default color mixing is more physically correct, while grain merge is less correct but preserves white color much better.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model default2.jpg|400px|Effect of color mixing in a reflection]]&lt;br /&gt;
[[File:Reflect Grain merge2.jpg|400px|Effect of grain merge in reflection]]&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model Default Full.jpg|400px|Full reflection with default ]]&lt;br /&gt;
[[File:Reflect Grain Merge Full.jpg|400px|Full reflection with grain merge]]&lt;br /&gt;
&lt;br /&gt;
== The exhaust flame effect ==&lt;br /&gt;
&lt;br /&gt;
Rendering proper flames of e.g. afterburners or rocket thrusters with diffuse edges is notoriously difficult - all solutions based on textured models tend to have unnaturally sharp edges. Usually the particle system is used in such cases, however at high velocities this has other issues - particles become easily separated, making flames look disrupted and detached from the exhaust.&lt;br /&gt;
&lt;br /&gt;
ALS includes a dedicated procedural effect in which the flame is rendered by numerically integrating a 3-dim distribution of glowing emitters inside a bounding box (i.e. re-creates the process by which a real flame would be seen). The function which determines the emitter distribution is partially user-controlled so that a wide range of shapes can be generated.&lt;br /&gt;
&lt;br /&gt;
To use the effect, first the bounding box has to be defined. Note that the shape and alignment of the bounding box needs to be standardized for the effect to work, i.e. you need to use either the default bounding box under Aircraft/Generic/Effects/Thruster/ or make a custom one which fits inside the default box at the same location in model coordinates.&lt;br /&gt;
&lt;br /&gt;
To change position, size and orientation of the bounding box to match with the airplane model, translate, scale and rotate animations or model offsets can later be used.&lt;br /&gt;
&lt;br /&gt;
=== Model definition for effect ===&lt;br /&gt;
This is a standard XML model definition that needs to specify the geometry, all animations and the effect to use. For the geometry you can use the standard ''Aircraft/Generic/Effects/Thruster/thrust_flame.ac'' or make your own. The F-15 uses a slightly different 3D model to allow for the nozzles. The 3D model needs to be big enough to contain the flame, bearing in mind that the flame is drawn as a cylinder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;path&amp;gt;Aircraft/Generic/Effects/Thruster/thrust_flame.ac&amp;lt;/path&amp;gt;&lt;br /&gt;
    &amp;lt;nopreview/&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;scale&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;property alias=&amp;quot;/params/augmentation-alight&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;x-min&amp;gt;0.2&amp;lt;/x-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-min&amp;gt;0.3&amp;lt;/y-min&amp;gt;&lt;br /&gt;
        &amp;lt;z-min&amp;gt;0.3&amp;lt;/z-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-max&amp;gt;1&amp;lt;/y-max&amp;gt;&lt;br /&gt;
        &amp;lt;z-max&amp;gt;1&amp;lt;/z-max&amp;gt;&lt;br /&gt;
        &amp;lt;x-factor&amp;gt;0.472&amp;lt;/x-factor&amp;gt;&lt;br /&gt;
        &amp;lt;y-factor&amp;gt;0.6&amp;lt;/y-factor&amp;gt;&lt;br /&gt;
        &amp;lt;z-factor&amp;gt;0.6&amp;lt;/z-factor&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- on the F-15 we have a property available that controls the ignition of the afterburner. If you do not wish to implement this&lt;br /&gt;
         remove the following animation tag --&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
        &amp;lt;condition&amp;gt;&lt;br /&gt;
            &amp;lt;greater-than&amp;gt;&lt;br /&gt;
                &amp;lt;property alias=&amp;quot;/params/augmentation-ignition&amp;quot;/&amp;gt;&lt;br /&gt;
                &amp;lt;value&amp;gt;0.8&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/greater-than&amp;gt;&lt;br /&gt;
        &amp;lt;/condition&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Aircraft/MyAircraft/Models/Effects/my-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''my-flame.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control how the flame looks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;AB-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
        &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;0.85&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.07&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.15&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.35&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
        &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
        &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
        &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
        &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a detailed version (utilizing 3d noise and a higher sampling resolution) available. This has to be explicitly requested in a derived effect by overriding the default shader choice with the detailed version, i.e. bu inserting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;technique n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;pass&amp;gt;&lt;br /&gt;
     &amp;lt;program&amp;gt;&lt;br /&gt;
         &amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/thrustflame-ALS-detailed.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
     &amp;lt;/program&amp;gt;&lt;br /&gt;
  &amp;lt;/pass&amp;gt;&lt;br /&gt;
  &amp;lt;/technique&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
below the parameter section.&lt;br /&gt;
&lt;br /&gt;
{{Note|The detailed shader uses four times as much performance at least - only use it if you really need it!}}&lt;br /&gt;
&lt;br /&gt;
=== F-15 Afterburner example image === &lt;br /&gt;
The F-15 afterburner flame shown below (at different ambient lighting based on time) uses the parameters above. The main parameters of importance, and therefore to tune, for an aircraft jet engine are the colors, the two densities, the flame radius fraction. The base density is at the start of the flame and this. The F-15 overlays a billboarded image to achieve the diamonds that are interleaved with the ALS drawn flame. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:F-15 afterburner using ALS Thrust Effect.jpg|700px|This shows the F-15 afterburner at different ambient light.]]&lt;br /&gt;
&lt;br /&gt;
The meaning of the parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_shocks&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; and &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_noise&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; are the parameters that control the random noise and the shock diamonds. Both are modestly computationally expensive, i.e. if these effects are not required it is better to switch them off by setting these values to zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(same for the (g,b) channels) set the color. base_flame refers to the part of the flame which is directly attached to the thruster and usually brightest. flame_color_high refers to the high density part of the flame, flame_color_low refers to the low density parts of the flame. (rgb) values always need to be [0:1]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
   &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determine the overall emitter density in the flame and in the base directly at the thruster respectively. There's no formal upper limit for the parameters, but a flame with density 1 already appears fairly opaque.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
governs how much of the bounding box the flame radius at the exhaust nozzle fills. If the flame needs to expand (as for the plume of a thruster operating in vacuum) or needs to bend (as for a flame deflected by the airstream) this parameter needs to be small, if the flame is essentially cylindrical the paramater can be chosen close to 1 to minimize clipping errors. Note that this determines the size of the flame relative to the bounding box - the overall size of the flame should be adjusted by using a scale animation on the bounding box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determined how turbulent the flame looks. noise_strength [0:1] determines how prominently the noise influences the flame and noise_scale (in meters relative to the original bounding box) determines how large the visible patches of turbulence are (given that the original bounding box is not larger than 5 m in the longest direction, the parameter should probably kept between 0.1 and 5).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
influences at what distance shock diamonds appear in the flame. Useful values are perhaps between 0.2 and 5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should take a value of between 0 and 1 and determines how collimated the flame is. For values &amp;gt; 0, the flame is widened - note that this requires a sufficiently small flame radius fraction to avoid clipping errors. For widened flames, the density is automatically lowered and shock diamonds are removed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0.&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be somewhere between 0 and 0.06 and gives a lateral deflection (such as by an airstream) to the flame. Note that this re-positions the origin of the flame in the bounding box to better utilize the bounding box volume, i.e. if you need a dynamical deflection, you also need a translate animation for the bounding box.&lt;br /&gt;
&lt;br /&gt;
Any of those parameters can be adjusted runtime  by replacing the value with &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use&amp;gt;/my-property&amp;lt;/use&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;. Dependent on how &amp;lt;code&amp;gt;/my-property&amp;lt;/code&amp;gt; is created it might be tied though (in particular JSBSim-computed properties are) in which case it is not picked up by the effect framework - you need to copy it via property rule to an untied property then. This allows to render dynamical changes of the flame.&lt;br /&gt;
&lt;br /&gt;
For instance the [[SpaceShuttle - Project Overview|Space Shuttle]] main engines use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;ssme-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r&amp;gt;0.9&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g&amp;gt;0.7&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b&amp;gt;0.5&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r&amp;gt;0.7&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g&amp;gt;0.7&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-collimation&amp;lt;/use&amp;gt;&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-density&amp;lt;/use&amp;gt;&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength&amp;gt;0.3&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale&amp;gt;0.1&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to simulate the change of flame geometry in the thin upper atmosphere during ascent:&lt;br /&gt;
&lt;br /&gt;
[[File:Shuttle flame05.jpg|400px|Space Shuttle main engine flames during early ascent]]&lt;br /&gt;
[[File:Shuttle flame06.jpg|400px|Space Shuttle main engine flames during late ascent]]&lt;br /&gt;
&lt;br /&gt;
Using the deflection parameter, the curved SRB separation motor flames are rendered using&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;SRBsep-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.55&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;-0.06&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flame_sep.jpg|700px|Space Shuttle SRB separation motor flames]]&lt;br /&gt;
&lt;br /&gt;
Application of the effect is not limited to flames, it can also do heat blur (think a very transparent, high-noise dark emitter distribution) or vapour trails and other smoke.&lt;br /&gt;
&lt;br /&gt;
By itself, the effect does however not compute ambient and diffuse light channels, i.e. for non-emissive distributions lighting is the responsibility of the user. One quick way of obtaining a correct fading of color with light in the scene is to create an untied property based on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/rendering/scene/diffuse/red&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and used this to scale all color values.&lt;br /&gt;
&lt;br /&gt;
{{note|Do not use the full (rgb) information in the property tree for ALS, it will produce pronounced color mismatches with the rest of the scene as ALS determines light inside the shader and never uses the properties.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rotor wash ==&lt;br /&gt;
&lt;br /&gt;
ALS provides an interface to render rotor wash on various terrain types - currently this is implemented for the volumetric grass as well as procedural water. This interface needs to be written aircraft-side for the effect to be rendered.&lt;br /&gt;
&lt;br /&gt;
[[File:Rotor wash.jpg|600px|Rotor wash rendered on volumetric grass]]&lt;br /&gt;
&lt;br /&gt;
Aircraft maintainers need to set three parameters in &amp;lt;b&amp;gt;/environment/aircraft-effects/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The position of the downwash column needs to be specified in &amp;lt;i&amp;gt;eye-relative&amp;lt;/i&amp;gt; coordinates by setting &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-x&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-y&amp;lt;/b&amp;gt;. If these are zero, the air column is assumed to be right underneath the eye point, any non-zero values displace the center northward or eastward from the eye point. To work in external views, the displacement needs to be computed by e.g. a Nasal script or property rules, the same is true if the rotor is not close to the eye point.&lt;br /&gt;
&lt;br /&gt;
The strength of the downwash column &amp;lt;i&amp;gt;on the ground&amp;lt;/i&amp;gt; is set by &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-strength&amp;lt;/b&amp;gt;. The parameter influences both the radius in which the effect is visible as well as the overall strength (up to a maximum). Aircraft maintainers need to adjust strength based on parameters like altitude AGL, rotor RPM, rotor radius and whatever else might influence the downwash.&lt;br /&gt;
&lt;br /&gt;
== Chute animation effect ==&lt;br /&gt;
&lt;br /&gt;
The chute animation effect is designed to provide a natural appearance of the deformation and the fluttering motion of a piece of cloth under changing stress.&lt;br /&gt;
&lt;br /&gt;
[[File:Chute seq01.jpg|400px|Drag chute separation sequence 1]] [[File:Chute seq03.jpg|400px|Drag chute separation sequence 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coordinate system ===&lt;br /&gt;
&lt;br /&gt;
The shader assumes that the 3d mesh of the chute is oriented in a particular coordinate system. The z-axis (upward) should extend from the zero point where the various ropes come together to the canopy above through the center of the model. The canopy of the chute should therefore roughly be in the xy plane.&lt;br /&gt;
&lt;br /&gt;
To position the chute correctly with the aircraft, you then need to use appropriate offsets and rotations when loading.&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''mychute.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control the behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;mychute&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/chute&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
	&amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	&amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The meaning of these parameters is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the distance of the branching point of the various lines leading to the canopy (at model coordinate zero) to the edge of the canopy. All transformations affecting the shape of the canopy (in particular the collapse of the canopy if the force is gone) will be applied with respect to this reference plane.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a normalized force applied to the canopy. The chute should be modeled with a deformation corresponding to a force parameter of 1 - any higher value will narrow the chute's radius, deepen the chute's deformation along the z-axis and increase the motion, any lower value will widen chute radius (compare screenshots above) and lessen its depth and slow down motion. The normal parameter range should be from [0:2], any higher or lower may look odd.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	 &amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are deformation modes used to animate a chute after jettison when it is no longer pulled into shape and can flutter through the air. The first one [0:1] is a general collapse into the projection plane with random deformations around, the second one [-1:1] is a gross bending mode of the projection plane itself. Before jettison, these parameters should default to 0.&lt;br /&gt;
&lt;br /&gt;
=== Jettison animation ===&lt;br /&gt;
&lt;br /&gt;
A complete animated jettison sequence is quite complex and would usually require a Nasal sequence taking the chute through a deceleration trajectory (utilizing translation and rotation animations), bending ad folding oscillations and finally some unfolding as it sinks through the air. The Space Shuttle chute uses the following control loop for 10 seconds of jettison dynamics:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var drag_chute_jettison_animation = func (time) {&lt;br /&gt;
&lt;br /&gt;
var dt = getprop(&amp;quot;/sim/time/delta-sec&amp;quot;);&lt;br /&gt;
time = time + dt;&lt;br /&gt;
&lt;br /&gt;
# horizontal motion&lt;br /&gt;
&lt;br /&gt;
var x = 0.0;&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 2.0)&lt;br /&gt;
	{x = -16.0 + 20.0 * time;}&lt;br /&gt;
else&lt;br /&gt;
	{x = 2.0 * time + 5.0 * time * time;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-dist&amp;quot;,x);&lt;br /&gt;
&lt;br /&gt;
# vertical motion&lt;br /&gt;
&lt;br /&gt;
var y = 0.0;&lt;br /&gt;
if (time &amp;gt; 5.0)&lt;br /&gt;
	{&lt;br /&gt;
	y = -2.5 + 0.6 * (time-5.0) * (time-5.0);&lt;br /&gt;
	}&lt;br /&gt;
else 	&lt;br /&gt;
	{&lt;br /&gt;
	y = -0.2 * time;&lt;br /&gt;
	}&lt;br /&gt;
if (y &amp;gt; 12.5) {y=12.5;}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-down&amp;quot;,y);&lt;br /&gt;
&lt;br /&gt;
# fold&lt;br /&gt;
&lt;br /&gt;
var f = 0.5 * time;&lt;br /&gt;
if (f&amp;gt; 1.0) {f = 1.0;}&lt;br /&gt;
if (time &amp;gt; 9.5)&lt;br /&gt;
	{f = 0.25 + 1.5 + (time-9.5);}&lt;br /&gt;
if (time &amp;gt; 6.0)&lt;br /&gt;
	{&lt;br /&gt;
 	f = f -0.3* (time-7.0); &lt;br /&gt;
	if (f&amp;lt;0.1) {f=0.1;}&lt;br /&gt;
	}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-fold&amp;quot;, f);&lt;br /&gt;
&lt;br /&gt;
# rotate&lt;br /&gt;
&lt;br /&gt;
var r = (time - 2.0) * 18.0;&lt;br /&gt;
if (r&amp;gt;90.0) {r=90.0;}&lt;br /&gt;
if (r&amp;lt;0.0) {r=0.0;}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-slant&amp;quot;, r);&lt;br /&gt;
&lt;br /&gt;
# bend&lt;br /&gt;
&lt;br /&gt;
var b = 0;&lt;br /&gt;
if (time &amp;gt; 7.5)&lt;br /&gt;
	{b = 0;}&lt;br /&gt;
else if (time &amp;gt;6.0)&lt;br /&gt;
	{b = 0.75 - 0.5 * (time - 6.0);} &lt;br /&gt;
else if (time &amp;gt; 4.5) &lt;br /&gt;
	{b = (time - 4.5) * 0.5;}&lt;br /&gt;
else {b=0;}	&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-bend&amp;quot;, b);&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 10.0) &lt;br /&gt;
	{&lt;br /&gt;
	print(&amp;quot;Exiting...&amp;quot;);&lt;br /&gt;
	settimer (func { setprop(&amp;quot;/controls/shuttle/drag-chute-deploy-timer&amp;quot;, 0); }, 0.5);&lt;br /&gt;
	return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/test/timer&amp;quot;, time);&lt;br /&gt;
&lt;br /&gt;
settimer( func{ drag_chute_jettison_animation (time); }, 0);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS glass effect ==&lt;br /&gt;
&lt;br /&gt;
As of FlightGear version 3.5, ALS supports a glass effect with dynamic response to the environment which can render, for instance, the splashes of raindrops on the canopy, frost or fogging.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass01.jpg|400px|Frost effect]]&lt;br /&gt;
[[File:Glass07.jpg|400px|Raindrop splashes]]&lt;br /&gt;
&lt;br /&gt;
The base effect properties are controlled via inheritance and the environment response run-time via properties residing in &amp;lt;b&amp;gt;/environment/aircraft-effects&amp;lt;/b&amp;gt;. Derived effects should inherit from &amp;lt;b&amp;gt;Effects/glass&amp;lt;/b&amp;gt;. Any surface using the glass effect will automatically register itself as transparent for use in [[Project Rembrandt| Rembrandt]]. &lt;br /&gt;
&lt;br /&gt;
The glass effect is primarily intended for interior views. In particular, no external fog or haze is rendered for the glass, i.e. if the effect is used in an outside view, it is the responsibility of the aircraft modeler to take care (e.g. with LOD settings or range animations) that no problems in bad visibility occur.&lt;br /&gt;
&lt;br /&gt;
=== Why a separate effect for glass seen from inside? ===&lt;br /&gt;
&lt;br /&gt;
Basically because the two situations are rather different. Slight dirt on the glass against the background of the sky from inside is rather prominent, against the background of the cockpit seen from outside it is not. Visuals from inside are dominated by Mie forward scattering of light, leading to a bright glare effect when looking at dirt, frost, fog or scratches close to the sun. From outside, reflected light rather than transmitted light is dominant. The reflection of any external object on the outside of the glass changes as the aircraft moves, this is not the case for the reflection of the cockpit in the glass seen from the inside. &lt;br /&gt;
&lt;br /&gt;
The viewing situation is also different. From the inside, we usually do not focus the eyes on the plane of the glass but look through it, from the outside the focus of the eyes is often close to the glass surface. For something half a meter before the eye, we also need to apply a lot more resolution and details than for an object typically seen from 10+ meters from the outside.&lt;br /&gt;
&lt;br /&gt;
Add to this that atmospheric fog is never relevant for glass seen from inside but for glass seen from outside, and it suddenly makes sense to use a different effect.&lt;br /&gt;
&lt;br /&gt;
The recommended effect for glass surfaces seen from outside is model-combined-transparent.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rain ===&lt;br /&gt;
Rain splashes will render automatically when the weather system reports rain via environment/rain-norm. In addition, the user can set rain splashes to render via &amp;lt;code&amp;gt;environment/aircraft-effects/ground-splash-norm&amp;lt;/code&amp;gt; (this is intended to allow splashes to be rendered e.g., for water landings of aircraft equipped with floats).&lt;br /&gt;
&lt;br /&gt;
By default, the rain splashes impact from above (more precisely the +z direction in model coordinates). This may be inadequate if the aircraft is moving. However, the shader can not know what the airstream at the glass will be, so the impact vector of rain splashes has to be modeled aircraft-side and set via &amp;lt;code&amp;gt;environment/aircraft-effects/splash-vector-x&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;splash-vector-y&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;splash-vector-z&amp;lt;/code&amp;gt;). These are likewise in model coordinates.&lt;br /&gt;
&lt;br /&gt;
As long as the length of the splash vector is less than 1, just the impact angle will change, as the length of the vector increases to 2, droplets will also be visibly moving. This allows fine control of the visuals dependent on any number of factors desired. A simple Nasal snipped varying the splash vector with airspeed for the F-16 is given below (but ''do not mindlessly copy and expect to work for any aircraft — it won't!''). This example is for normals pointing outwards, if the normals are pointing inwards the vector needs to be inverted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var splash_vec_loop = func(){&lt;br /&gt;
    var airspeed = getprop(&amp;quot;/velocities/airspeed-kt&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    # f16&lt;br /&gt;
    var airspeed_max = 120;&lt;br /&gt;
&lt;br /&gt;
    if (airspeed &amp;gt; airspeed_max) {&lt;br /&gt;
        airspeed = airspeed_max;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    airspeed = math.sqrt(airspeed / airspeed_max);&lt;br /&gt;
&lt;br /&gt;
    var splash_x = -0.1 - 2 * airspeed;&lt;br /&gt;
    var splash_y = 0.0;&lt;br /&gt;
    var splash_z = 1.0 - 1.35 * airspeed;&lt;br /&gt;
&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-x&amp;quot;, splash_x);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-y&amp;quot;, splash_y);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-z&amp;quot;, splash_z);&lt;br /&gt;
&lt;br /&gt;
    settimer(func(){&lt;br /&gt;
        splash_vec_loop();&lt;br /&gt;
    }, 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the timing constant of the loop — running the update per-frame leads to a spurious movement of the coordinate system in which rain is rendered and spoils the effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another method when using JSBSIM would be to use a combination of FCS Functions and Filters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashX&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashx&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashY&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashZ&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashz&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could reduce the above method and eliminate the &amp;quot;filters&amp;quot; by doing the following.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/airspeed-clamped-sqrt&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;  &lt;br /&gt;
                &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;min&amp;gt;&lt;br /&gt;
                            &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                            &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;/min&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashy&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
               &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yet another method (currently used in the c172p) limits movement to a range of table entries. This gives the developer the ability to control the behavior even more.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xa&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.7  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -2.1  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-za&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.17 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.35 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.3  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.9  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-zr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.127 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.29  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;0&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-x&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-y&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-z&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Frost and fogging ===&lt;br /&gt;
&lt;br /&gt;
Frost on the canopy is rendered when environment/aircraft-effects/frost-level is set in the range from 0 to 1. Again, it is up to the aircraft developer to decide at what exterior conditions frosting should happen and whether the aircraft is equipped with heating to remove the frost again.&lt;br /&gt;
&lt;br /&gt;
Fogging is controlled by environment/aircraft-effects/fog-level in the range 0 to 1. Unless a mask is used, fogging is homogeneous across the whole surface (it is really intended to be used with a mask).&lt;br /&gt;
&lt;br /&gt;
=== Tint ===&lt;br /&gt;
&lt;br /&gt;
Tinted glass can be easily created by changing &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;glass-tint type=&amp;quot;vec4d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 1.0&amp;lt;/glass-tint&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to any value desired. This will affect all effects assumed outside of the glass layer (frost and rain splashes) but not fogging inside the glass. Use primarily for development and quick tests, don't misuse the alpha value available here, it has odd side effects.&lt;br /&gt;
&lt;br /&gt;
=== Functional masks ===&lt;br /&gt;
&lt;br /&gt;
If the glass surface is uv-mapped and textured, it is possible to switch on a mask functionality in the inheritance via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;image&amp;gt;my_mask.png&amp;lt;/image&amp;gt;&lt;br /&gt;
	&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
	&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
	&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;use-mask type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-mask&amp;gt;&lt;br /&gt;
&amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The red channel in my_mask.png controls the strength of fogging, full red corresponds to maximal fogging, no red to zero fogging. This allows to selectively model the position of heaters in the cockpit. Use &amp;lt;b&amp;gt;/environment/aircraft-effects/fog-level&amp;lt;/b&amp;gt; to adjust the actual amount of fog runtime.&lt;br /&gt;
&lt;br /&gt;
The green channel of my_mask.png is the amount of reduction of rain in an area. This is intended for airplanes equipped with windshield wipers to partially clear the wiped area of the rain. Whether the windshield wiper is actually on or not is controlled runtime via &amp;lt;b&amp;gt;/environent/aircraft-effects/use-wipers&amp;lt;/b&amp;gt; (1 sets wipers to on).&lt;br /&gt;
&lt;br /&gt;
The blue channel of my_mask.png is reserved for an overlay pattern which will be drawn in an optionally specified &amp;lt;overlay-color&amp;gt; vector (white in the example xml above) - the primary function is to render damage on the glass, but with a different color, also dirt or an alternative more finely controlled frost pattern can be used. The strength of the pattern can be adjusted runtime via &amp;lt;b&amp;gt;/environment/aircraft-effects/overlay-alpha&amp;lt;/b&amp;gt;, allowing dynamical accumulation of dirt or sudden appearance of damage.&lt;br /&gt;
&lt;br /&gt;
Examples for the result of a fog mask and a damage mask are shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Glass12.jpg|400px|Crack pattern using a damage mask]]&lt;br /&gt;
[[File:Glass11.jpg|400px|Partial fogging using a mask texture]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note that by default all the runtime switches for the mask are off / set to zero! Remember to to switch them on when testing the effect!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mie scattering ===&lt;br /&gt;
&lt;br /&gt;
Most glass effects show prominent Mie forward scattering as in reality, i.e. frost patterns or fogging will appear much more prominent when looking almost towards the sun than under any other angle. While the frost pattern is normally not very prominent and one is able to look through unhindered, this changes substantially when looking into the sun, at which point it almost obscures the view.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass08.jpg|400px|Mie scattering of low light on frost]]&lt;br /&gt;
[[File:Glass13.jpg|400px|Morning sun Mie scattering on fog]]&lt;br /&gt;
&lt;br /&gt;
For frost and fog, the strength of the effect is set automatically, but for the damage/dirt layer it is under user control at effect design time. Changing the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;overlay-glare type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/overlay-glare&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from its default value allows to adjust the strength of the glare when looking through the overlay layer close to the sun.&lt;br /&gt;
&lt;br /&gt;
=== Internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
There is support for a reflection of the cockpit interior.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect.jpg|640px|Internal glass cube map reflection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This needs to be provided as a cubemap specific for the airplane and switched on via the flag &amp;lt;use-reflection&amp;gt; set to 1. The relative strength of the reflection can be optionally via &amp;lt;reflection-strength&amp;gt;. The strength of the reflection in the cockpit is dynamically adjusted for a number of factors, among them balance of direct to indirect light, the approximate amount of light falling on the surface seen in the reflection and the amount of direct sunlight falling into the eye.&lt;br /&gt;
&lt;br /&gt;
If the six cubemap faces are called my_cube_map_??.png, then using an effect file called c172p-reflect.eff the inheritance looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-reflect&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/glass&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;images&amp;gt;&lt;br /&gt;
        &amp;lt;positive-x&amp;gt;my_cube_map_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
        &amp;lt;negative-x&amp;gt;my_cube_map_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
        &amp;lt;positive-y&amp;gt;my_cube_map_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
        &amp;lt;negative-y&amp;gt;my_cube_map_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
        &amp;lt;positive-z&amp;gt;my_cube_map_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
        &amp;lt;negative-z&amp;gt;my_cube_map_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
        &amp;lt;/images&amp;gt;&lt;br /&gt;
    &amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;use-reflection type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection&amp;gt;&lt;br /&gt;
    &amp;lt;reflection-strength type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/reflection-strength&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The inheritance call includes all surface objects that use the effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-reflect&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;glas&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;rightwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;leftwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See below (Interior shading), for details on cube_map creation and orientation.&lt;br /&gt;
&lt;br /&gt;
=== Lightmaps for internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
If the cockpit is illuminated at night, the reflection map will not show this change by default. However,the glass effect supports a lightmap for the reflection, which can be used in parallel with the lightmap for the panels to show the reflection of a lit panel at night.&lt;br /&gt;
&lt;br /&gt;
Since the reflection map is a cube map, the lightmap for it has to be as well, the syntax is hence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use-reflection-lightmap type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection-lightmap&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
     &amp;lt;images&amp;gt;&lt;br /&gt;
          &amp;lt;positive-x&amp;gt;Models/Effects/interior/reflection/light-px.png&amp;lt;/positive-x&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-x&amp;gt;Models/Effects/interior/reflection/light-nx.png&amp;lt;/negative-x&amp;gt;   &lt;br /&gt;
          &amp;lt;positive-y&amp;gt;Models/Effects/interior/reflection/light-py.png&amp;lt;/positive-y&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-y&amp;gt;Models/Effects/interior/reflection/light-ny.png&amp;lt;/negative-y&amp;gt;    &lt;br /&gt;
          &amp;lt;positive-z&amp;gt;Models/Effects/interior/reflection/light-pz.png&amp;lt;/positive-z&amp;gt;      &lt;br /&gt;
          &amp;lt;negative-z&amp;gt;Models/Effects/interior/reflection/light-nz.png&amp;lt;/negative-z&amp;gt;      &lt;br /&gt;
      &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The control parameters of the lightmap otherwise parallel those of the [[Model-combined_effect]] or the model interior effect described below, i.e. up to four channels can be independently specified on the lightmap.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
By default, rain and frost are mapped to the shape of the canopy using coordinate systems that adapts to the splash vector and the canopy shape. This requires no particular action aircraft-side except to provide the bare geometry of a canopy/windshield, but may not be satisfactory in all instances - in particular for near vertical cockpit side windows the scheme does poorly.&lt;br /&gt;
&lt;br /&gt;
There are two alternative coordinate maps available in this case, controlled by the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;surface-mapping-scheme type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/surface-mapping-scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 1, the uv-mapping of the surface is used (it has to exist of course). For this to work properly, the uv-mapping needs to be sufficiently regular and roughly preserve the mapped area.&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 2, a local orthonormal system based on the normals of the surface is constructed. This no longer takes the splash vector consistently into account  and works poorly for surfaces which are flat in the (xy)-plane, but gives decent result for side windows.&lt;br /&gt;
&lt;br /&gt;
== The HUD effect ==&lt;br /&gt;
&lt;br /&gt;
The HUD effect is a variant of the glass effect designed to render the visuals of a head-up display (HUD) closer to real life. This only works if the HUD is custom-created via [[Canvas]], not via the native FG HUD mechanism as the latter by-passes the effect framework.&lt;br /&gt;
&lt;br /&gt;
The effect takes the same configuration options as the glass effect (i.e. it can render frost, damage, scratches, glare,...) but in addition it runs a blur over the HUD image and alters the color distribution of the projected symbols to de-saturate the bright parts in the center. The result looks less monochromatic and more like light projected onto a surface (left: bare canvas right: HUD effect)&lt;br /&gt;
&lt;br /&gt;
[[File:HUD effect.jpg|800px|Comparison between a bare canvas HUD (left) and the ALS HUD shader run over it (right)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
The effect is used from the model file by assigning it to the surface that also carries the canvas texture of the HUD via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Effects/hud&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;HUDImage&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should usually work out of the box, but if the HUD brightness should be changeable or the glass properties adjusted, a derived effect needs to be created.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
In addition to the parameters supported by the glass shader (which, for instance in the case of rain splashes, may or may not be appropriate for a HUD, this is left at user's discretion), the HUD effect takes the following special parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;brightness&amp;gt;1.0&amp;lt;/brightness&amp;gt;&lt;br /&gt;
   &amp;lt;sample-res&amp;gt;0.0006&amp;lt;/sample-res&amp;gt;&lt;br /&gt;
   &amp;lt;sample-far&amp;gt;2.5&amp;lt;/sample-far&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first one is the relative brightness setting of the HUD (which should equal the alpha value assigned to the canvas image of the symbols). This parameter is used to de-saturate colors in the symbol centers.&lt;br /&gt;
&lt;br /&gt;
Remaining two parameters represent the size and shape of the blur Kernel being used. The sample resolution (sample-res) determines the overall size of the blur region, the farthest sample (sample-far) how far out the tails of the blur region extend.&lt;br /&gt;
&lt;br /&gt;
Note: The number of sampling steps is not computed adaptive to these parameters, if the steps get too coarse, then multiple image echoes instead of a proper blur will be generated - adjust these parameters with care (if at all).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The display effect ==&lt;br /&gt;
&lt;br /&gt;
Like the HUD effect, the display effect augments the visuals of a canvas, but in this case it simulates the effects on a multi-function display in cockpit, i.e. emissive light from a dark background.&lt;br /&gt;
&lt;br /&gt;
For that reason, the effect takes the same set of configuration parameters as the interior model effect, i.e. it can be supplied for instance with an opacity map.&lt;br /&gt;
&lt;br /&gt;
== The ALS interior model effect  ==&lt;br /&gt;
&lt;br /&gt;
Since the interior of a cockpit is a large part of what a pilot gets to see in-flight, but this interior represents a rather special situation (light is reduced as it falls through windows, it may have artificial light, there is never any fog or haze,...) ALS offers a separate effect to specifically render the interior of a plane.&lt;br /&gt;
&lt;br /&gt;
This effect also includes optional features which will be available at higher quality settings of the model shader.&lt;br /&gt;
&lt;br /&gt;
=== Interior shadows and tinted glass effect ===&lt;br /&gt;
&lt;br /&gt;
With FlightGear version 3.5 and above, ALS now supports interior shading; i.e. the sun shining through the windows and casting shadows on the panel.&lt;br /&gt;
&lt;br /&gt;
[[File:interior01.jpg|640px|Interior shading effect]]&lt;br /&gt;
&lt;br /&gt;
This effect is based on an opacity map - a cube map of textures which tells the renderer where the cockpit is transparent and where not. The opacity map has to be created beforehand, which allows to make it quite detailed. In this map, white stands for a completely transparent surface, black for an opaque surface, colors for tinted glass which will create a colored light spot in the cockpit, grey hues for partial shadowing allowing to paint dirt effects onto the windows, and caustics can be drawn using the alpha channel: (1-alpha) will be used as an enhancement of the light at a certain spot.&lt;br /&gt;
&lt;br /&gt;
The effect is typically declared as derived by inheritance using an effect file such as c172-interior.eff which looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior-glass&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
	  &amp;lt;images&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-x&amp;gt;Models/Effects/interior/clr_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-x&amp;gt;Models/Effects/interior/clr_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-y&amp;gt;Models/Effects/interior/clr_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-y&amp;gt;Models/Effects/interior/clr_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-z&amp;gt;Models/Effects/interior/clr_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-z&amp;gt;Models/Effects/interior/clr_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
	  &amp;lt;/images&amp;gt;&lt;br /&gt;
	&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-center type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 0.5 0.0 0.3&amp;lt;/opacity-cube-center&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-scale type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.5 0.5 0.7&amp;lt;/opacity-cube-scale&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-angle type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/opacity-cube-angle&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is called by inheritance in the model.xml file.&lt;br /&gt;
&lt;br /&gt;
Imagine the opacity map as a box surrounding the cockpit and trying to closely follow its contours. The origin in the box needs to be placed into the center of the cockpit, which is what &amp;lt;b&amp;gt;&amp;lt;opacity-cube-center&amp;gt;&amp;lt;/b&amp;gt; does. Each of the three dimensions then needs to be stretched to roughly fit the layout of the canopy, this is done by &amp;lt;b&amp;gt;&amp;lt;opacity-cube-scale&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If opacity map center and scale are wrong, you will still see shadows, but they won't match the real cockpit layout (the lightspot of a window will be seen displaced and at a different size of the real window). Thus, carefully measuring the best box layout in a 3d tool is moderately important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aircraft-side the effect is called as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;PilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;CopilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;panel_1_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;InstrumentCover.001&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Panel_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Throttle&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Mixture&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Pedestal&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;TrimWheel&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;ParkingBrake&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;BackSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;FuelSelectorFace&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each object that you want the shadow effect to fall on must be included in the inheritance.&lt;br /&gt;
&lt;br /&gt;
Unless you supply a path, the cube_.png's need to reside in the same directory as the model.xml where you added the &amp;lt;effect&amp;gt; tag pair that calls c172-interior.eff, not where you put the aircraft_interior.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The orientation of the faces of each cube have to be adjusted based on the positive and negative axis of the model.&lt;br /&gt;
&lt;br /&gt;
For example, using the c172p model as a reference.&lt;br /&gt;
&lt;br /&gt;
The tail, right wing and top on the model are positive inside Blender. So the cube faces are laid out as follows.&lt;br /&gt;
&lt;br /&gt;
Note: Depending on the image's orientation when photographed the rotation direction will vary. This is assuming the images are being taken from the center of the cockpit looking out. Using compass headings to describe how to rotate the images.&lt;br /&gt;
&lt;br /&gt;
px (tail) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nx (nose) rotate 90 deg from N or S to E&lt;br /&gt;
&lt;br /&gt;
py (starboard/right) from N do not rotate&lt;br /&gt;
&lt;br /&gt;
ny (port/left) from N rotate 180 deg to S&lt;br /&gt;
&lt;br /&gt;
pz (top) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nz (bottom) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
[[File:C172p-cube.jpg|640px|Cube map layout of the c172p]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With Blender, it's pretty easy to create the cubemap.&lt;br /&gt;
&lt;br /&gt;
1. Add a camera where the cubemap will be. Set the FOV to 90 degrees.&lt;br /&gt;
2. Set the resolution to 1024x1024 (or any other square, power-of-two size).&lt;br /&gt;
3. Hide all lights and windows; disable ambient lighting (set it to black) and turn off ambient occlusion.&lt;br /&gt;
4. Set the world color to white.&lt;br /&gt;
5. Enable the compositor and add an invert node.&lt;br /&gt;
6. Render and save the six views as you would normally.&lt;br /&gt;
7. Add dirt, tinted glass color and caustics by hand&lt;br /&gt;
&lt;br /&gt;
This process depends on the model setup but it should work for most aircraft with a few tweaks.&lt;br /&gt;
&lt;br /&gt;
==== Cubemap Kit for Blender ====&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-shadow-blender-instructions.png|320px|How to make an interior cubemap with the cubemap kit]]&lt;br /&gt;
&lt;br /&gt;
See [http://chateau-logic.com/content/flightgear-interior-shadow-cubemap-kit flightgear-interior-shadow-cubemap-kit] for a premade kit to create the cubemap and the .eff sample file to use it.&lt;br /&gt;
&lt;br /&gt;
==== Important Notes ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Currently (May 2015) the effect does not deal gracefully with child models included into the main model with offsets and/or rotations because these introduce a different coordinate system in which the shadow does not match. The general idea of a code solution is known, but not implemented. Right now this can only be addressed by explicitly positioning child models in the *.ac file and not using any offsets when including them.&lt;br /&gt;
&lt;br /&gt;
=== ALS flashlight ===&lt;br /&gt;
&lt;br /&gt;
This effect is meant to imitate a hand held flashlight for use in getting instruments in the cockpit turned on in dark conditions.&lt;br /&gt;
It is almost identical in nature to ALS searchlight only it is applied using interior-model.eff.&lt;br /&gt;
It has two user defined light color filters that can be applied and also a user defined light radius setting.&lt;br /&gt;
&lt;br /&gt;
[[File:ALS flashlight.jpg|600px|ALS flashlight effect]]&lt;br /&gt;
&lt;br /&gt;
To implement this effect use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
A full definition looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-one type=&amp;quot;vec3d&amp;quot;&amp;gt;0.5 0.5 0.5&amp;lt;/light-filter-one&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-two type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.2 0.2&amp;lt;/light-filter-two&amp;gt;&lt;br /&gt;
	&amp;lt;light-radius type=&amp;quot;float&amp;quot;&amp;gt;13&amp;lt;/light-radius&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the example above light-filter-one is soft white light and light-filter-two is a soft red light.&lt;br /&gt;
&lt;br /&gt;
After defining as above you can turn it on using the following property&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 1 is light-filter-one&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 2 is light-filter-two&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The flashlight effect inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
At lowest quality level, the effect supports an implicit lightmap, i.e. a color range of the basic texture can be selected and declared to act as a lightmap. This is specifically useful to render panel backlighting as in the example below:&lt;br /&gt;
&lt;br /&gt;
[[File:Ilightmap.jpg|600px|An implicit lightmap used to simulate a backlit panel]]&lt;br /&gt;
&lt;br /&gt;
The effect is off by default and switched on by setting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/implicit-lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following parameters are available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-tag-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-tag-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the base color to be tagged, i.e. if the panel labels to be illuminated at night are white, the color needs to be set to white.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-low type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/implicit-lightmap-threshold-low&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-high type=&amp;quot;float&amp;quot;&amp;gt;1.5&amp;lt;/implicit-lightmap-threshold-high&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The thresholds determine how similar a color may be to the base color in order to be still illuminated. The measure is the Euklidean distance of the color vectors. The lower thresholds determines when illumination will start to fade, the higher threshold at what distance in color space illumination will no longer take place. The thresholds have to be adapted to the specific situation - the technique works best for high-contrast panels (white labels on black background) and may not work at all for low contrast panels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-emit-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-emit-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The emit color specifies at which color the pixel will show if it is tagged (see above) and the implicit lightmap is on (see below) - set this to the color of the backlight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-intensity type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/implicit-lightmap-intensity&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the intensity determines how brightly the illuminated pixel will shine.&lt;br /&gt;
&lt;br /&gt;
Ambiance lighting can be simulated with the following tags.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-r type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-r&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-g type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-g&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-g&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-b type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-b&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example note the use of the &amp;quot;use&amp;quot; tag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be any defined property or static value.&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The implicit lightmap inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Irradiance maps ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In the simplest rendering schemes, diffuse and specular light are assumed to be highly directional (i.e. it illuminates lit surfaces only) while ambient light is taken to be omnidirectional.&lt;br /&gt;
&lt;br /&gt;
In reality, that is hardly ever true. In a typical outside location, ambient light is mainly coming from the sky above (which is why the ground underneath a car is dark even in the absence of directional light when the sky is overcast and the sun is not visible). In an enclosed space (like a room, or an aircraft cockpit), ambient light has to fall through the windows, i.e. is mainly not coming above but falling in horizontally.&lt;br /&gt;
&lt;br /&gt;
The directional dependence is not very strong though, yet it leaves measurable effects. In rendering, this can be accounted for by irradiance maps. In the following, the interior of the C-172p is rendered in the first case using omnidirectional ambient light, in the second case using an irradiance map giving the ambient light the directionality of the cabin windows, i.e. the light falls in predominantly horizontally (in addition, a grain map is superimposed to provide structure). Note how the spatial structure of the roof, looking bland when rendered in omnidirectional light is brought out by the irradiance map.&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-irradiance01.jpg|400px|C-172p cabin interior rendered without irradiance and grain map]]&lt;br /&gt;
[[File:Als-interior-irradiance02.jpg|400px|C-172p cabin interior rendered with irradiance and grain map]]&lt;br /&gt;
&lt;br /&gt;
Irradiance mapping is configured by the following parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-type type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/irradiance-map-type&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-strength type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/irradiance-map-strength&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several pre-configured irradiance map functions which can be chosen by map type. &lt;br /&gt;
&lt;br /&gt;
0: (default) omndirectional light&lt;br /&gt;
1: light predominantly coming from above (most appropriate for fighter cockpits)&lt;br /&gt;
2: light predominantly coming from the horizon (most appropriate for GA aircraft)&lt;br /&gt;
&lt;br /&gt;
The strength of the irradiance map regulates how pronounced the asymmetry of the map will be. A strength of zero always makes the light omnidirectional, whereas a strength of 1 implies that no light is coming from any direction 90 degree to the main direction (i.e. for the option 2, a strength of 1.0 means that no ambient light will fall in from above or below and that hence horizontal surfaces will appear pitch black unless direct light falls on them)&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The irradiance map inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Explicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In addition to the implicit lightmap, it is also possible to explicitly specify a lightmap. The syntax for this exactly parallels the syntax of the [[Model-combined_effect]] which supplies lightmaps for the exterior.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/MyAircraft/Effects/my_lightmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-multi type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/lightmap-multi&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-factor type=&amp;quot;float&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0&amp;lt;/lightmap-factor&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 &amp;lt;/lightmap-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a single channel lightmap in which pixel color times the lightmap color provides the illumination. Using the multi-channel function, up to four different maps can be specified in which the (rgba) values of a pixel encode where the light falls and the associated lightmap color what color the illumination takes. Each of these maps can be switched on and off or dimmed in intensity independently.&lt;br /&gt;
&lt;br /&gt;
=== Grain map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
The grain map sets a repeating hires overlay texture which can supply a very credible illusion of structure to a surface for cheap. The syntax exactly parallels that of the [[Model-combined_effect]] ALS grain feature described above.&lt;br /&gt;
&lt;br /&gt;
For instance, the following&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/Effects/MyGrainmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;10&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a grain overlay with a 10-time higher resolution over the base texture layer.&lt;br /&gt;
&lt;br /&gt;
== ALS procedural lights ==&lt;br /&gt;
&lt;br /&gt;
The ALS framework supports procedurally generated lights (for instance aircraft position lights, strobe lights,... ) for aircraft and models. Note that the effect produces the visuals of the lights themselves, but they do not illuminate their surroundings.&lt;br /&gt;
&lt;br /&gt;
=== Why procedural lights? ===&lt;br /&gt;
&lt;br /&gt;
Traditionally aircraft position lights have been implemented as billboarded emissive textures. This technique is limited in scope, as it has difficulty producing a directional light or changes in the light appearance (for instance glare) with changed scene lighting. The ALS procedural lights are designed to give visuals consistent with the auto-generated scene lights (runway lighting, street lights) and support configurable directionality, glare and even the illumination of fog by the lights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic implementation ===&lt;br /&gt;
&lt;br /&gt;
The base of the light is a texture quad which has Effects/procedural-light.eff assigned. Start from including the template provided into your model as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;model&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;/Models/Effects/procedural_light.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
        &amp;lt;offsets&amp;gt;&lt;br /&gt;
            &amp;lt;x-m&amp;gt; 0 &amp;lt;/x-m&amp;gt;&lt;br /&gt;
            &amp;lt;y-m&amp;gt; 0 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
            &amp;lt;z-m&amp;gt; 2 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
        &amp;lt;/offsets&amp;gt;&lt;br /&gt;
 &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and configure from there according to your own needs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not billboard the light via animation!&amp;lt;/b&amp;gt; The GLSL code will take care of the billboarding. Use a scale animation to change the size of the light, do not change the quad (the *.ac) itself in size, the shader code requires its geometry to be fixed.&lt;br /&gt;
&lt;br /&gt;
The lights are currently not supported in the default or Rembrandt renderer and will simply be invisible in these frameworks.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the light ===&lt;br /&gt;
&lt;br /&gt;
Make your own derived effect inheriting from Effects/procedural-light.eff and assign it in the xml wrapper of the light.&lt;br /&gt;
&lt;br /&gt;
====The base light color set====&lt;br /&gt;
&lt;br /&gt;
The base light color can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These take the normal set of values ranging from 0 to 1. &lt;br /&gt;
&lt;br /&gt;
====Light full intensity in the center====&lt;br /&gt;
&lt;br /&gt;
Now the light appears at full intensity in the center can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea behind this is that lights give a better visual appearance if their center is rendered visually brighter and de-saturated, but this occurs only if the light is at full intensity.&lt;br /&gt;
&lt;br /&gt;
There are no sanity checks done, you can assign any center color you like even if this makes no sense - you can change center color or darken it, so use with care.&lt;br /&gt;
&lt;br /&gt;
====Runtime change the light intensity====&lt;br /&gt;
&lt;br /&gt;
To runtime change the light intensity, assign&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to a property and change that property in the range from 0 to 1. Eg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;intensity_scale&amp;gt;&lt;br /&gt;
       &amp;lt;use&amp;gt;/rendering/nav-lights-factor&amp;lt;/use&amp;gt;&lt;br /&gt;
     &amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Set directional lights====&lt;br /&gt;
&lt;br /&gt;
For directional lights, you need to assign a pointing vector in aircraft coordinates into which the light cone points and set the directionality flag to true to activate the computations. This is done via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;-1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
    &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It would be customary to pass a normalized vector, but if you don't know how to do it, the shader will do it for you. By assigning properties to the pointing coordinates, the light direction can be changed runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not use a rotation animation to change the light direction - it won't work.&amp;lt;/b&amp;gt; Make the pointing vector properties and change them to your needs.&lt;br /&gt;
&lt;br /&gt;
====Fading of a directional light====&lt;br /&gt;
[[File:Directional light.jpg|thumb|Explanation of a light radiation pattern]]&lt;br /&gt;
The fading of a directional light away from the pointing axis is controlled by passing angles (or rather sines of angles).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
    &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Up to inner_angle, the light will have full intensity. From inner to outer angle the light will linearly fade to outer_gain. From outer angle to zero angle, the light intensity will linearly fade to zero.&lt;br /&gt;
&lt;br /&gt;
====Strobe effect====&lt;br /&gt;
&lt;br /&gt;
For get an automatic strobe effect you can set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to true. If you want your own strobe pattern, generate a strobe function and use &amp;lt;b&amp;gt;intensity_scale&amp;lt;/b&amp;gt; instead to pass it to the shader.&lt;br /&gt;
&lt;br /&gt;
=== Complete example ===&lt;br /&gt;
&lt;br /&gt;
Here's the left nav light of the C-172p:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;name&amp;gt;procedural-light-nav-left&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/procedural-light&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.000&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
        &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Arc is 110 deg, is 55 deg per side, giving 35 deg from wing --&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.7002075382097097&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
        &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Angles are 0.0 at 0 deg from pointing direction, 1.0 at&lt;br /&gt;
             90/-90 deg, and 0.0 at 180/-180 deg.&lt;br /&gt;
&lt;br /&gt;
             For left navigation light we use -0/-35 .. +110/+145 for&lt;br /&gt;
             the inner/outer range. This gives an arc of 110/180 deg,&lt;br /&gt;
             or 55/90 deg from center.&lt;br /&gt;
&lt;br /&gt;
             Value = sin(angle in degrees)&lt;br /&gt;
&lt;br /&gt;
             0.8191520442889918 = 55 deg (* 2 = 110 deg inner angle)&lt;br /&gt;
             1.0000 = 90 deg (* 2 = 180 deg outer angle)&lt;br /&gt;
        --&amp;gt;&lt;br /&gt;
        &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.8191520442889918&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
        &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.982547593563&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
The Cessna 182 by Heiko Schulz and Gilberto Agostinho with procedural lights activated:&amp;lt;br&amp;gt;&lt;br /&gt;
:''(To percieve the effect well, you probably have to darken your room and switch to fullscreen)''&lt;br /&gt;
[[File:Cessna 182 with procedural lights.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
===Move dynamically the procedural light===&lt;br /&gt;
&lt;br /&gt;
The position of a procedural light is declared in the '''&amp;lt;model&amp;gt;''' section, within the '''&amp;lt;PropertyList&amp;gt;''' XML code, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;procedural-light-gear-white-left&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;path&amp;gt;Effects/lights/procedural_light_gear_white.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
      &amp;lt;offsets&amp;gt;&lt;br /&gt;
          &amp;lt;x-m&amp;gt; -3.08&amp;lt;/x-m&amp;gt;&lt;br /&gt;
          &amp;lt;y-m&amp;gt; -0.21 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
          &amp;lt;z-m&amp;gt; -1.18 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
      &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tag ''procedural-light-gear-white-left'' is very important because is the object name. This name will be used as the reference object.&amp;lt;BR&amp;gt;Next, we can define an animation in the same xml file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;GearFrontalDoor&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;gear/gear/position-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;axis&amp;gt;&lt;br /&gt;
          &amp;lt;x1-m&amp;gt;  -3.00240&amp;lt;/x1-m&amp;gt;&lt;br /&gt;
          &amp;lt;y1-m&amp;gt;  1.0&amp;lt;/y1-m&amp;gt;&lt;br /&gt;
          &amp;lt;z1-m&amp;gt;  -1.02906&amp;lt;/z1-m&amp;gt;&lt;br /&gt;
          &amp;lt;x2-m&amp;gt;  -3.00240&amp;lt;/x2-m&amp;gt;&lt;br /&gt;
          &amp;lt;y2-m&amp;gt;  -1.0&amp;lt;/y2-m&amp;gt;&lt;br /&gt;
          &amp;lt;z2-m&amp;gt;  -1.0290&amp;lt;/z2-m&amp;gt;&lt;br /&gt;
      &amp;lt;/axis&amp;gt;&lt;br /&gt;
      &amp;lt;interpolation&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.25&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.50&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;60&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.75&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;30&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;0&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
      &amp;lt;/interpolation&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''procedural light'' object code is this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS fuselage shadow effect ==&lt;br /&gt;
ALS supports the manipulation of a (simplified) ground shadow. This effect uses an existing simplified shadow animation configuration and by default uses the gear-agl-m property to calculate the ground placement of that simplified shadow.&lt;br /&gt;
&lt;br /&gt;
The system, techniques for using it, and several working examples are on [https://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=24859&amp;amp;start=135 this extensive forum thread about the ALS shadow effects].&lt;br /&gt;
&lt;br /&gt;
[[File:Alsshadow.jpg|800px|ALS Shadow]]&lt;br /&gt;
&lt;br /&gt;
The effect can be applied easily in any aircraft that report the gear-agl-m property by simply adding a declaration inheriting from shadow.eff.&lt;br /&gt;
&lt;br /&gt;
If the aircraft does not support the gear-agl-m property, (notably JSBSim), you need to create a [[Autopilot configuration reference | Property Rule]] to pass a supported AGL data to the gear-agl-m property. In this case we use altitude-agl-ft converted to meters using a property rule configuration file.&lt;br /&gt;
&lt;br /&gt;
For the first example we'll use the &amp;quot;supported gear-agl-m&amp;quot; method for aircraft that don't require a property rule.&lt;br /&gt;
&lt;br /&gt;
Simply add the following inheritance declaration after you declare your shadow animation statement.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;name_of_the_shadow_object&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the non-ALS simplified shadow code you normally use a &amp;quot;translate&amp;quot; animation to position the shadow on the ground.&lt;br /&gt;
When using the ALS method you must either remove, comment out, or apply a condition to restrict its use to non ALS shadow applications, because ALS is responsible for computing the shadows ground position.&lt;br /&gt;
&lt;br /&gt;
Here is how we apply a condition to the translation to limit it effect to non-ALS application only.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A complete shadow animation block looks like this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- opaque objects --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- transparent objects --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;not&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/rembrandt/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;/not&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;noshadow&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- pitch --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/pitch-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;-1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;1&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- roll --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/roll-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;1&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For aircraft requiring a [[Autopilot configuration reference | Property Rule]] there are a couple extra steps.&lt;br /&gt;
&lt;br /&gt;
In aircraft-set.xml you add the property rule call to the &amp;quot;configuration file&amp;quot; in between the PropertyList/sim/systems tag pairs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;property-rule n=&amp;quot;101&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;gear_agl-m&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;Aircraft/c172p/Systems/gearAGL.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
&amp;lt;/property-rule&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: the n=&amp;quot;101&amp;quot; needs to be =+100 as -100 is reserved for system wide property rules.&lt;br /&gt;
In the above example 101 was used because 100 was already being used by a previous property rule definition.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;configuration file&amp;quot; normally goes in /Systems.&lt;br /&gt;
In this example we named the configuration file /Systems/gearAGL.xml.&lt;br /&gt;
&lt;br /&gt;
Here is the complete /Systems/gearAGL.xml configuration file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;filter&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;reference&amp;gt;6&amp;lt;/reference&amp;gt;&lt;br /&gt;
    &amp;lt;output&amp;gt;/position/gear-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
  &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
What the configuration file does is convert the input of altitude-agl-ft to the output of (((altitude-agl-ft)-6)*0.3048) or (convert ft-6 to m) and pass it to /position/gear-agl-m.&lt;br /&gt;
 &lt;br /&gt;
See [[Autopilot configuration reference | Input and reference properties or values &amp;lt;input&amp;gt; and &amp;lt;reference&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
== ALS 3d shadow volume effect ==&lt;br /&gt;
What might be considered the next level of realism using a relatively &amp;quot;cheap&amp;quot; shadow effect is to use a 3d volume shadow.&lt;br /&gt;
&lt;br /&gt;
[[File:Shadow vol02.jpg|800px|ALS 3d Shadow Volume]]&lt;br /&gt;
&lt;br /&gt;
The procedure to implement the ALS shadow volume is similar to the ALS-shadow above with a few modifications.&lt;br /&gt;
&lt;br /&gt;
First you have to have a 3d shadow volume model of the aircraft you are applying the effect to. This model should be a low poly model that is optimized to be as little of a footprint as possible.&lt;br /&gt;
&lt;br /&gt;
A property rule is required, same as above. This is used to generate the above ground altitude in meters, (altitude-agl-m). The &amp;quot;altitude-agl-m&amp;quot; is used to place the shadow close to the ground in real time at an FDM rate of execution.&lt;br /&gt;
{{note|Do not confuse &amp;quot;altitude-agl-m&amp;quot; with the other type of non-3d ALS-shadow property of &amp;quot;gear-agl-m&amp;quot;. The shaders involved use these two different properties respectively for the two different effect. They are not interchangeable.}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
   &amp;lt;filter&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
      &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
      &amp;lt;reference&amp;gt;1.0&amp;lt;/reference&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;/position/altitude-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The other difference from the ALS-shadow above is that it uses a different inherited effect.&lt;br /&gt;
Instead of&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
you use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow-vol&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make sure there is no duplicate 3d model shown in other renderers besides ALS it is also important to use a different select animation:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- hide 3d shadow in non ALS mode --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Procedural Texturing]]&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS infrared vision]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;br /&gt;
[[Category:ALS]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Talk:ALS_technical_notes&amp;diff=115736</id>
		<title>Talk:ALS technical notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Talk:ALS_technical_notes&amp;diff=115736"/>
		<updated>2018-08-03T06:22:31Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* GLSL code quoted */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ALS vs. Rembrandt ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |Rembrandt and ALS work with two different rendering pipelines/implementations using very different assumptions - thus, it would be a lot of work to integrate those two properly, and as has been said, Rembrandt isn't beint actively maintained currently, while ALS has been under active development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Several contributors familiar with shaders and effects have stated that they're not overly motivated to pick up Rembrandt maintenance mainly due to its performance issues, which cannot be just improved by doing  base package development (effects/shaders), so that people wanting to improve Rembrandt performance would need to modify the corresponding C++ code. People familiar with FlightGear's rendering pipeline are in very short supply. Unfortunately, FlightGear's rendering pipeline is generally also not very well documented.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=217688#p217688&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Why in Rembrandt, can not be activated Atmospheric light&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Tue Sep 02&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |For my visual preferences and on my system ALS is a much better use of what rendering resources there are than Rembrandt and the view out the windows is superior to that of the default scheme.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221079#p221079&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;AndersG&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sat Oct 18&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  | the reason we still havent moved to opengl 3.x+ has been due to supporting OSX.  If we wish to support OSX, we need to completely abandon the fixed function pipeline.  Some of our dependencies (plib) are no longer maintained , so must be replaced with something that supports shaders (canvas, etc).  &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Apple has made app developers to move on or stay in fixed fn.  We aren't there yet.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Almost every feature in fg needs a maintainer.  Maybe someone who especially loves deferred rendering will step up, and begin migrating Thorsten's als shaders to rembrandt.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221132#p221132&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;psadro_gm&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sat Oct 18&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |the other issue is that there's still legacy GL code running in the main/rendering loop that prevents us from using a more recent OpenGL version, such as the panel/HUD and GUI code - those things are in the process of being unified, and re-implemented, on top of modern OSG code using a shared back-end via Canvas.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221133#p221133&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sat Oct 18&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |you never actually transit from a deferred to a forward scheme, which is why you don't have the same baseline internally, which is why you need to structure operations you do very differently and can in general expect a very different performance footprint.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221222#p221222&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sun Oct 19&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |But the point is - I do understand what the shaders outside ALS do, and I could fix them and/or develop them further if needed. And, given a few weeks to iron out the details, I could also make ALS work under Rembrandt.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=204372#p204372&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: A long shot&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Thu Mar 27&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |The actual reason why this isn't happening is twofold:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
First, as I said, you can spend performance only once. For my default settings of random vegetation and buildings and clouds, I'm getting 15 fps out of Rembrandt as it is once I want nice shadows (i.e. apply sufficient filtering that I don't get a headache watching them) vs. 60 fps in ALS at highest quality settings. ALS would require to squeeze another 1000 lines of code into the fragment shader, i.e. make it perhaps 5 times longer than it it (on average). That's on a modern gaming laptop. So who's expected to be able to run Rembrandt + ALS with anything above 5 fps? I don't see it on my machine. And of course, assume I do it - guess at whose feet complaints about low framerate end up? Guess who gets told by every amateur GLSL coder that he's stupid because 'there must be a faster way'?&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Second, there seems to be something religious about Rembrandt. I've always gotten help and good advice from FredB for whatever I was trying to do, but there's a very outspoken and agressive community of Rembrandt-users which pass no opportunity to tell me that what I do is crap, rubbish and that Rembrandt is the best and I should better quit what I'm doing because it's so inferior. Maybe so - but I sure won't lift a finger for anything these people want to see done. If anyone wants ALS under Rembrandt, insulting me is a sure way to not get it done.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=204372#p204372&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: A long shot&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Thu Mar 27&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |You could in fact take lots of the procedural texturing code and it would run - it's even easy, since I factored the noise functions into libraries which can be included.  As to why Rembrandt doesn't do that, it's a question for the Rembrandt maintainers, not for me. I have offered 3 or 4 times to assist if anyone wants to port these code blocks on the devel list.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
So, the mysterious reason is: the Rembrandt maintainers are not interested. That's all.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=220985#p220985&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Fri Oct 17&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |I tend to use/support what works for me well enough (including performance), as well as features that are either sufficiently generic and extensible or at least well-documented with some manpower - for the time being, none of this applies to Rembrandt unfortunately. I consider myself fairly familiar with FG, including its internals - and I am generally able to make FG work well enough on most systems - in fact, I am the one who started the corresponding wiki articles to document such tips - I have yet to see sufficient &amp;quot;configuration advice&amp;quot; from Rembrandt evangelists.&amp;lt;br/&amp;gt;&lt;br /&gt;
I would also very much like to see Rembrandt development to continue, and I might even contribute to such an effort - but for that to happen, a few other things need to happen first, including more/better developer docs - Rembrandt is covering a lot of uncharted waters, i.e. areas in FG to which only long-time contributors like Fred, Tim or Mathias have contributed.&amp;lt;br/&amp;gt;&lt;br /&gt;
Given Thorsten's recent C++ patches to the rendering pipeline, he seems to be well on his way to actually understand/document such code paths than any other active contributor.&amp;lt;br/&amp;gt;&lt;br /&gt;
Personally, I am frankly easily distracted by stuff that I find more interesting than investigating Rembrandt's performance issues, and I don't consider shadows essential either - but Rembrandt development will either need to be picked up by Fred himself, or we'll inevitably have to do a lot of research, trial &amp;amp;amp; error and documenting to make heads and tails of the code.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=220987#p220987&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Fri Oct 17&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do we actually have to have the ALS vs. Rembrandt philosophy here? I'm trying to create a technical documentation page which should be concise and to the point, I can't see how the assortment of things I have said about ALS and Rembrandt features here.&lt;br /&gt;
&lt;br /&gt;
: it's your article, so feel free to remove whatever you disagree with - that said, your quotes may still be useful elsewhere, especially because the whole Rembrandt vs. ALS debate is a recurring one, so maybe some kind of FAQ ? I don't know ... I just added some of your quotes here to ensure that people can refer to those arguments, without having to resurrect these debates on the forum over and over again. If you think there is a better way to accomplish that, it's your call. --[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 06:29, 11 March 2015 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Surfaces ==&lt;br /&gt;
&lt;br /&gt;
There is internally no 'ALS' or 'Rembrandt' in the effect framework. We assign effects to surfaces. These effects have techniques which depend on conditionals (predicates), always the first matching technique of an effect is used. It is at the level of these conditionals that we decide upon ALS or Rembrandt.&lt;br /&gt;
&lt;br /&gt;
This is not a must - it would be easy to write an effect which only runs ALS, even if Rembrandt is on. Just leave the conditional out of the technique.&lt;br /&gt;
&lt;br /&gt;
The opposite is pretty much what happens if you assign model-transparent to a surface. This is an effect which has just a single technique (a fixed pipeline setup). Which means that you get transparency rendered okayish, no depth buffer written and outside- in rendering of a depth ordered bin - but at the same time, this technique wrecks ALS light and fog - at night at high altitude the glass will glow faintly red (because that's the light setting of the default renderer) and you will see it through fog no matter the distance. &lt;br /&gt;
&lt;br /&gt;
Now, an unassigned surface uses the general-purpose model-default.eff. This has depth buffer writing and no outside-in rendering and does not use a depth sorted bin - so it may have issues for transparent surfaces. But this has a proper sequence of conditionals and will run ALS when ALS is selected and Rembrandt when Rembrandt is selected, i.e. always get lighting and fogging right. &lt;br /&gt;
&lt;br /&gt;
The glass effect eventually will be one way to render glass in ALS (intended for windows seen from inside). It has correct lighting and fogging, and it will soon use the depth sorted bin and do all the other transparent stuff - and automatically dispatch the surface to the same fixed-pipeline technique Rembrandt uses in model-transparent when Rembrandt is running[http://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=25456&amp;amp;p=235772#p235760].&lt;br /&gt;
&lt;br /&gt;
== Article name ==&lt;br /&gt;
&lt;br /&gt;
Looking over the page, this article seems to be devoted to describing effects based on ALS used on aircraft, while the title suggests that it describes the technical processes and details of the &amp;quot;works&amp;quot; of ALS itself. As such, would a title such as &amp;quot;ALS Aircraft Effects,&amp;quot; &amp;quot;ALS effects&amp;quot; or &amp;quot;ALS aircraft information&amp;quot; be more appropriate?&lt;br /&gt;
[[User:Adam|Adam (else MIG29pilot)]] ([[User talk:Adam|talk]]) 16:22, 1 January 2016 (EST)&lt;br /&gt;
&lt;br /&gt;
== GLSL code quoted ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;/* Fading of a directional light */ &lt;br /&gt;
&lt;br /&gt;
Note: To better explain the relation of the variables inner_angle, outer_angle and zero angle, this is the algorithm that produces the scalar value directional_fade from which the intensity value is defined in the shaders file light-ALS.frag: &amp;lt;/i&amp;gt;&lt;br /&gt;
  float directional_fade (in float direction) {&lt;br /&gt;
  float arg = clamp(direction, 0.0, 1.0);&lt;br /&gt;
  float ia = (1.0 - inner_angle);&lt;br /&gt;
  float oa = (1.0 - outer_angle);&lt;br /&gt;
  float za = (1.0 - zero_angle);&lt;br /&gt;
  if (direction &amp;gt; ia) {return 1.0;}&lt;br /&gt;
  else if (direction &amp;gt; oa) &lt;br /&gt;
  {return outer_gain + (1.0-outer_gain) * (direction - oa) / (ia - oa);}&lt;br /&gt;
  else if (direction &amp;gt; za)&lt;br /&gt;
  {return outer_gain * (direction - za) / (oa - za);}&lt;br /&gt;
  else {return 0.0;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Quoting GLSL code in the wiki is risky (it might change on the repository without warning), too detailed and misleading (generally people tend to expect copy/pastable examples).&lt;br /&gt;
&lt;br /&gt;
If more explanation is required, either link to the shader code on the repository or make an illustration please.&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Talk:ALS_technical_notes&amp;diff=115735</id>
		<title>Talk:ALS technical notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Talk:ALS_technical_notes&amp;diff=115735"/>
		<updated>2018-08-03T06:22:14Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* GLSL code quoted */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ALS vs. Rembrandt ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |Rembrandt and ALS work with two different rendering pipelines/implementations using very different assumptions - thus, it would be a lot of work to integrate those two properly, and as has been said, Rembrandt isn't beint actively maintained currently, while ALS has been under active development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Several contributors familiar with shaders and effects have stated that they're not overly motivated to pick up Rembrandt maintenance mainly due to its performance issues, which cannot be just improved by doing  base package development (effects/shaders), so that people wanting to improve Rembrandt performance would need to modify the corresponding C++ code. People familiar with FlightGear's rendering pipeline are in very short supply. Unfortunately, FlightGear's rendering pipeline is generally also not very well documented.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=217688#p217688&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Why in Rembrandt, can not be activated Atmospheric light&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Tue Sep 02&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |For my visual preferences and on my system ALS is a much better use of what rendering resources there are than Rembrandt and the view out the windows is superior to that of the default scheme.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221079#p221079&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;AndersG&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sat Oct 18&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  | the reason we still havent moved to opengl 3.x+ has been due to supporting OSX.  If we wish to support OSX, we need to completely abandon the fixed function pipeline.  Some of our dependencies (plib) are no longer maintained , so must be replaced with something that supports shaders (canvas, etc).  &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Apple has made app developers to move on or stay in fixed fn.  We aren't there yet.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Almost every feature in fg needs a maintainer.  Maybe someone who especially loves deferred rendering will step up, and begin migrating Thorsten's als shaders to rembrandt.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221132#p221132&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;psadro_gm&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sat Oct 18&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |the other issue is that there's still legacy GL code running in the main/rendering loop that prevents us from using a more recent OpenGL version, such as the panel/HUD and GUI code - those things are in the process of being unified, and re-implemented, on top of modern OSG code using a shared back-end via Canvas.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221133#p221133&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sat Oct 18&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |you never actually transit from a deferred to a forward scheme, which is why you don't have the same baseline internally, which is why you need to structure operations you do very differently and can in general expect a very different performance footprint.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221222#p221222&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sun Oct 19&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |But the point is - I do understand what the shaders outside ALS do, and I could fix them and/or develop them further if needed. And, given a few weeks to iron out the details, I could also make ALS work under Rembrandt.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=204372#p204372&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: A long shot&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Thu Mar 27&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |The actual reason why this isn't happening is twofold:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
First, as I said, you can spend performance only once. For my default settings of random vegetation and buildings and clouds, I'm getting 15 fps out of Rembrandt as it is once I want nice shadows (i.e. apply sufficient filtering that I don't get a headache watching them) vs. 60 fps in ALS at highest quality settings. ALS would require to squeeze another 1000 lines of code into the fragment shader, i.e. make it perhaps 5 times longer than it it (on average). That's on a modern gaming laptop. So who's expected to be able to run Rembrandt + ALS with anything above 5 fps? I don't see it on my machine. And of course, assume I do it - guess at whose feet complaints about low framerate end up? Guess who gets told by every amateur GLSL coder that he's stupid because 'there must be a faster way'?&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Second, there seems to be something religious about Rembrandt. I've always gotten help and good advice from FredB for whatever I was trying to do, but there's a very outspoken and agressive community of Rembrandt-users which pass no opportunity to tell me that what I do is crap, rubbish and that Rembrandt is the best and I should better quit what I'm doing because it's so inferior. Maybe so - but I sure won't lift a finger for anything these people want to see done. If anyone wants ALS under Rembrandt, insulting me is a sure way to not get it done.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=204372#p204372&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: A long shot&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Thu Mar 27&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |You could in fact take lots of the procedural texturing code and it would run - it's even easy, since I factored the noise functions into libraries which can be included.  As to why Rembrandt doesn't do that, it's a question for the Rembrandt maintainers, not for me. I have offered 3 or 4 times to assist if anyone wants to port these code blocks on the devel list.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
So, the mysterious reason is: the Rembrandt maintainers are not interested. That's all.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=220985#p220985&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Fri Oct 17&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |I tend to use/support what works for me well enough (including performance), as well as features that are either sufficiently generic and extensible or at least well-documented with some manpower - for the time being, none of this applies to Rembrandt unfortunately. I consider myself fairly familiar with FG, including its internals - and I am generally able to make FG work well enough on most systems - in fact, I am the one who started the corresponding wiki articles to document such tips - I have yet to see sufficient &amp;quot;configuration advice&amp;quot; from Rembrandt evangelists.&amp;lt;br/&amp;gt;&lt;br /&gt;
I would also very much like to see Rembrandt development to continue, and I might even contribute to such an effort - but for that to happen, a few other things need to happen first, including more/better developer docs - Rembrandt is covering a lot of uncharted waters, i.e. areas in FG to which only long-time contributors like Fred, Tim or Mathias have contributed.&amp;lt;br/&amp;gt;&lt;br /&gt;
Given Thorsten's recent C++ patches to the rendering pipeline, he seems to be well on his way to actually understand/document such code paths than any other active contributor.&amp;lt;br/&amp;gt;&lt;br /&gt;
Personally, I am frankly easily distracted by stuff that I find more interesting than investigating Rembrandt's performance issues, and I don't consider shadows essential either - but Rembrandt development will either need to be picked up by Fred himself, or we'll inevitably have to do a lot of research, trial &amp;amp;amp; error and documenting to make heads and tails of the code.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=220987#p220987&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Fri Oct 17&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do we actually have to have the ALS vs. Rembrandt philosophy here? I'm trying to create a technical documentation page which should be concise and to the point, I can't see how the assortment of things I have said about ALS and Rembrandt features here.&lt;br /&gt;
&lt;br /&gt;
: it's your article, so feel free to remove whatever you disagree with - that said, your quotes may still be useful elsewhere, especially because the whole Rembrandt vs. ALS debate is a recurring one, so maybe some kind of FAQ ? I don't know ... I just added some of your quotes here to ensure that people can refer to those arguments, without having to resurrect these debates on the forum over and over again. If you think there is a better way to accomplish that, it's your call. --[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 06:29, 11 March 2015 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Surfaces ==&lt;br /&gt;
&lt;br /&gt;
There is internally no 'ALS' or 'Rembrandt' in the effect framework. We assign effects to surfaces. These effects have techniques which depend on conditionals (predicates), always the first matching technique of an effect is used. It is at the level of these conditionals that we decide upon ALS or Rembrandt.&lt;br /&gt;
&lt;br /&gt;
This is not a must - it would be easy to write an effect which only runs ALS, even if Rembrandt is on. Just leave the conditional out of the technique.&lt;br /&gt;
&lt;br /&gt;
The opposite is pretty much what happens if you assign model-transparent to a surface. This is an effect which has just a single technique (a fixed pipeline setup). Which means that you get transparency rendered okayish, no depth buffer written and outside- in rendering of a depth ordered bin - but at the same time, this technique wrecks ALS light and fog - at night at high altitude the glass will glow faintly red (because that's the light setting of the default renderer) and you will see it through fog no matter the distance. &lt;br /&gt;
&lt;br /&gt;
Now, an unassigned surface uses the general-purpose model-default.eff. This has depth buffer writing and no outside-in rendering and does not use a depth sorted bin - so it may have issues for transparent surfaces. But this has a proper sequence of conditionals and will run ALS when ALS is selected and Rembrandt when Rembrandt is selected, i.e. always get lighting and fogging right. &lt;br /&gt;
&lt;br /&gt;
The glass effect eventually will be one way to render glass in ALS (intended for windows seen from inside). It has correct lighting and fogging, and it will soon use the depth sorted bin and do all the other transparent stuff - and automatically dispatch the surface to the same fixed-pipeline technique Rembrandt uses in model-transparent when Rembrandt is running[http://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=25456&amp;amp;p=235772#p235760].&lt;br /&gt;
&lt;br /&gt;
== Article name ==&lt;br /&gt;
&lt;br /&gt;
Looking over the page, this article seems to be devoted to describing effects based on ALS used on aircraft, while the title suggests that it describes the technical processes and details of the &amp;quot;works&amp;quot; of ALS itself. As such, would a title such as &amp;quot;ALS Aircraft Effects,&amp;quot; &amp;quot;ALS effects&amp;quot; or &amp;quot;ALS aircraft information&amp;quot; be more appropriate?&lt;br /&gt;
[[User:Adam|Adam (else MIG29pilot)]] ([[User talk:Adam|talk]]) 16:22, 1 January 2016 (EST)&lt;br /&gt;
&lt;br /&gt;
== GLSL code quoted ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;/* Fading of a directional light */ &lt;br /&gt;
&lt;br /&gt;
Note: To better explain the relation of the variables inner_angle, outer_angle and zero angle, this is the algorithm that produces the scalar value directional_fade from which the intensity value is defined in the shaders file light-ALS.frag: &amp;lt;/i&amp;gt;&lt;br /&gt;
  float directional_fade (in float direction) {&lt;br /&gt;
  float arg = clamp(direction, 0.0, 1.0);&lt;br /&gt;
  float ia = (1.0 - inner_angle);&lt;br /&gt;
  float oa = (1.0 - outer_angle);&lt;br /&gt;
  float za = (1.0 - zero_angle);&lt;br /&gt;
  if (direction &amp;gt; ia) {return 1.0;}&lt;br /&gt;
  else if (direction &amp;gt; oa) &lt;br /&gt;
	{return outer_gain + (1.0-outer_gain) * (direction - oa) / (ia - oa);}&lt;br /&gt;
  else if (direction &amp;gt; za)&lt;br /&gt;
	{return outer_gain * (direction - za) / (oa - za);}&lt;br /&gt;
  else {return 0.0;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Quoting GLSL code in the wiki is risky (it might change on the repository without warning), too detailed and misleading (generally people tend to expect copy/pastable examples).&lt;br /&gt;
&lt;br /&gt;
If more explanation is required, either link to the shader code on the repository or make an illustration please.&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Talk:ALS_technical_notes&amp;diff=115734</id>
		<title>Talk:ALS technical notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Talk:ALS_technical_notes&amp;diff=115734"/>
		<updated>2018-08-03T06:21:47Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* GLSL code quoted */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ALS vs. Rembrandt ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |Rembrandt and ALS work with two different rendering pipelines/implementations using very different assumptions - thus, it would be a lot of work to integrate those two properly, and as has been said, Rembrandt isn't beint actively maintained currently, while ALS has been under active development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Several contributors familiar with shaders and effects have stated that they're not overly motivated to pick up Rembrandt maintenance mainly due to its performance issues, which cannot be just improved by doing  base package development (effects/shaders), so that people wanting to improve Rembrandt performance would need to modify the corresponding C++ code. People familiar with FlightGear's rendering pipeline are in very short supply. Unfortunately, FlightGear's rendering pipeline is generally also not very well documented.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=217688#p217688&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Why in Rembrandt, can not be activated Atmospheric light&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Tue Sep 02&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |For my visual preferences and on my system ALS is a much better use of what rendering resources there are than Rembrandt and the view out the windows is superior to that of the default scheme.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221079#p221079&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;AndersG&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sat Oct 18&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  | the reason we still havent moved to opengl 3.x+ has been due to supporting OSX.  If we wish to support OSX, we need to completely abandon the fixed function pipeline.  Some of our dependencies (plib) are no longer maintained , so must be replaced with something that supports shaders (canvas, etc).  &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Apple has made app developers to move on or stay in fixed fn.  We aren't there yet.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Almost every feature in fg needs a maintainer.  Maybe someone who especially loves deferred rendering will step up, and begin migrating Thorsten's als shaders to rembrandt.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221132#p221132&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;psadro_gm&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sat Oct 18&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |the other issue is that there's still legacy GL code running in the main/rendering loop that prevents us from using a more recent OpenGL version, such as the panel/HUD and GUI code - those things are in the process of being unified, and re-implemented, on top of modern OSG code using a shared back-end via Canvas.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221133#p221133&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sat Oct 18&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |you never actually transit from a deferred to a forward scheme, which is why you don't have the same baseline internally, which is why you need to structure operations you do very differently and can in general expect a very different performance footprint.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221222#p221222&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sun Oct 19&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |But the point is - I do understand what the shaders outside ALS do, and I could fix them and/or develop them further if needed. And, given a few weeks to iron out the details, I could also make ALS work under Rembrandt.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=204372#p204372&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: A long shot&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Thu Mar 27&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |The actual reason why this isn't happening is twofold:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
First, as I said, you can spend performance only once. For my default settings of random vegetation and buildings and clouds, I'm getting 15 fps out of Rembrandt as it is once I want nice shadows (i.e. apply sufficient filtering that I don't get a headache watching them) vs. 60 fps in ALS at highest quality settings. ALS would require to squeeze another 1000 lines of code into the fragment shader, i.e. make it perhaps 5 times longer than it it (on average). That's on a modern gaming laptop. So who's expected to be able to run Rembrandt + ALS with anything above 5 fps? I don't see it on my machine. And of course, assume I do it - guess at whose feet complaints about low framerate end up? Guess who gets told by every amateur GLSL coder that he's stupid because 'there must be a faster way'?&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Second, there seems to be something religious about Rembrandt. I've always gotten help and good advice from FredB for whatever I was trying to do, but there's a very outspoken and agressive community of Rembrandt-users which pass no opportunity to tell me that what I do is crap, rubbish and that Rembrandt is the best and I should better quit what I'm doing because it's so inferior. Maybe so - but I sure won't lift a finger for anything these people want to see done. If anyone wants ALS under Rembrandt, insulting me is a sure way to not get it done.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=204372#p204372&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: A long shot&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Thu Mar 27&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |You could in fact take lots of the procedural texturing code and it would run - it's even easy, since I factored the noise functions into libraries which can be included.  As to why Rembrandt doesn't do that, it's a question for the Rembrandt maintainers, not for me. I have offered 3 or 4 times to assist if anyone wants to port these code blocks on the devel list.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
So, the mysterious reason is: the Rembrandt maintainers are not interested. That's all.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=220985#p220985&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Fri Oct 17&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |I tend to use/support what works for me well enough (including performance), as well as features that are either sufficiently generic and extensible or at least well-documented with some manpower - for the time being, none of this applies to Rembrandt unfortunately. I consider myself fairly familiar with FG, including its internals - and I am generally able to make FG work well enough on most systems - in fact, I am the one who started the corresponding wiki articles to document such tips - I have yet to see sufficient &amp;quot;configuration advice&amp;quot; from Rembrandt evangelists.&amp;lt;br/&amp;gt;&lt;br /&gt;
I would also very much like to see Rembrandt development to continue, and I might even contribute to such an effort - but for that to happen, a few other things need to happen first, including more/better developer docs - Rembrandt is covering a lot of uncharted waters, i.e. areas in FG to which only long-time contributors like Fred, Tim or Mathias have contributed.&amp;lt;br/&amp;gt;&lt;br /&gt;
Given Thorsten's recent C++ patches to the rendering pipeline, he seems to be well on his way to actually understand/document such code paths than any other active contributor.&amp;lt;br/&amp;gt;&lt;br /&gt;
Personally, I am frankly easily distracted by stuff that I find more interesting than investigating Rembrandt's performance issues, and I don't consider shadows essential either - but Rembrandt development will either need to be picked up by Fred himself, or we'll inevitably have to do a lot of research, trial &amp;amp;amp; error and documenting to make heads and tails of the code.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=220987#p220987&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Fri Oct 17&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do we actually have to have the ALS vs. Rembrandt philosophy here? I'm trying to create a technical documentation page which should be concise and to the point, I can't see how the assortment of things I have said about ALS and Rembrandt features here.&lt;br /&gt;
&lt;br /&gt;
: it's your article, so feel free to remove whatever you disagree with - that said, your quotes may still be useful elsewhere, especially because the whole Rembrandt vs. ALS debate is a recurring one, so maybe some kind of FAQ ? I don't know ... I just added some of your quotes here to ensure that people can refer to those arguments, without having to resurrect these debates on the forum over and over again. If you think there is a better way to accomplish that, it's your call. --[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 06:29, 11 March 2015 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Surfaces ==&lt;br /&gt;
&lt;br /&gt;
There is internally no 'ALS' or 'Rembrandt' in the effect framework. We assign effects to surfaces. These effects have techniques which depend on conditionals (predicates), always the first matching technique of an effect is used. It is at the level of these conditionals that we decide upon ALS or Rembrandt.&lt;br /&gt;
&lt;br /&gt;
This is not a must - it would be easy to write an effect which only runs ALS, even if Rembrandt is on. Just leave the conditional out of the technique.&lt;br /&gt;
&lt;br /&gt;
The opposite is pretty much what happens if you assign model-transparent to a surface. This is an effect which has just a single technique (a fixed pipeline setup). Which means that you get transparency rendered okayish, no depth buffer written and outside- in rendering of a depth ordered bin - but at the same time, this technique wrecks ALS light and fog - at night at high altitude the glass will glow faintly red (because that's the light setting of the default renderer) and you will see it through fog no matter the distance. &lt;br /&gt;
&lt;br /&gt;
Now, an unassigned surface uses the general-purpose model-default.eff. This has depth buffer writing and no outside-in rendering and does not use a depth sorted bin - so it may have issues for transparent surfaces. But this has a proper sequence of conditionals and will run ALS when ALS is selected and Rembrandt when Rembrandt is selected, i.e. always get lighting and fogging right. &lt;br /&gt;
&lt;br /&gt;
The glass effect eventually will be one way to render glass in ALS (intended for windows seen from inside). It has correct lighting and fogging, and it will soon use the depth sorted bin and do all the other transparent stuff - and automatically dispatch the surface to the same fixed-pipeline technique Rembrandt uses in model-transparent when Rembrandt is running[http://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=25456&amp;amp;p=235772#p235760].&lt;br /&gt;
&lt;br /&gt;
== Article name ==&lt;br /&gt;
&lt;br /&gt;
Looking over the page, this article seems to be devoted to describing effects based on ALS used on aircraft, while the title suggests that it describes the technical processes and details of the &amp;quot;works&amp;quot; of ALS itself. As such, would a title such as &amp;quot;ALS Aircraft Effects,&amp;quot; &amp;quot;ALS effects&amp;quot; or &amp;quot;ALS aircraft information&amp;quot; be more appropriate?&lt;br /&gt;
[[User:Adam|Adam (else MIG29pilot)]] ([[User talk:Adam|talk]]) 16:22, 1 January 2016 (EST)&lt;br /&gt;
&lt;br /&gt;
== GLSL code quoted ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;/* Fading of a directional light */ &lt;br /&gt;
&lt;br /&gt;
Note: To better explain the relation of the variables inner_angle, outer_angle and zero angle, this is the algorithm that produces the scalar value directional_fade from which the intensity value is defined in the shaders file light-ALS.frag: &lt;br /&gt;
float directional_fade (in float direction) {&lt;br /&gt;
  float arg = clamp(direction, 0.0, 1.0);&lt;br /&gt;
  float ia = (1.0 - inner_angle);&lt;br /&gt;
  float oa = (1.0 - outer_angle);&lt;br /&gt;
  float za = (1.0 - zero_angle);&lt;br /&gt;
  if (direction &amp;gt; ia) {return 1.0;}&lt;br /&gt;
  else if (direction &amp;gt; oa) &lt;br /&gt;
	{return outer_gain + (1.0-outer_gain) * (direction - oa) / (ia - oa);}&lt;br /&gt;
  else if (direction &amp;gt; za)&lt;br /&gt;
	{return outer_gain * (direction - za) / (oa - za);}&lt;br /&gt;
  else {return 0.0;}&lt;br /&gt;
}&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Quoting GLSL code in the wiki is risky (it might change on the repository without warning), too detailed and misleading (generally people tend to expect copy/pastable examples).&lt;br /&gt;
&lt;br /&gt;
If more explanation is required, either link to the shader code on the repository or make an illustration please.&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Talk:ALS_technical_notes&amp;diff=115733</id>
		<title>Talk:ALS technical notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Talk:ALS_technical_notes&amp;diff=115733"/>
		<updated>2018-08-03T06:21:21Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Article name */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ALS vs. Rembrandt ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |Rembrandt and ALS work with two different rendering pipelines/implementations using very different assumptions - thus, it would be a lot of work to integrate those two properly, and as has been said, Rembrandt isn't beint actively maintained currently, while ALS has been under active development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Several contributors familiar with shaders and effects have stated that they're not overly motivated to pick up Rembrandt maintenance mainly due to its performance issues, which cannot be just improved by doing  base package development (effects/shaders), so that people wanting to improve Rembrandt performance would need to modify the corresponding C++ code. People familiar with FlightGear's rendering pipeline are in very short supply. Unfortunately, FlightGear's rendering pipeline is generally also not very well documented.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=217688#p217688&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Why in Rembrandt, can not be activated Atmospheric light&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Tue Sep 02&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |For my visual preferences and on my system ALS is a much better use of what rendering resources there are than Rembrandt and the view out the windows is superior to that of the default scheme.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221079#p221079&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;AndersG&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sat Oct 18&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  | the reason we still havent moved to opengl 3.x+ has been due to supporting OSX.  If we wish to support OSX, we need to completely abandon the fixed function pipeline.  Some of our dependencies (plib) are no longer maintained , so must be replaced with something that supports shaders (canvas, etc).  &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Apple has made app developers to move on or stay in fixed fn.  We aren't there yet.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Almost every feature in fg needs a maintainer.  Maybe someone who especially loves deferred rendering will step up, and begin migrating Thorsten's als shaders to rembrandt.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221132#p221132&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;psadro_gm&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sat Oct 18&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |the other issue is that there's still legacy GL code running in the main/rendering loop that prevents us from using a more recent OpenGL version, such as the panel/HUD and GUI code - those things are in the process of being unified, and re-implemented, on top of modern OSG code using a shared back-end via Canvas.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221133#p221133&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sat Oct 18&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |you never actually transit from a deferred to a forward scheme, which is why you don't have the same baseline internally, which is why you need to structure operations you do very differently and can in general expect a very different performance footprint.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=221222#p221222&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sun Oct 19&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |But the point is - I do understand what the shaders outside ALS do, and I could fix them and/or develop them further if needed. And, given a few weeks to iron out the details, I could also make ALS work under Rembrandt.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=204372#p204372&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: A long shot&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Thu Mar 27&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |The actual reason why this isn't happening is twofold:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
First, as I said, you can spend performance only once. For my default settings of random vegetation and buildings and clouds, I'm getting 15 fps out of Rembrandt as it is once I want nice shadows (i.e. apply sufficient filtering that I don't get a headache watching them) vs. 60 fps in ALS at highest quality settings. ALS would require to squeeze another 1000 lines of code into the fragment shader, i.e. make it perhaps 5 times longer than it it (on average). That's on a modern gaming laptop. So who's expected to be able to run Rembrandt + ALS with anything above 5 fps? I don't see it on my machine. And of course, assume I do it - guess at whose feet complaints about low framerate end up? Guess who gets told by every amateur GLSL coder that he's stupid because 'there must be a faster way'?&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Second, there seems to be something religious about Rembrandt. I've always gotten help and good advice from FredB for whatever I was trying to do, but there's a very outspoken and agressive community of Rembrandt-users which pass no opportunity to tell me that what I do is crap, rubbish and that Rembrandt is the best and I should better quit what I'm doing because it's so inferior. Maybe so - but I sure won't lift a finger for anything these people want to see done. If anyone wants ALS under Rembrandt, insulting me is a sure way to not get it done.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=204372#p204372&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: A long shot&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Thu Mar 27&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |You could in fact take lots of the procedural texturing code and it would run - it's even easy, since I factored the noise functions into libraries which can be included.  As to why Rembrandt doesn't do that, it's a question for the Rembrandt maintainers, not for me. I have offered 3 or 4 times to assist if anyone wants to port these code blocks on the devel list.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
So, the mysterious reason is: the Rembrandt maintainers are not interested. That's all.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=220985#p220985&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Fri Oct 17&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |I tend to use/support what works for me well enough (including performance), as well as features that are either sufficiently generic and extensible or at least well-documented with some manpower - for the time being, none of this applies to Rembrandt unfortunately. I consider myself fairly familiar with FG, including its internals - and I am generally able to make FG work well enough on most systems - in fact, I am the one who started the corresponding wiki articles to document such tips - I have yet to see sufficient &amp;quot;configuration advice&amp;quot; from Rembrandt evangelists.&amp;lt;br/&amp;gt;&lt;br /&gt;
I would also very much like to see Rembrandt development to continue, and I might even contribute to such an effort - but for that to happen, a few other things need to happen first, including more/better developer docs - Rembrandt is covering a lot of uncharted waters, i.e. areas in FG to which only long-time contributors like Fred, Tim or Mathias have contributed.&amp;lt;br/&amp;gt;&lt;br /&gt;
Given Thorsten's recent C++ patches to the rendering pipeline, he seems to be well on his way to actually understand/document such code paths than any other active contributor.&amp;lt;br/&amp;gt;&lt;br /&gt;
Personally, I am frankly easily distracted by stuff that I find more interesting than investigating Rembrandt's performance issues, and I don't consider shadows essential either - but Rembrandt development will either need to be picked up by Fred himself, or we'll inevitably have to do a lot of research, trial &amp;amp;amp; error and documenting to make heads and tails of the code.&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=220987#p220987&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Orbital Makes the Sky Black&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Fri Oct 17&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do we actually have to have the ALS vs. Rembrandt philosophy here? I'm trying to create a technical documentation page which should be concise and to the point, I can't see how the assortment of things I have said about ALS and Rembrandt features here.&lt;br /&gt;
&lt;br /&gt;
: it's your article, so feel free to remove whatever you disagree with - that said, your quotes may still be useful elsewhere, especially because the whole Rembrandt vs. ALS debate is a recurring one, so maybe some kind of FAQ ? I don't know ... I just added some of your quotes here to ensure that people can refer to those arguments, without having to resurrect these debates on the forum over and over again. If you think there is a better way to accomplish that, it's your call. --[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 06:29, 11 March 2015 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Surfaces ==&lt;br /&gt;
&lt;br /&gt;
There is internally no 'ALS' or 'Rembrandt' in the effect framework. We assign effects to surfaces. These effects have techniques which depend on conditionals (predicates), always the first matching technique of an effect is used. It is at the level of these conditionals that we decide upon ALS or Rembrandt.&lt;br /&gt;
&lt;br /&gt;
This is not a must - it would be easy to write an effect which only runs ALS, even if Rembrandt is on. Just leave the conditional out of the technique.&lt;br /&gt;
&lt;br /&gt;
The opposite is pretty much what happens if you assign model-transparent to a surface. This is an effect which has just a single technique (a fixed pipeline setup). Which means that you get transparency rendered okayish, no depth buffer written and outside- in rendering of a depth ordered bin - but at the same time, this technique wrecks ALS light and fog - at night at high altitude the glass will glow faintly red (because that's the light setting of the default renderer) and you will see it through fog no matter the distance. &lt;br /&gt;
&lt;br /&gt;
Now, an unassigned surface uses the general-purpose model-default.eff. This has depth buffer writing and no outside-in rendering and does not use a depth sorted bin - so it may have issues for transparent surfaces. But this has a proper sequence of conditionals and will run ALS when ALS is selected and Rembrandt when Rembrandt is selected, i.e. always get lighting and fogging right. &lt;br /&gt;
&lt;br /&gt;
The glass effect eventually will be one way to render glass in ALS (intended for windows seen from inside). It has correct lighting and fogging, and it will soon use the depth sorted bin and do all the other transparent stuff - and automatically dispatch the surface to the same fixed-pipeline technique Rembrandt uses in model-transparent when Rembrandt is running[http://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=25456&amp;amp;p=235772#p235760].&lt;br /&gt;
&lt;br /&gt;
== Article name ==&lt;br /&gt;
&lt;br /&gt;
Looking over the page, this article seems to be devoted to describing effects based on ALS used on aircraft, while the title suggests that it describes the technical processes and details of the &amp;quot;works&amp;quot; of ALS itself. As such, would a title such as &amp;quot;ALS Aircraft Effects,&amp;quot; &amp;quot;ALS effects&amp;quot; or &amp;quot;ALS aircraft information&amp;quot; be more appropriate?&lt;br /&gt;
[[User:Adam|Adam (else MIG29pilot)]] ([[User talk:Adam|talk]]) 16:22, 1 January 2016 (EST)&lt;br /&gt;
&lt;br /&gt;
== GLSL code quoted ==&lt;br /&gt;
&lt;br /&gt;
/* Fading of a directional light */ &lt;br /&gt;
&lt;br /&gt;
Note: To better explain the relation of the variables inner_angle, outer_angle and zero angle, this is the algorithm that produces the scalar value directional_fade from which the intensity value is defined in the shaders file light-ALS.frag: &lt;br /&gt;
float directional_fade (in float direction) {&lt;br /&gt;
  float arg = clamp(direction, 0.0, 1.0);&lt;br /&gt;
  float ia = (1.0 - inner_angle);&lt;br /&gt;
  float oa = (1.0 - outer_angle);&lt;br /&gt;
  float za = (1.0 - zero_angle);&lt;br /&gt;
  if (direction &amp;gt; ia) {return 1.0;}&lt;br /&gt;
  else if (direction &amp;gt; oa) &lt;br /&gt;
	{return outer_gain + (1.0-outer_gain) * (direction - oa) / (ia - oa);}&lt;br /&gt;
  else if (direction &amp;gt; za)&lt;br /&gt;
	{return outer_gain * (direction - za) / (oa - za);}&lt;br /&gt;
  else {return 0.0;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Quoting GLSL code in the wiki is risky (it might change on the repository without warning), too detailed and misleading (generally people tend to expect copy/pastable examples).&lt;br /&gt;
&lt;br /&gt;
If more explanation is required, either link to the shader code on the repository or make an illustration please.&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=115732</id>
		<title>ALS technical notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=ALS_technical_notes&amp;diff=115732"/>
		<updated>2018-08-03T06:18:06Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: Quoting GLSL shader code in the Wiki is too detailed (and misleading, generally people expect copy/pastable examples).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Quality level mapping ==&lt;br /&gt;
The rendering quality of ALS effects is controlled by two main sliders, the landmass effects and transition effects. The transition effects slider regulates the quality of overlaid textured, while the landmass effects slider regulates all other aspects of procedural texturing, such as pixel color post-processing (dust, snow or wet terrain effects) and apparent terrain roughness (bump and parallax mapping).&lt;br /&gt;
&lt;br /&gt;
In addition, specific effects for certain terrain types (water, urban, forest, agriculture, etc.) and models in the scene can be switched on separately. In some cases, this may be needed for a consistent visual impression. For example, if a dust effect is used on the terrain, the water needs to be rendered using a separate water shader, otherwise it will appear dusty as well. Likewise, if the Rayleigh haze is used in the highest quality terrain effect, then the highest quality water effect needs to be used to see the same Rayleigh scattering effect on the water.&lt;br /&gt;
&lt;br /&gt;
For technical reasons (landmass and transition control the same shader code) the settings are sometimes mutually dependent, e.g., if the transition quality is set to level 6, it won't have any effect until the landmass quality is also set to level 6.&lt;br /&gt;
&lt;br /&gt;
=== Transition ===&lt;br /&gt;
The mapping of quality to visuals of the transition slider is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| Base texture scheme&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| Alternative hires airport keep effect&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
|&lt;br /&gt;
* Base and overlay texture, runway effect (if landmass is above level 4)&lt;br /&gt;
* Secondary lights on runway and airport keep&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| Base, overlay and hires texture&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Base, overlay, hires, detail, grain, dot and rock texture (if landmass is level 6)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Landmass ===&lt;br /&gt;
{{Note|Quality levels 1 and 2 are reserved to represent fixed pipeline rendering and the &amp;quot;default renderer&amp;quot; in an eventually merged rendering GUI. However, ALS is currently switched on per checkbox and not by quality level, and so they do not have a function.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Comments&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 1&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 2&lt;br /&gt;
| ''See note above''&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 3&lt;br /&gt;
| ALS-rendered position-differential haze and light, moonlight&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 4&lt;br /&gt;
| &lt;br /&gt;
* Procedural snow cover on terrain&lt;br /&gt;
* Procedural dust and vegetation effects&lt;br /&gt;
* Wet terrain effect with approximate reflection half vector&lt;br /&gt;
* Patchy fog distribution&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 5&lt;br /&gt;
| Noise bump-mapping and parallax mapping of terrain&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | 6&lt;br /&gt;
| (''Requires transition effect level 6'')&lt;br /&gt;
* Wet terrain effect with correct reflection half vector&lt;br /&gt;
* Hires bump mapping and snow patchiness&lt;br /&gt;
* Variable upper haze layer surface&lt;br /&gt;
* Rayleigh haze&lt;br /&gt;
* Secondary lights on all terrain types&lt;br /&gt;
* Slope line and strata effects&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ALS secondary lights ==&lt;br /&gt;
The ALS framework supports a generic implementation of landing lights and a searchlight which are based on a framerate-friendly computation in screen coordinates, i.e., the lights project correctly ''only if the light is close to the viewer'' (typically, that would be from cockpit view). In other words, this is not a full (and rather expensive) computation of light volumes as in Rembrandt, but a much faster test of illuminated screen areas.&lt;br /&gt;
&lt;br /&gt;
[[File:Landing light03.jpg|400px|Cessna 172P using generic ALS landing lights]]&lt;br /&gt;
&lt;br /&gt;
Two landing lights and a searchlight are supported. The landing lights have a fixed position with respect to the aircraft axis (technically, with respect to the default view axis as defined in the respective view), whereas the searchlight follows any offset of the view axis in view mode, i.e., when using the mouse to look around, the searchlight will follow the motion, the landing lights will not. The lights require ALS to run above basic quality level and work on runway and airport keep above transition setting 3 and everywhere else only at highest quality setting. All lights are controlled via properties in &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The names of the properties should be self-explanatory, if for instance if &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/use-searchlight&amp;lt;/code&amp;gt; is set to true, then the searchlight (which always follows the current view axis) is used. &lt;br /&gt;
&lt;br /&gt;
The properties &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light1-offset-deg&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light2-offset-deg&amp;lt;/code&amp;gt; allow to specify angular offsets for the landing light which are then not centered on the view axis. This can be used to simulate one or two landing lights set in the wings.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv2.jpg|400px|Secondary lights vertical offset demo]]&lt;br /&gt;
&lt;br /&gt;
A third offset &amp;lt;code&amp;gt;/sim/rendering/als-secondary-lights/landing-light3-offset-deg&amp;lt;/code&amp;gt; is available which allows for a vertical offset. This is especially useful for tail dagger aircraft.&lt;br /&gt;
&lt;br /&gt;
[[File:Offsetv.jpg|400px|Secondary lights vertical offset settings]]&lt;br /&gt;
&lt;br /&gt;
The lights can be switched on and off from the [[Property Browser]] for any aircraft without any modifications to the aircraft definition. Implementing them correctly aircraft side thus just involves linking the landing light switches to the ALS control properties and setting the correct angular offsets. Additionally, it is recommended to switch the lights off unless in a cockpit view, as they don't project correctly for any external view.&lt;br /&gt;
&lt;br /&gt;
Range, color, light cone opening angle or intensity of the lights can currently not be configured, and there are no plans to support such a feature in the near future.&lt;br /&gt;
&lt;br /&gt;
All three lights will illuminate fog (if dense enough) and precipitation.&lt;br /&gt;
&lt;br /&gt;
[[File:Als secondary light fog.jpg|400px|ALS generic lights illuminating dense fog]]&lt;br /&gt;
&lt;br /&gt;
== ALS specific features of the model effect ==&lt;br /&gt;
&lt;br /&gt;
In addition to the features supported by the model-combined-deferred effect in all three renderers (normal, light, specular, environment reflection and dirt map), ALS also supports a couple of unique effects (which, if configured, will not have any effect in other renderers.&lt;br /&gt;
&lt;br /&gt;
=== The grain texture  ===&lt;br /&gt;
&lt;br /&gt;
ALS supports a grain texture for models. This is a semi-transparent overlay texture that works just as [[Procedural Texturing#The grain texture|its equivalent for terrain texturing]] and provides the option of generating centimeter-scale details such as rust or discoloration on a surface without having to use huge textures. An example of a surface rendered with grain texture is the image of the USS Vinson flightdeck below:&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain01.jpg|700px|Grain and rain effects on Vinson's flightdeck]]&lt;br /&gt;
&lt;br /&gt;
This is done using the following effect declaration inheriting from '''model-combined-deferred.eff''' as&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt;flightdeck&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;inherits-from&amp;gt;Effects/model-combined-deferred&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
  &amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;image&amp;gt;Models/Geometry/Nimitz/rust_texture.png&amp;lt;/image&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt; &lt;br /&gt;
    &amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
    &amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
    &amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
  &amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The grain texture has the number 7 and needs to be enabled by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the value is set to 1, the grain texture uses the uv-mapping of the underlying surface. If that is very irregular (as in the case of the Vinson flightdeck), alternatively the grain can be mapped in xy-model coordinates if the parameter is set to 2, the uv-mapping of the base texture layer is then discarded.&lt;br /&gt;
&lt;br /&gt;
The resolution of the grain texture with respect to the base coordinate layer is specified by&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the number is less than 0, the grain resolution is lower than the base layer. If the parameter is greater than 0, it is higher (note that in the above case, the grain is mapped to (xy) rather than (uv), hence the base size is 1 m, so the grain texture is mapped on a 10x10 m patch on the flightdeck, for which a 1024x1024 pixel texture provides ~1 cm sized details).&lt;br /&gt;
&lt;br /&gt;
=== The rain effect ===&lt;br /&gt;
&lt;br /&gt;
Any number greater than 0 passed to&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;rain-enabled type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/rain-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
enables the splash effect of raindrops on the surface if it points upward. The surface does not have to be flat for this to work, the effect checks for the surface normal automatically, see the rain enabled for the Citation Bravo.&lt;br /&gt;
&lt;br /&gt;
Thorsten noted about rain splashes: &amp;quot;Works fine here - runway needs to get really wet though before you see them (put the environment slider to max to achieve this quickly, it will take some waiting with just rain on).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Grain rain02.jpg|700px|Rain effect on the Citation Bravo]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Glossy surfaces ===&lt;br /&gt;
&lt;br /&gt;
To better treat the environment reflections on a glossy surface, ALS contains two options not present in the other renderers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-type type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/reflection-type&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter can currently be set to 1 or 2 and regulates how the color of the environment reflection is merged with the color of the glossy surface. If set to 1, the shader uses a color mixing as in the other two renderers, if set to 2 it uses a technique called 'grain merge' which gives different weight to the color channels. The reason for introducing type 2 was a grey tint which changed the reflected color in a unrealistic way. With FlightGear 2017.2.0 this will be fixed and  type set to 2 should be obsolete then.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;reflection-fresnel-factor type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/reflection-fresnel-factor&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter regulates how strong the Fresnel term of a glossy surface is. Many smooth surfaces reflect much more under shallow angles such that an environment reflection is not very prominent when looking under 90 degrees but dominates the visuals when looking under a grazing angle. The parameter sets the relative strength of a Fresnel reflection with respect to the basic reflection definition which is assumed to hold for vertical viewing (i.e. setting the parameter to 0.8 gives you extra glossiness under shallow angles).&lt;br /&gt;
&lt;br /&gt;
The following comparison shows the default color mixing (upper left) for a reflecting white livery and for grain merge (upper right). In addition, note the enhanced Fresnel reflectivity at the tail and the cowling on the pictures. The lower row shows (left) full reflection with default color mixing and (right) for grain merge. Default color mixing is more physically correct, while grain merge is less correct but preserves white color much better.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model default2.jpg|400px|Effect of color mixing in a reflection]]&lt;br /&gt;
[[File:Reflect Grain merge2.jpg|400px|Effect of grain merge in reflection]]&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect Model Default Full.jpg|400px|Full reflection with default ]]&lt;br /&gt;
[[File:Reflect Grain Merge Full.jpg|400px|Full reflection with grain merge]]&lt;br /&gt;
&lt;br /&gt;
== The exhaust flame effect ==&lt;br /&gt;
&lt;br /&gt;
Rendering proper flames of e.g. afterburners or rocket thrusters with diffuse edges is notoriously difficult - all solutions based on textured models tend to have unnaturally sharp edges. Usually the particle system is used in such cases, however at high velocities this has other issues - particles become easily separated, making flames look disrupted and detached from the exhaust.&lt;br /&gt;
&lt;br /&gt;
ALS includes a dedicated procedural effect in which the flame is rendered by numerically integrating a 3-dim distribution of glowing emitters inside a bounding box (i.e. re-creates the process by which a real flame would be seen). The function which determines the emitter distribution is partially user-controlled so that a wide range of shapes can be generated.&lt;br /&gt;
&lt;br /&gt;
To use the effect, first the bounding box has to be defined. Note that the shape and alignment of the bounding box needs to be standardized for the effect to work, i.e. you need to use either the default bounding box under Aircraft/Generic/Effects/Thruster/ or make a custom one which fits inside the default box at the same location in model coordinates.&lt;br /&gt;
&lt;br /&gt;
To change position, size and orientation of the bounding box to match with the airplane model, translate, scale and rotate animations or model offsets can later be used.&lt;br /&gt;
&lt;br /&gt;
=== Model definition for effect ===&lt;br /&gt;
This is a standard XML model definition that needs to specify the geometry, all animations and the effect to use. For the geometry you can use the standard ''Aircraft/Generic/Effects/Thruster/thrust_flame.ac'' or make your own. The F-15 uses a slightly different 3D model to allow for the nozzles. The 3D model needs to be big enough to contain the flame, bearing in mind that the flame is drawn as a cylinder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;path&amp;gt;Aircraft/Generic/Effects/Thruster/thrust_flame.ac&amp;lt;/path&amp;gt;&lt;br /&gt;
    &amp;lt;nopreview/&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;scale&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;property alias=&amp;quot;/params/augmentation-alight&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;x-min&amp;gt;0.2&amp;lt;/x-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-min&amp;gt;0.3&amp;lt;/y-min&amp;gt;&lt;br /&gt;
        &amp;lt;z-min&amp;gt;0.3&amp;lt;/z-min&amp;gt;&lt;br /&gt;
        &amp;lt;y-max&amp;gt;1&amp;lt;/y-max&amp;gt;&lt;br /&gt;
        &amp;lt;z-max&amp;gt;1&amp;lt;/z-max&amp;gt;&lt;br /&gt;
        &amp;lt;x-factor&amp;gt;0.472&amp;lt;/x-factor&amp;gt;&lt;br /&gt;
        &amp;lt;y-factor&amp;gt;0.6&amp;lt;/y-factor&amp;gt;&lt;br /&gt;
        &amp;lt;z-factor&amp;gt;0.6&amp;lt;/z-factor&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- on the F-15 we have a property available that controls the ignition of the afterburner. If you do not wish to implement this&lt;br /&gt;
         remove the following animation tag --&amp;gt;&lt;br /&gt;
    &amp;lt;animation&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
        &amp;lt;condition&amp;gt;&lt;br /&gt;
            &amp;lt;greater-than&amp;gt;&lt;br /&gt;
                &amp;lt;property alias=&amp;quot;/params/augmentation-ignition&amp;quot;/&amp;gt;&lt;br /&gt;
                &amp;lt;value&amp;gt;0.8&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/greater-than&amp;gt;&lt;br /&gt;
        &amp;lt;/condition&amp;gt;&lt;br /&gt;
    &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Aircraft/MyAircraft/Models/Effects/my-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;Bounding_box&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''my-flame.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control how the flame looks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;AB-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
        &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
        &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;0.85&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.07&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.15&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
        &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.35&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
        &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
        &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
        &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;&lt;br /&gt;
        &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
        &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
        &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a detailed version (utilizing 3d noise and a higher sampling resolution) available. This has to be explicitly requested in a derived effect by overriding the default shader choice with the detailed version, i.e. bu inserting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;technique n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;pass&amp;gt;&lt;br /&gt;
     &amp;lt;program&amp;gt;&lt;br /&gt;
         &amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/thrustflame-ALS-detailed.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
     &amp;lt;/program&amp;gt;&lt;br /&gt;
  &amp;lt;/pass&amp;gt;&lt;br /&gt;
  &amp;lt;/technique&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
below the parameter section.&lt;br /&gt;
&lt;br /&gt;
{{Note|The detailed shader uses four times as much performance at least - only use it if you really need it!}}&lt;br /&gt;
&lt;br /&gt;
=== F-15 Afterburner example image === &lt;br /&gt;
The F-15 afterburner flame shown below (at different ambient lighting based on time) uses the parameters above. The main parameters of importance, and therefore to tune, for an aircraft jet engine are the colors, the two densities, the flame radius fraction. The base density is at the start of the flame and this. The F-15 overlays a billboarded image to achieve the diamonds that are interleaved with the ALS drawn flame. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:F-15 afterburner using ALS Thrust Effect.jpg|700px|This shows the F-15 afterburner at different ambient light.]]&lt;br /&gt;
&lt;br /&gt;
The meaning of the parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_shocks&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; and &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use_noise&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; are the parameters that control the random noise and the shock diamonds. Both are modestly computationally expensive, i.e. if these effects are not required it is better to switch them off by setting these values to zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(same for the (g,b) channels) set the color. base_flame refers to the part of the flame which is directly attached to the thruster and usually brightest. flame_color_high refers to the high density part of the flame, flame_color_low refers to the low density parts of the flame. (rgb) values always need to be [0:1]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
   &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determine the overall emitter density in the flame and in the base directly at the thruster respectively. There's no formal upper limit for the parameters, but a flame with density 1 already appears fairly opaque.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
governs how much of the bounding box the flame radius at the exhaust nozzle fills. If the flame needs to expand (as for the plume of a thruster operating in vacuum) or needs to bend (as for a flame deflected by the airstream) this parameter needs to be small, if the flame is essentially cylindrical the paramater can be chosen close to 1 to minimize clipping errors. Note that this determines the size of the flame relative to the bounding box - the overall size of the flame should be adjusted by using a scale animation on the bounding box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
determined how turbulent the flame looks. noise_strength [0:1] determines how prominently the noise influences the flame and noise_scale (in meters relative to the original bounding box) determines how large the visible patches of turbulence are (given that the original bounding box is not larger than 5 m in the longest direction, the parameter should probably kept between 0.1 and 5).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
influences at what distance shock diamonds appear in the flame. Useful values are perhaps between 0.2 and 5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should take a value of between 0 and 1 and determines how collimated the flame is. For values &amp;gt; 0, the flame is widened - note that this requires a sufficiently small flame radius fraction to avoid clipping errors. For widened flames, the density is automatically lowered and shock diamonds are removed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;0.&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be somewhere between 0 and 0.06 and gives a lateral deflection (such as by an airstream) to the flame. Note that this re-positions the origin of the flame in the bounding box to better utilize the bounding box volume, i.e. if you need a dynamical deflection, you also need a translate animation for the bounding box.&lt;br /&gt;
&lt;br /&gt;
Any of those parameters can be adjusted runtime  by replacing the value with &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;use&amp;gt;/my-property&amp;lt;/use&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;. Dependent on how &amp;lt;code&amp;gt;/my-property&amp;lt;/code&amp;gt; is created it might be tied though (in particular JSBSim-computed properties are) in which case it is not picked up by the effect framework - you need to copy it via property rule to an untied property then. This allows to render dynamical changes of the flame.&lt;br /&gt;
&lt;br /&gt;
For instance the [[SpaceShuttle - Project Overview|Space Shuttle]] main engines use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;ssme-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r&amp;gt;0.9&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g&amp;gt;0.7&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b&amp;gt;0.5&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r&amp;gt;0.7&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g&amp;gt;0.7&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_r type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/base_flame_r&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_g&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-collimation&amp;lt;/use&amp;gt;&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density&amp;gt;&amp;lt;use&amp;gt;/sim/systems/various/ssme-flame-density&amp;lt;/use&amp;gt;&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;shock_frequency&amp;gt;1.0&amp;lt;/shock_frequency&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength&amp;gt;0.3&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale&amp;gt;0.1&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to simulate the change of flame geometry in the thin upper atmosphere during ascent:&lt;br /&gt;
&lt;br /&gt;
[[File:Shuttle flame05.jpg|400px|Space Shuttle main engine flames during early ascent]]&lt;br /&gt;
[[File:Shuttle flame06.jpg|400px|Space Shuttle main engine flames during late ascent]]&lt;br /&gt;
&lt;br /&gt;
Using the deflection parameter, the curved SRB separation motor flames are rendered using&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;SRBsep-flame&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/thrust-flame&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_r type=&amp;quot;float&amp;quot;&amp;gt;0.95&amp;lt;/flame_color_low_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_g type=&amp;quot;float&amp;quot;&amp;gt;0.55&amp;lt;/flame_color_low_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_low_b type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_color_low_b&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_r&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_g&amp;gt;&lt;br /&gt;
    &amp;lt;flame_color_high_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/flame_color_high_b&amp;gt;&lt;br /&gt;
    &amp;lt;use_shocks type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/use_shocks&amp;gt;&lt;br /&gt;
    &amp;lt;use_noise type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use_noise&amp;gt;&lt;br /&gt;
    &amp;lt;thrust_collimation type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/thrust_collimation&amp;gt;   &lt;br /&gt;
    &amp;lt;thrust_density type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/thrust_density&amp;gt;&lt;br /&gt;
    &amp;lt;base_flame_density type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/base_flame_density&amp;gt;&lt;br /&gt;
    &amp;lt;noise_strength type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/noise_strength&amp;gt;&lt;br /&gt;
    &amp;lt;noise_scale type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/noise_scale&amp;gt;&lt;br /&gt;
    &amp;lt;deflection_coeff type=&amp;quot;float&amp;quot;&amp;gt;-0.06&amp;lt;/deflection_coeff&amp;gt;&lt;br /&gt;
    &amp;lt;flame_radius_fraction type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/flame_radius_fraction&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flame_sep.jpg|700px|Space Shuttle SRB separation motor flames]]&lt;br /&gt;
&lt;br /&gt;
Application of the effect is not limited to flames, it can also do heat blur (think a very transparent, high-noise dark emitter distribution) or vapour trails and other smoke.&lt;br /&gt;
&lt;br /&gt;
By itself, the effect does however not compute ambient and diffuse light channels, i.e. for non-emissive distributions lighting is the responsibility of the user. One quick way of obtaining a correct fading of color with light in the scene is to create an untied property based on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/rendering/scene/diffuse/red&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and used this to scale all color values.&lt;br /&gt;
&lt;br /&gt;
{{note|Do not use the full (rgb) information in the property tree for ALS, it will produce pronounced color mismatches with the rest of the scene as ALS determines light inside the shader and never uses the properties.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rotor wash ==&lt;br /&gt;
&lt;br /&gt;
ALS provides an interface to render rotor wash on various terrain types - currently this is implemented for the volumetric grass as well as procedural water. This interface needs to be written aircraft-side for the effect to be rendered.&lt;br /&gt;
&lt;br /&gt;
[[File:Rotor wash.jpg|600px|Rotor wash rendered on volumetric grass]]&lt;br /&gt;
&lt;br /&gt;
Aircraft maintainers need to set three parameters in &amp;lt;b&amp;gt;/environment/aircraft-effects/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The position of the downwash column needs to be specified in &amp;lt;i&amp;gt;eye-relative&amp;lt;/i&amp;gt; coordinates by setting &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-x&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-y&amp;lt;/b&amp;gt;. If these are zero, the air column is assumed to be right underneath the eye point, any non-zero values displace the center northward or eastward from the eye point. To work in external views, the displacement needs to be computed by e.g. a Nasal script or property rules, the same is true if the rotor is not close to the eye point.&lt;br /&gt;
&lt;br /&gt;
The strength of the downwash column &amp;lt;i&amp;gt;on the ground&amp;lt;/i&amp;gt; is set by &amp;lt;b&amp;gt;/environment/aircraft-effects/wash-strength&amp;lt;/b&amp;gt;. The parameter influences both the radius in which the effect is visible as well as the overall strength (up to a maximum). Aircraft maintainers need to adjust strength based on parameters like altitude AGL, rotor RPM, rotor radius and whatever else might influence the downwash.&lt;br /&gt;
&lt;br /&gt;
== Chute animation effect ==&lt;br /&gt;
&lt;br /&gt;
The chute animation effect is designed to provide a natural appearance of the deformation and the fluttering motion of a piece of cloth under changing stress.&lt;br /&gt;
&lt;br /&gt;
[[File:Chute seq01.jpg|400px|Drag chute separation sequence 1]] [[File:Chute seq03.jpg|400px|Drag chute separation sequence 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coordinate system ===&lt;br /&gt;
&lt;br /&gt;
The shader assumes that the 3d mesh of the chute is oriented in a particular coordinate system. The z-axis (upward) should extend from the zero point where the various ropes come together to the canopy above through the center of the model. The canopy of the chute should therefore roughly be in the xy plane.&lt;br /&gt;
&lt;br /&gt;
To position the chute correctly with the aircraft, you then need to use appropriate offsets and rotations when loading.&lt;br /&gt;
&lt;br /&gt;
=== Effect definition for model ===&lt;br /&gt;
&lt;br /&gt;
To define the effect to apply to the model (as referenced in the ''effect'' section in the model XML) you need to create ''mychute.eff'' as below. The ''.eff'' file defines the parameters that are passed into the shader and it is these that control the behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;mychute&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/chute&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
	&amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	&amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The meaning of these parameters is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;chute_projection_z&amp;gt;0.0&amp;lt;/chute_projection_z&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the distance of the branching point of the various lines leading to the canopy (at model coordinate zero) to the edge of the canopy. All transformations affecting the shape of the canopy (in particular the collapse of the canopy if the force is gone) will be applied with respect to this reference plane.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_force&amp;gt;&amp;lt;use&amp;gt;Aircraft/MyAircraft/myforce&amp;lt;/use&amp;gt;&amp;lt;/chute_force&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a normalized force applied to the canopy. The chute should be modeled with a deformation corresponding to a force parameter of 1 - any higher value will narrow the chute's radius, deepen the chute's deformation along the z-axis and increase the motion, any lower value will widen chute radius (compare screenshots above) and lessen its depth and slow down motion. The normal parameter range should be from [0:2], any higher or lower may look odd.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;chute_fold&amp;gt;0.0&amp;lt;/chute_fold&amp;gt;&lt;br /&gt;
	 &amp;lt;chute_bend&amp;gt;0.0&amp;lt;/chute_bend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are deformation modes used to animate a chute after jettison when it is no longer pulled into shape and can flutter through the air. The first one [0:1] is a general collapse into the projection plane with random deformations around, the second one [-1:1] is a gross bending mode of the projection plane itself. Before jettison, these parameters should default to 0.&lt;br /&gt;
&lt;br /&gt;
=== Jettison animation ===&lt;br /&gt;
&lt;br /&gt;
A complete animated jettison sequence is quite complex and would usually require a Nasal sequence taking the chute through a deceleration trajectory (utilizing translation and rotation animations), bending ad folding oscillations and finally some unfolding as it sinks through the air. The Space Shuttle chute uses the following control loop for 10 seconds of jettison dynamics:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var drag_chute_jettison_animation = func (time) {&lt;br /&gt;
&lt;br /&gt;
var dt = getprop(&amp;quot;/sim/time/delta-sec&amp;quot;);&lt;br /&gt;
time = time + dt;&lt;br /&gt;
&lt;br /&gt;
# horizontal motion&lt;br /&gt;
&lt;br /&gt;
var x = 0.0;&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 2.0)&lt;br /&gt;
	{x = -16.0 + 20.0 * time;}&lt;br /&gt;
else&lt;br /&gt;
	{x = 2.0 * time + 5.0 * time * time;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-dist&amp;quot;,x);&lt;br /&gt;
&lt;br /&gt;
# vertical motion&lt;br /&gt;
&lt;br /&gt;
var y = 0.0;&lt;br /&gt;
if (time &amp;gt; 5.0)&lt;br /&gt;
	{&lt;br /&gt;
	y = -2.5 + 0.6 * (time-5.0) * (time-5.0);&lt;br /&gt;
	}&lt;br /&gt;
else 	&lt;br /&gt;
	{&lt;br /&gt;
	y = -0.2 * time;&lt;br /&gt;
	}&lt;br /&gt;
if (y &amp;gt; 12.5) {y=12.5;}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-down&amp;quot;,y);&lt;br /&gt;
&lt;br /&gt;
# fold&lt;br /&gt;
&lt;br /&gt;
var f = 0.5 * time;&lt;br /&gt;
if (f&amp;gt; 1.0) {f = 1.0;}&lt;br /&gt;
if (time &amp;gt; 9.5)&lt;br /&gt;
	{f = 0.25 + 1.5 + (time-9.5);}&lt;br /&gt;
if (time &amp;gt; 6.0)&lt;br /&gt;
	{&lt;br /&gt;
 	f = f -0.3* (time-7.0); &lt;br /&gt;
	if (f&amp;lt;0.1) {f=0.1;}&lt;br /&gt;
	}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-fold&amp;quot;, f);&lt;br /&gt;
&lt;br /&gt;
# rotate&lt;br /&gt;
&lt;br /&gt;
var r = (time - 2.0) * 18.0;&lt;br /&gt;
if (r&amp;gt;90.0) {r=90.0;}&lt;br /&gt;
if (r&amp;lt;0.0) {r=0.0;}&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-slant&amp;quot;, r);&lt;br /&gt;
&lt;br /&gt;
# bend&lt;br /&gt;
&lt;br /&gt;
var b = 0;&lt;br /&gt;
if (time &amp;gt; 7.5)&lt;br /&gt;
	{b = 0;}&lt;br /&gt;
else if (time &amp;gt;6.0)&lt;br /&gt;
	{b = 0.75 - 0.5 * (time - 6.0);} &lt;br /&gt;
else if (time &amp;gt; 4.5) &lt;br /&gt;
	{b = (time - 4.5) * 0.5;}&lt;br /&gt;
else {b=0;}	&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/controls/shuttle/drag-chute-bend&amp;quot;, b);&lt;br /&gt;
&lt;br /&gt;
if (time &amp;gt; 10.0) &lt;br /&gt;
	{&lt;br /&gt;
	print(&amp;quot;Exiting...&amp;quot;);&lt;br /&gt;
	settimer (func { setprop(&amp;quot;/controls/shuttle/drag-chute-deploy-timer&amp;quot;, 0); }, 0.5);&lt;br /&gt;
	return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
setprop(&amp;quot;/test/timer&amp;quot;, time);&lt;br /&gt;
&lt;br /&gt;
settimer( func{ drag_chute_jettison_animation (time); }, 0);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS glass effect ==&lt;br /&gt;
&lt;br /&gt;
As of FlightGear version 3.5, ALS supports a glass effect with dynamic response to the environment which can render, for instance, the splashes of raindrops on the canopy, frost or fogging.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass01.jpg|400px|Frost effect]]&lt;br /&gt;
[[File:Glass07.jpg|400px|Raindrop splashes]]&lt;br /&gt;
&lt;br /&gt;
The base effect properties are controlled via inheritance and the environment response run-time via properties residing in &amp;lt;b&amp;gt;/environment/aircraft-effects&amp;lt;/b&amp;gt;. Derived effects should inherit from &amp;lt;b&amp;gt;Effects/glass&amp;lt;/b&amp;gt;. Any surface using the glass effect will automatically register itself as transparent for use in [[Project Rembrandt| Rembrandt]]. &lt;br /&gt;
&lt;br /&gt;
The glass effect is primarily intended for interior views. In particular, no external fog or haze is rendered for the glass, i.e. if the effect is used in an outside view, it is the responsibility of the aircraft modeler to take care (e.g. with LOD settings or range animations) that no problems in bad visibility occur.&lt;br /&gt;
&lt;br /&gt;
=== Why a separate effect for glass seen from inside? ===&lt;br /&gt;
&lt;br /&gt;
Basically because the two situations are rather different. Slight dirt on the glass against the background of the sky from inside is rather prominent, against the background of the cockpit seen from outside it is not. Visuals from inside are dominated by Mie forward scattering of light, leading to a bright glare effect when looking at dirt, frost, fog or scratches close to the sun. From outside, reflected light rather than transmitted light is dominant. The reflection of any external object on the outside of the glass changes as the aircraft moves, this is not the case for the reflection of the cockpit in the glass seen from the inside. &lt;br /&gt;
&lt;br /&gt;
The viewing situation is also different. From the inside, we usually do not focus the eyes on the plane of the glass but look through it, from the outside the focus of the eyes is often close to the glass surface. For something half a meter before the eye, we also need to apply a lot more resolution and details than for an object typically seen from 10+ meters from the outside.&lt;br /&gt;
&lt;br /&gt;
Add to this that atmospheric fog is never relevant for glass seen from inside but for glass seen from outside, and it suddenly makes sense to use a different effect.&lt;br /&gt;
&lt;br /&gt;
The recommended effect for glass surfaces seen from outside is model-combined-transparent.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rain ===&lt;br /&gt;
Rain splashes will render automatically when the weather system reports rain via environment/rain-norm. In addition, the user can set rain splashes to render via &amp;lt;code&amp;gt;environment/aircraft-effects/ground-splash-norm&amp;lt;/code&amp;gt; (this is intended to allow splashes to be rendered e.g., for water landings of aircraft equipped with floats).&lt;br /&gt;
&lt;br /&gt;
By default, the rain splashes impact from above (more precisely the +z direction in model coordinates). This may be inadequate if the aircraft is moving. However, the shader can not know what the airstream at the glass will be, so the impact vector of rain splashes has to be modeled aircraft-side and set via &amp;lt;code&amp;gt;environment/aircraft-effects/splash-vector-x&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;splash-vector-y&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;splash-vector-z&amp;lt;/code&amp;gt;). These are likewise in model coordinates.&lt;br /&gt;
&lt;br /&gt;
As long as the length of the splash vector is less than 1, just the impact angle will change, as the length of the vector increases to 2, droplets will also be visibly moving. This allows fine control of the visuals dependent on any number of factors desired. A simple Nasal snipped varying the splash vector with airspeed for the F-16 is given below (but ''do not mindlessly copy and expect to work for any aircraft — it won't!''). This example is for normals pointing outwards, if the normals are pointing inwards the vector needs to be inverted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var splash_vec_loop = func(){&lt;br /&gt;
    var airspeed = getprop(&amp;quot;/velocities/airspeed-kt&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    # f16&lt;br /&gt;
    var airspeed_max = 120;&lt;br /&gt;
&lt;br /&gt;
    if (airspeed &amp;gt; airspeed_max) {&lt;br /&gt;
        airspeed = airspeed_max;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    airspeed = math.sqrt(airspeed / airspeed_max);&lt;br /&gt;
&lt;br /&gt;
    var splash_x = -0.1 - 2 * airspeed;&lt;br /&gt;
    var splash_y = 0.0;&lt;br /&gt;
    var splash_z = 1.0 - 1.35 * airspeed;&lt;br /&gt;
&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-x&amp;quot;, splash_x);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-y&amp;quot;, splash_y);&lt;br /&gt;
    setprop(&amp;quot;/environment/aircraft-effects/splash-vector-z&amp;quot;, splash_z);&lt;br /&gt;
&lt;br /&gt;
    settimer(func(){&lt;br /&gt;
        splash_vec_loop();&lt;br /&gt;
    }, 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the timing constant of the loop — running the update per-frame leads to a spurious movement of the coordinate system in which rain is rendered and spoils the effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another method when using JSBSIM would be to use a combination of FCS Functions and Filters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                            &amp;lt;quotient&amp;gt;&lt;br /&gt;
                                &amp;lt;min&amp;gt;&lt;br /&gt;
                                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                                    &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                                &amp;lt;/min&amp;gt;&lt;br /&gt;
                                &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                            &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashX&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashx&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashY&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splashZ&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/splashz&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could reduce the above method and eliminate the &amp;quot;filters&amp;quot; by doing the following.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;system name=&amp;quot;c172p-glass-effects&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;channel name=&amp;quot;rain&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/airspeed-clamped-sqrt&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;  &lt;br /&gt;
                &amp;lt;sqrt&amp;gt;&lt;br /&gt;
                    &amp;lt;quotient&amp;gt;&lt;br /&gt;
                        &amp;lt;min&amp;gt;&lt;br /&gt;
                            &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                            &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;/min&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;40&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;/quotient&amp;gt;&lt;br /&gt;
                &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashx&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;-0.1&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashy&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
               &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
        &amp;lt;fcs_function name=&amp;quot;glass-effects/splashz&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;function&amp;gt;&lt;br /&gt;
                &amp;lt;difference&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
                    &amp;lt;product&amp;gt;&lt;br /&gt;
                        &amp;lt;value&amp;gt;1.35&amp;lt;/value&amp;gt;&lt;br /&gt;
                        &amp;lt;property&amp;gt;/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;/product&amp;gt;&lt;br /&gt;
                &amp;lt;/difference&amp;gt;&lt;br /&gt;
            &amp;lt;/function&amp;gt;&lt;br /&gt;
            &amp;lt;output&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/output&amp;gt;&lt;br /&gt;
        &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
    &amp;lt;/channel&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yet another method (currently used in the c172p) limits movement to a range of table entries. This gives the developer the ability to control the behavior even more.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xa&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.7  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -2.1  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-za&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   4 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;   5 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.17 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  50 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.35 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-xr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.33 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.3  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -1.9  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-zr&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;expression&amp;gt;&lt;br /&gt;
                &amp;lt;table&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/engines/active-engine/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;    0 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  600 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.82  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;  601 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;  0.127 &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                    &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; 1500 &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; -0.29  &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;0&lt;br /&gt;
            &amp;lt;/expression&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-x&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xa&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-xr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-x&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-y&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-y&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;splash-z&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;update-interval-secs type=&amp;quot;double&amp;quot;&amp;gt;0.1&amp;lt;/update-interval-secs&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;gain&amp;gt;1.0&amp;lt;/gain&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/greater-than-equals&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-za&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;&lt;br /&gt;
            &amp;lt;condition&amp;gt;&lt;br /&gt;
                &amp;lt;less-than&amp;gt;&lt;br /&gt;
                    &amp;lt;property&amp;gt;/velocities/airspeed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
                    &amp;lt;value&amp;gt;5&amp;lt;/value&amp;gt;&lt;br /&gt;
                &amp;lt;/less-than&amp;gt;&lt;br /&gt;
            &amp;lt;/condition&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-zr&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;&lt;br /&gt;
            &amp;lt;property&amp;gt;/environment/aircraft-effects/splash-vector-z&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Frost and fogging ===&lt;br /&gt;
&lt;br /&gt;
Frost on the canopy is rendered when environment/aircraft-effects/frost-level is set in the range from 0 to 1. Again, it is up to the aircraft developer to decide at what exterior conditions frosting should happen and whether the aircraft is equipped with heating to remove the frost again.&lt;br /&gt;
&lt;br /&gt;
Fogging is controlled by environment/aircraft-effects/fog-level in the range 0 to 1. Unless a mask is used, fogging is homogeneous across the whole surface (it is really intended to be used with a mask).&lt;br /&gt;
&lt;br /&gt;
=== Tint ===&lt;br /&gt;
&lt;br /&gt;
Tinted glass can be easily created by changing &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;glass-tint type=&amp;quot;vec4d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 1.0&amp;lt;/glass-tint&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to any value desired. This will affect all effects assumed outside of the glass layer (frost and rain splashes) but not fogging inside the glass. Use primarily for development and quick tests, don't misuse the alpha value available here, it has odd side effects.&lt;br /&gt;
&lt;br /&gt;
=== Functional masks ===&lt;br /&gt;
&lt;br /&gt;
If the glass surface is uv-mapped and textured, it is possible to switch on a mask functionality in the inheritance via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;image&amp;gt;my_mask.png&amp;lt;/image&amp;gt;&lt;br /&gt;
	&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
	&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
	&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
	&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;use-mask type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-mask&amp;gt;&lt;br /&gt;
&amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The red channel in my_mask.png controls the strength of fogging, full red corresponds to maximal fogging, no red to zero fogging. This allows to selectively model the position of heaters in the cockpit. Use &amp;lt;b&amp;gt;/environment/aircraft-effects/fog-level&amp;lt;/b&amp;gt; to adjust the actual amount of fog runtime.&lt;br /&gt;
&lt;br /&gt;
The green channel of my_mask.png is the amount of reduction of rain in an area. This is intended for airplanes equipped with windshield wipers to partially clear the wiped area of the rain. Whether the windshield wiper is actually on or not is controlled runtime via &amp;lt;b&amp;gt;/environent/aircraft-effects/use-wipers&amp;lt;/b&amp;gt; (1 sets wipers to on).&lt;br /&gt;
&lt;br /&gt;
The blue channel of my_mask.png is reserved for an overlay pattern which will be drawn in an optionally specified &amp;lt;overlay-color&amp;gt; vector (white in the example xml above) - the primary function is to render damage on the glass, but with a different color, also dirt or an alternative more finely controlled frost pattern can be used. The strength of the pattern can be adjusted runtime via &amp;lt;b&amp;gt;/environment/aircraft-effects/overlay-alpha&amp;lt;/b&amp;gt;, allowing dynamical accumulation of dirt or sudden appearance of damage.&lt;br /&gt;
&lt;br /&gt;
Examples for the result of a fog mask and a damage mask are shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Glass12.jpg|400px|Crack pattern using a damage mask]]&lt;br /&gt;
[[File:Glass11.jpg|400px|Partial fogging using a mask texture]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note that by default all the runtime switches for the mask are off / set to zero! Remember to to switch them on when testing the effect!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mie scattering ===&lt;br /&gt;
&lt;br /&gt;
Most glass effects show prominent Mie forward scattering as in reality, i.e. frost patterns or fogging will appear much more prominent when looking almost towards the sun than under any other angle. While the frost pattern is normally not very prominent and one is able to look through unhindered, this changes substantially when looking into the sun, at which point it almost obscures the view.&lt;br /&gt;
&lt;br /&gt;
[[File:Glass08.jpg|400px|Mie scattering of low light on frost]]&lt;br /&gt;
[[File:Glass13.jpg|400px|Morning sun Mie scattering on fog]]&lt;br /&gt;
&lt;br /&gt;
For frost and fog, the strength of the effect is set automatically, but for the damage/dirt layer it is under user control at effect design time. Changing the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;overlay-glare type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/overlay-glare&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from its default value allows to adjust the strength of the glare when looking through the overlay layer close to the sun.&lt;br /&gt;
&lt;br /&gt;
=== Internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
There is support for a reflection of the cockpit interior.&lt;br /&gt;
&lt;br /&gt;
[[File:Reflect.jpg|640px|Internal glass cube map reflection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This needs to be provided as a cubemap specific for the airplane and switched on via the flag &amp;lt;use-reflection&amp;gt; set to 1. The relative strength of the reflection can be optionally via &amp;lt;reflection-strength&amp;gt;. The strength of the reflection in the cockpit is dynamically adjusted for a number of factors, among them balance of direct to indirect light, the approximate amount of light falling on the surface seen in the reflection and the amount of direct sunlight falling into the eye.&lt;br /&gt;
&lt;br /&gt;
If the six cubemap faces are called my_cube_map_??.png, then using an effect file called c172p-reflect.eff the inheritance looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-reflect&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/glass&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;images&amp;gt;&lt;br /&gt;
        &amp;lt;positive-x&amp;gt;my_cube_map_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
        &amp;lt;negative-x&amp;gt;my_cube_map_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
        &amp;lt;positive-y&amp;gt;my_cube_map_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
        &amp;lt;negative-y&amp;gt;my_cube_map_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
        &amp;lt;positive-z&amp;gt;my_cube_map_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
        &amp;lt;negative-z&amp;gt;my_cube_map_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
        &amp;lt;/images&amp;gt;&lt;br /&gt;
    &amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;use-reflection type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection&amp;gt;&lt;br /&gt;
    &amp;lt;reflection-strength type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/reflection-strength&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The inheritance call includes all surface objects that use the effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-reflect&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;glas&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;rightwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;leftwindow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See below (Interior shading), for details on cube_map creation and orientation.&lt;br /&gt;
&lt;br /&gt;
=== Lightmaps for internal cockpit reflection ===&lt;br /&gt;
&lt;br /&gt;
If the cockpit is illuminated at night, the reflection map will not show this change by default. However,the glass effect supports a lightmap for the reflection, which can be used in parallel with the lightmap for the panels to show the reflection of a lit panel at night.&lt;br /&gt;
&lt;br /&gt;
Since the reflection map is a cube map, the lightmap for it has to be as well, the syntax is hence&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use-reflection-lightmap type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/use-reflection-lightmap&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
     &amp;lt;images&amp;gt;&lt;br /&gt;
          &amp;lt;positive-x&amp;gt;Models/Effects/interior/reflection/light-px.png&amp;lt;/positive-x&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-x&amp;gt;Models/Effects/interior/reflection/light-nx.png&amp;lt;/negative-x&amp;gt;   &lt;br /&gt;
          &amp;lt;positive-y&amp;gt;Models/Effects/interior/reflection/light-py.png&amp;lt;/positive-y&amp;gt;     &lt;br /&gt;
          &amp;lt;negative-y&amp;gt;Models/Effects/interior/reflection/light-ny.png&amp;lt;/negative-y&amp;gt;    &lt;br /&gt;
          &amp;lt;positive-z&amp;gt;Models/Effects/interior/reflection/light-pz.png&amp;lt;/positive-z&amp;gt;      &lt;br /&gt;
          &amp;lt;negative-z&amp;gt;Models/Effects/interior/reflection/light-nz.png&amp;lt;/negative-z&amp;gt;      &lt;br /&gt;
      &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The control parameters of the lightmap otherwise parallel those of the [[Model-combined_effect]] or the model interior effect described below, i.e. up to four channels can be independently specified on the lightmap.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
By default, rain and frost are mapped to the shape of the canopy using coordinate systems that adapts to the splash vector and the canopy shape. This requires no particular action aircraft-side except to provide the bare geometry of a canopy/windshield, but may not be satisfactory in all instances - in particular for near vertical cockpit side windows the scheme does poorly.&lt;br /&gt;
&lt;br /&gt;
There are two alternative coordinate maps available in this case, controlled by the parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;surface-mapping-scheme type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/surface-mapping-scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 1, the uv-mapping of the surface is used (it has to exist of course). For this to work properly, the uv-mapping needs to be sufficiently regular and roughly preserve the mapped area.&lt;br /&gt;
&lt;br /&gt;
If the parameter is changed to 2, a local orthonormal system based on the normals of the surface is constructed. This no longer takes the splash vector consistently into account  and works poorly for surfaces which are flat in the (xy)-plane, but gives decent result for side windows.&lt;br /&gt;
&lt;br /&gt;
== The HUD effect ==&lt;br /&gt;
&lt;br /&gt;
The HUD effect is a variant of the glass effect designed to render the visuals of a head-up display (HUD) closer to real life. This only works if the HUD is custom-created via [[Canvas]], not via the native FG HUD mechanism as the latter by-passes the effect framework.&lt;br /&gt;
&lt;br /&gt;
The effect takes the same configuration options as the glass effect (i.e. it can render frost, damage, scratches, glare,...) but in addition it runs a blur over the HUD image and alters the color distribution of the projected symbols to de-saturate the bright parts in the center. The result looks less monochromatic and more like light projected onto a surface (left: bare canvas right: HUD effect)&lt;br /&gt;
&lt;br /&gt;
[[File:HUD effect.jpg|800px|Comparison between a bare canvas HUD (left) and the ALS HUD shader run over it (right)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
The effect is used from the model file by assigning it to the surface that also carries the canvas texture of the HUD via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;&lt;br /&gt;
        &amp;lt;inherits-from&amp;gt;Effects/hud&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
        &amp;lt;object-name&amp;gt;HUDImage&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should usually work out of the box, but if the HUD brightness should be changeable or the glass properties adjusted, a derived effect needs to be created.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
In addition to the parameters supported by the glass shader (which, for instance in the case of rain splashes, may or may not be appropriate for a HUD, this is left at user's discretion), the HUD effect takes the following special parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;brightness&amp;gt;1.0&amp;lt;/brightness&amp;gt;&lt;br /&gt;
   &amp;lt;sample-res&amp;gt;0.0006&amp;lt;/sample-res&amp;gt;&lt;br /&gt;
   &amp;lt;sample-far&amp;gt;2.5&amp;lt;/sample-far&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first one is the relative brightness setting of the HUD (which should equal the alpha value assigned to the canvas image of the symbols). This parameter is used to de-saturate colors in the symbol centers.&lt;br /&gt;
&lt;br /&gt;
Remaining two parameters represent the size and shape of the blur Kernel being used. The sample resolution (sample-res) determines the overall size of the blur region, the farthest sample (sample-far) how far out the tails of the blur region extend.&lt;br /&gt;
&lt;br /&gt;
Note: The number of sampling steps is not computed adaptive to these parameters, if the steps get too coarse, then multiple image echoes instead of a proper blur will be generated - adjust these parameters with care (if at all).&lt;br /&gt;
&lt;br /&gt;
== The ALS interior model effect  ==&lt;br /&gt;
&lt;br /&gt;
Since the interior of a cockpit is a large part of what a pilot gets to see in-flight, but this interior represents a rather special situation (light is reduced as it falls through windows, it may have artificial light, there is never any fog or haze,...) ALS offers a separate effect to specifically render the interior of a plane.&lt;br /&gt;
&lt;br /&gt;
This effect also includes optional features which will be available at higher quality settings of the model shader.&lt;br /&gt;
&lt;br /&gt;
=== Interior shadows and tinted glass effect ===&lt;br /&gt;
&lt;br /&gt;
With FlightGear version 3.5 and above, ALS now supports interior shading; i.e. the sun shining through the windows and casting shadows on the panel.&lt;br /&gt;
&lt;br /&gt;
[[File:interior01.jpg|640px|Interior shading effect]]&lt;br /&gt;
&lt;br /&gt;
This effect is based on an opacity map - a cube map of textures which tells the renderer where the cockpit is transparent and where not. The opacity map has to be created beforehand, which allows to make it quite detailed. In this map, white stands for a completely transparent surface, black for an opaque surface, colors for tinted glass which will create a colored light spot in the cockpit, grey hues for partial shadowing allowing to paint dirt effects onto the windows, and caustics can be drawn using the alpha channel: (1-alpha) will be used as an enhancement of the light at a certain spot.&lt;br /&gt;
&lt;br /&gt;
The effect is typically declared as derived by inheritance using an effect file such as c172-interior.eff which looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior-glass&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
	  &amp;lt;images&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-x&amp;gt;Models/Effects/interior/clr_px.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-x&amp;gt;Models/Effects/interior/clr_nx.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-y&amp;gt;Models/Effects/interior/clr_py.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-y&amp;gt;Models/Effects/interior/clr_ny.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
		 &amp;lt;positive-z&amp;gt;Models/Effects/interior/clr_pz.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
		 &amp;lt;negative-z&amp;gt;Models/Effects/interior/clr_nz.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
	  &amp;lt;/images&amp;gt;&lt;br /&gt;
	&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-center type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 0.5 0.0 0.3&amp;lt;/opacity-cube-center&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-scale type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.5 0.5 0.7&amp;lt;/opacity-cube-scale&amp;gt;&lt;br /&gt;
	&amp;lt;opacity-cube-angle type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/opacity-cube-angle&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is called by inheritance in the model.xml file.&lt;br /&gt;
&lt;br /&gt;
Imagine the opacity map as a box surrounding the cockpit and trying to closely follow its contours. The origin in the box needs to be placed into the center of the cockpit, which is what &amp;lt;b&amp;gt;&amp;lt;opacity-cube-center&amp;gt;&amp;lt;/b&amp;gt; does. Each of the three dimensions then needs to be stretched to roughly fit the layout of the canopy, this is done by &amp;lt;b&amp;gt;&amp;lt;opacity-cube-scale&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If opacity map center and scale are wrong, you will still see shadows, but they won't match the real cockpit layout (the lightspot of a window will be seen displaced and at a different size of the real window). Thus, carefully measuring the best box layout in a 3d tool is moderately important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aircraft-side the effect is called as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
   &amp;lt;inherits-from&amp;gt;Aircraft/c172p/Models/Effects/c172p-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Plane.010_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;PilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;CopilotSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;panel_1_1&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;InstrumentCover.001&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_right&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;doorhandleint_left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Panel_0&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Throttle&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Mixture&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;Pedestal&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;TrimWheel&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;ParkingBrake&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;BackSeat&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;FuelSelectorFace&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each object that you want the shadow effect to fall on must be included in the inheritance.&lt;br /&gt;
&lt;br /&gt;
Unless you supply a path, the cube_.png's need to reside in the same directory as the model.xml where you added the &amp;lt;effect&amp;gt; tag pair that calls c172-interior.eff, not where you put the aircraft_interior.eff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The orientation of the faces of each cube have to be adjusted based on the positive and negative axis of the model.&lt;br /&gt;
&lt;br /&gt;
For example, using the c172p model as a reference.&lt;br /&gt;
&lt;br /&gt;
The tail, right wing and top on the model are positive inside Blender. So the cube faces are laid out as follows.&lt;br /&gt;
&lt;br /&gt;
Note: Depending on the image's orientation when photographed the rotation direction will vary. This is assuming the images are being taken from the center of the cockpit looking out. Using compass headings to describe how to rotate the images.&lt;br /&gt;
&lt;br /&gt;
px (tail) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nx (nose) rotate 90 deg from N or S to E&lt;br /&gt;
&lt;br /&gt;
py (starboard/right) from N do not rotate&lt;br /&gt;
&lt;br /&gt;
ny (port/left) from N rotate 180 deg to S&lt;br /&gt;
&lt;br /&gt;
pz (top) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
nz (bottom) rotate 90 deg from N or S to W&lt;br /&gt;
&lt;br /&gt;
[[File:C172p-cube.jpg|640px|Cube map layout of the c172p]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With Blender, it's pretty easy to create the cubemap.&lt;br /&gt;
&lt;br /&gt;
1. Add a camera where the cubemap will be. Set the FOV to 90 degrees.&lt;br /&gt;
2. Set the resolution to 1024x1024 (or any other square, power-of-two size).&lt;br /&gt;
3. Hide all lights and windows; disable ambient lighting (set it to black) and turn off ambient occlusion.&lt;br /&gt;
4. Set the world color to white.&lt;br /&gt;
5. Enable the compositor and add an invert node.&lt;br /&gt;
6. Render and save the six views as you would normally.&lt;br /&gt;
7. Add dirt, tinted glass color and caustics by hand&lt;br /&gt;
&lt;br /&gt;
This process depends on the model setup but it should work for most aircraft with a few tweaks.&lt;br /&gt;
&lt;br /&gt;
==== Cubemap Kit for Blender ====&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-shadow-blender-instructions.png|320px|How to make an interior cubemap with the cubemap kit]]&lt;br /&gt;
&lt;br /&gt;
See [http://chateau-logic.com/content/flightgear-interior-shadow-cubemap-kit flightgear-interior-shadow-cubemap-kit] for a premade kit to create the cubemap and the .eff sample file to use it.&lt;br /&gt;
&lt;br /&gt;
==== Important Notes ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Currently (May 2015) the effect does not deal gracefully with child models included into the main model with offsets and/or rotations because these introduce a different coordinate system in which the shadow does not match. The general idea of a code solution is known, but not implemented. Right now this can only be addressed by explicitly positioning child models in the *.ac file and not using any offsets when including them.&lt;br /&gt;
&lt;br /&gt;
=== ALS flashlight ===&lt;br /&gt;
&lt;br /&gt;
This effect is meant to imitate a hand held flashlight for use in getting instruments in the cockpit turned on in dark conditions.&lt;br /&gt;
It is almost identical in nature to ALS searchlight only it is applied using interior-model.eff.&lt;br /&gt;
It has two user defined light color filters that can be applied and also a user defined light radius setting.&lt;br /&gt;
&lt;br /&gt;
[[File:ALS flashlight.jpg|600px|ALS flashlight effect]]&lt;br /&gt;
&lt;br /&gt;
To implement this effect use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
A full definition looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;c172-interior&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;inherits-from&amp;gt;Effects/model-interior&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-one type=&amp;quot;vec3d&amp;quot;&amp;gt;0.5 0.5 0.5&amp;lt;/light-filter-one&amp;gt;&lt;br /&gt;
	&amp;lt;light-filter-two type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.2 0.2&amp;lt;/light-filter-two&amp;gt;&lt;br /&gt;
	&amp;lt;light-radius type=&amp;quot;float&amp;quot;&amp;gt;13&amp;lt;/light-radius&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the example above light-filter-one is soft white light and light-filter-two is a soft red light.&lt;br /&gt;
&lt;br /&gt;
After defining as above you can turn it on using the following property&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 1 is light-filter-one&lt;br /&gt;
&lt;br /&gt;
/sim/rendering/als-secondary-lights/use-flashlight = 2 is light-filter-two&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The flashlight effect inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
At lowest quality level, the effect supports an implicit lightmap, i.e. a color range of the basic texture can be selected and declared to act as a lightmap. This is specifically useful to render panel backlighting as in the example below:&lt;br /&gt;
&lt;br /&gt;
[[File:Ilightmap.jpg|600px|An implicit lightmap used to simulate a backlit panel]]&lt;br /&gt;
&lt;br /&gt;
The effect is off by default and switched on by setting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/implicit-lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following parameters are available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-tag-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-tag-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the base color to be tagged, i.e. if the panel labels to be illuminated at night are white, the color needs to be set to white.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-low type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/implicit-lightmap-threshold-low&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-threshold-high type=&amp;quot;float&amp;quot;&amp;gt;1.5&amp;lt;/implicit-lightmap-threshold-high&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The thresholds determine how similar a color may be to the base color in order to be still illuminated. The measure is the Euklidean distance of the color vectors. The lower thresholds determines when illumination will start to fade, the higher threshold at what distance in color space illumination will no longer take place. The thresholds have to be adapted to the specific situation - the technique works best for high-contrast panels (white labels on black background) and may not work at all for low contrast panels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-emit-color type=&amp;quot;vec3d&amp;quot;&amp;gt;1.0 1.0 1.0&amp;lt;/implicit-lightmap-emit-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The emit color specifies at which color the pixel will show if it is tagged (see above) and the implicit lightmap is on (see below) - set this to the color of the backlight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;implicit-lightmap-intensity type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/implicit-lightmap-intensity&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the intensity determines how brightly the illuminated pixel will shine.&lt;br /&gt;
&lt;br /&gt;
Ambiance lighting can be simulated with the following tags.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-r type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-r&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-g type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-g&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-g&amp;gt;&lt;br /&gt;
&amp;lt;residual-ambience-b type=&amp;quot;float&amp;quot;&amp;gt;&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-b&amp;lt;/use&amp;gt;&amp;lt;/residual-ambience-b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example note the use of the &amp;quot;use&amp;quot; tag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;use&amp;gt;/fdm/jsbsim/systems/light/cockpit-ambience-r&amp;lt;/use&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be any defined property or static value.&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The implicit lightmap inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Irradiance maps ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In the simplest rendering schemes, diffuse and specular light are assumed to be highly directional (i.e. it illuminates lit surfaces only) while ambient light is taken to be omnidirectional.&lt;br /&gt;
&lt;br /&gt;
In reality, that is hardly ever true. In a typical outside location, ambient light is mainly coming from the sky above (which is why the ground underneath a car is dark even in the absence of directional light when the sky is overcast and the sun is not visible). In an enclosed space (like a room, or an aircraft cockpit), ambient light has to fall through the windows, i.e. is mainly not coming above but falling in horizontally.&lt;br /&gt;
&lt;br /&gt;
The directional dependence is not very strong though, yet it leaves measurable effects. In rendering, this can be accounted for by irradiance maps. In the following, the interior of the C-172p is rendered in the first case using omnidirectional ambient light, in the second case using an irradiance map giving the ambient light the directionality of the cabin windows, i.e. the light falls in predominantly horizontally (in addition, a grain map is superimposed to provide structure). Note how the spatial structure of the roof, looking bland when rendered in omnidirectional light is brought out by the irradiance map.&lt;br /&gt;
&lt;br /&gt;
[[File:Als-interior-irradiance01.jpg|400px|C-172p cabin interior rendered without irradiance and grain map]]&lt;br /&gt;
[[File:Als-interior-irradiance02.jpg|400px|C-172p cabin interior rendered with irradiance and grain map]]&lt;br /&gt;
&lt;br /&gt;
Irradiance mapping is configured by the following parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-type type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/irradiance-map-type&amp;gt;&lt;br /&gt;
&amp;lt;irradiance-map-strength type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/irradiance-map-strength&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several pre-configured irradiance map functions which can be chosen by map type. &lt;br /&gt;
&lt;br /&gt;
0: (default) omndirectional light&lt;br /&gt;
1: light predominantly coming from above (most appropriate for fighter cockpits)&lt;br /&gt;
2: light predominantly coming from the horizon (most appropriate for GA aircraft)&lt;br /&gt;
&lt;br /&gt;
The strength of the irradiance map regulates how pronounced the asymmetry of the map will be. A strength of zero always makes the light omnidirectional, whereas a strength of 1 implies that no light is coming from any direction 90 degree to the main direction (i.e. for the option 2, a strength of 1.0 means that no ambient light will fall in from above or below and that hence horizontal surfaces will appear pitch black unless direct light falls on them)&lt;br /&gt;
&lt;br /&gt;
'''Special note:'''&lt;br /&gt;
The irradiance map inherits model-interior, model-interior.eff is setup around the opacity cube map, it won't allow you to go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects.&lt;br /&gt;
A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;cubemap&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;images&amp;gt;&lt;br /&gt;
      &amp;lt;positive-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-x&amp;gt;&lt;br /&gt;
      &amp;lt;negative-x&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-x&amp;gt;&lt;br /&gt;
      &amp;lt;positive-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-y&amp;gt;&lt;br /&gt;
      &amp;lt;negative-y&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-y&amp;gt;&lt;br /&gt;
      &amp;lt;positive-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/positive-z&amp;gt;&lt;br /&gt;
      &amp;lt;negative-z&amp;gt;Aircraft/c172p/Models/Effects/interior/white.png&amp;lt;/negative-z&amp;gt;&lt;br /&gt;
   &amp;lt;/images&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Explicit lightmap ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
In addition to the implicit lightmap, it is also possible to explicitly specify a lightmap. The syntax for this exactly parallels the syntax of the [[Model-combined_effect]] which supplies lightmaps for the exterior.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/MyAircraft/Effects/my_lightmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;clamp&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;clamp&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/lightmap-enabled&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-multi type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/lightmap-multi&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-factor type=&amp;quot;float&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt;1.0&amp;lt;/lightmap-factor&amp;gt;&lt;br /&gt;
&amp;lt;lightmap-color type=&amp;quot;vec3d&amp;quot; n=&amp;quot;0&amp;quot;&amp;gt; 1.0 1.0 1.0 &amp;lt;/lightmap-color&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a single channel lightmap in which pixel color times the lightmap color provides the illumination. Using the multi-channel function, up to four different maps can be specified in which the (rgba) values of a pixel encode where the light falls and the associated lightmap color what color the illumination takes. Each of these maps can be switched on and off or dimmed in intensity independently.&lt;br /&gt;
&lt;br /&gt;
=== Grain map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; This effect requires higher than minimum model shader quality setting.&lt;br /&gt;
&lt;br /&gt;
The grain map sets a repeating hires overlay texture which can supply a very credible illusion of structure to a surface for cheap. The syntax exactly parallels that of the [[Model-combined_effect]] ALS grain feature described above.&lt;br /&gt;
&lt;br /&gt;
For instance, the following&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;texture n=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image&amp;gt;Aircraft/Effects/MyGrainmap.png&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
&amp;lt;/texture&amp;gt;&lt;br /&gt;
&amp;lt;grain-texture-enabled type=&amp;quot;int&amp;quot;&amp;gt;1&amp;lt;/grain-texture-enabled&amp;gt;&lt;br /&gt;
&amp;lt;grain-magnification type=&amp;quot;float&amp;quot;&amp;gt;10&amp;lt;/grain-magnification&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sets up a grain overlay with a 10-time higher resolution over the base texture layer.&lt;br /&gt;
&lt;br /&gt;
== ALS procedural lights ==&lt;br /&gt;
&lt;br /&gt;
The ALS framework supports procedurally generated lights (for instance aircraft position lights, strobe lights,... ) for aircraft and models. Note that the effect produces the visuals of the lights themselves, but they do not illuminate their surroundings.&lt;br /&gt;
&lt;br /&gt;
=== Why procedural lights? ===&lt;br /&gt;
&lt;br /&gt;
Traditionally aircraft position lights have been implemented as billboarded emissive textures. This technique is limited in scope, as it has difficulty producing a directional light or changes in the light appearance (for instance glare) with changed scene lighting. The ALS procedural lights are designed to give visuals consistent with the auto-generated scene lights (runway lighting, street lights) and support configurable directionality, glare and even the illumination of fog by the lights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic implementation ===&lt;br /&gt;
&lt;br /&gt;
The base of the light is a texture quad which has Effects/procedural-light.eff assigned. Start from including the template provided into your model as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;model&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;/Models/Effects/procedural_light.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
        &amp;lt;offsets&amp;gt;&lt;br /&gt;
            &amp;lt;x-m&amp;gt; 0 &amp;lt;/x-m&amp;gt;&lt;br /&gt;
            &amp;lt;y-m&amp;gt; 0 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
            &amp;lt;z-m&amp;gt; 2 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
        &amp;lt;/offsets&amp;gt;&lt;br /&gt;
 &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and configure from there according to your own needs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not billboard the light via animation!&amp;lt;/b&amp;gt; The GLSL code will take care of the billboarding. Use a scale animation to change the size of the light, do not change the quad (the *.ac) itself in size, the shader code requires its geometry to be fixed.&lt;br /&gt;
&lt;br /&gt;
The lights are currently not supported in the default or Rembrandt renderer and will simply be invisible in these frameworks.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the light ===&lt;br /&gt;
&lt;br /&gt;
Make your own derived effect inheriting from Effects/procedural-light.eff and assign it in the xml wrapper of the light.&lt;br /&gt;
&lt;br /&gt;
====The base light color set====&lt;br /&gt;
&lt;br /&gt;
The base light color can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These take the normal set of values ranging from 0 to 1. &lt;br /&gt;
&lt;br /&gt;
====Light full intensity in the center====&lt;br /&gt;
&lt;br /&gt;
Now the light appears at full intensity in the center can be set via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
    &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea behind this is that lights give a better visual appearance if their center is rendered visually brighter and de-saturated, but this occurs only if the light is at full intensity.&lt;br /&gt;
&lt;br /&gt;
There are no sanity checks done, you can assign any center color you like even if this makes no sense - you can change center color or darken it, so use with care.&lt;br /&gt;
&lt;br /&gt;
====Runtime change the light intensity====&lt;br /&gt;
&lt;br /&gt;
To runtime change the light intensity, assign&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to a property and change that property in the range from 0 to 1. Eg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;intensity_scale&amp;gt;&lt;br /&gt;
       &amp;lt;use&amp;gt;/rendering/nav-lights-factor&amp;lt;/use&amp;gt;&lt;br /&gt;
     &amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Set directional lights====&lt;br /&gt;
&lt;br /&gt;
For directional lights, you need to assign a pointing vector in aircraft coordinates into which the light cone points and set the directionality flag to true to activate the computations. This is done via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;-1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
    &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
    &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It would be customary to pass a normalized vector, but if you don't know how to do it, the shader will do it for you. By assigning properties to the pointing coordinates, the light direction can be changed runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Do not use a rotation animation to change the light direction - it won't work.&amp;lt;/b&amp;gt; Make the pointing vector properties and change them to your needs.&lt;br /&gt;
&lt;br /&gt;
====Fading of a directional light====&lt;br /&gt;
&lt;br /&gt;
The fading of a directional light away from the pointing axis is controlled by passing angles (or rather sines of angles).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
    &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
    &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Up to inner_angle, the light will have full intensity. From inner to outer angle the light will linearly fade to outer_gain. From outer angle to zero angle, the light intensity will linearly fade to zero.&lt;br /&gt;
&lt;br /&gt;
====Strobe effect====&lt;br /&gt;
&lt;br /&gt;
For get an automatic strobe effect you can set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
    &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to true. If you want your own strobe pattern, generate a strobe function and use &amp;lt;b&amp;gt;intensity_scale&amp;lt;/b&amp;gt; instead to pass it to the shader.&lt;br /&gt;
&lt;br /&gt;
=== Complete example ===&lt;br /&gt;
&lt;br /&gt;
Here's the left nav light of the C-172p:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;    &lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;name&amp;gt;procedural-light-nav-left&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/procedural-light&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_r type=&amp;quot;float&amp;quot;&amp;gt;1.000&amp;lt;/light_color_base_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_g type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_base_b type=&amp;quot;float&amp;quot;&amp;gt;0.320&amp;lt;/light_color_base_b&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_r type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_r&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_g type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_g&amp;gt;&lt;br /&gt;
        &amp;lt;light_color_center_b type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/light_color_center_b&amp;gt;&lt;br /&gt;
        &amp;lt;intensity_scale type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/intensity_scale&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Arc is 110 deg, is 55 deg per side, giving 35 deg from wing --&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_x type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/pointing_x&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_y type=&amp;quot;float&amp;quot;&amp;gt;0.7002075382097097&amp;lt;/pointing_y&amp;gt;&lt;br /&gt;
        &amp;lt;pointing_z type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/pointing_z&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;is_directional type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/is_directional&amp;gt;&lt;br /&gt;
        &amp;lt;is_strobe type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/is_strobe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Angles are 0.0 at 0 deg from pointing direction, 1.0 at&lt;br /&gt;
             90/-90 deg, and 0.0 at 180/-180 deg.&lt;br /&gt;
&lt;br /&gt;
             For left navigation light we use -0/-35 .. +110/+145 for&lt;br /&gt;
             the inner/outer range. This gives an arc of 110/180 deg,&lt;br /&gt;
             or 55/90 deg from center.&lt;br /&gt;
&lt;br /&gt;
             Value = sin(angle in degrees)&lt;br /&gt;
&lt;br /&gt;
             0.8191520442889918 = 55 deg (* 2 = 110 deg inner angle)&lt;br /&gt;
             1.0000 = 90 deg (* 2 = 180 deg outer angle)&lt;br /&gt;
        --&amp;gt;&lt;br /&gt;
        &amp;lt;inner_angle type=&amp;quot;float&amp;quot;&amp;gt;0.8191520442889918&amp;lt;/inner_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_angle type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/outer_angle&amp;gt;&lt;br /&gt;
        &amp;lt;zero_angle type=&amp;quot;float&amp;quot;&amp;gt;0.982547593563&amp;lt;/zero_angle&amp;gt;&lt;br /&gt;
        &amp;lt;outer_gain type=&amp;quot;float&amp;quot;&amp;gt;0.1&amp;lt;/outer_gain&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
The Cessna 182 by Heiko Schulz and Gilberto Agostinho with procedural lights activated:&amp;lt;br&amp;gt;&lt;br /&gt;
:''(To percieve the effect well, you probably have to darken your room and switch to fullscreen)''&lt;br /&gt;
[[File:Cessna 182 with procedural lights.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
===Move dynamically the procedural light===&lt;br /&gt;
&lt;br /&gt;
The position of a procedural light is declared in the '''&amp;lt;model&amp;gt;''' section, within the '''&amp;lt;PropertyList&amp;gt;''' XML code, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;procedural-light-gear-white-left&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;path&amp;gt;Effects/lights/procedural_light_gear_white.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
      &amp;lt;offsets&amp;gt;&lt;br /&gt;
          &amp;lt;x-m&amp;gt; -3.08&amp;lt;/x-m&amp;gt;&lt;br /&gt;
          &amp;lt;y-m&amp;gt; -0.21 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
          &amp;lt;z-m&amp;gt; -1.18 &amp;lt;/z-m&amp;gt;&lt;br /&gt;
      &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tag ''procedural-light-gear-white-left'' is very important because is the object name. This name will be used as the reference object.&amp;lt;BR&amp;gt;Next, we can define an animation in the same xml file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;GearFrontalDoor&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;gear/gear/position-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;axis&amp;gt;&lt;br /&gt;
          &amp;lt;x1-m&amp;gt;  -3.00240&amp;lt;/x1-m&amp;gt;&lt;br /&gt;
          &amp;lt;y1-m&amp;gt;  1.0&amp;lt;/y1-m&amp;gt;&lt;br /&gt;
          &amp;lt;z1-m&amp;gt;  -1.02906&amp;lt;/z1-m&amp;gt;&lt;br /&gt;
          &amp;lt;x2-m&amp;gt;  -3.00240&amp;lt;/x2-m&amp;gt;&lt;br /&gt;
          &amp;lt;y2-m&amp;gt;  -1.0&amp;lt;/y2-m&amp;gt;&lt;br /&gt;
          &amp;lt;z2-m&amp;gt;  -1.0290&amp;lt;/z2-m&amp;gt;&lt;br /&gt;
      &amp;lt;/axis&amp;gt;&lt;br /&gt;
      &amp;lt;interpolation&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.25&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;90&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.50&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;60&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;0.75&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;30&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
          &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt;0&amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;
      &amp;lt;/interpolation&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''procedural light'' object code is this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;procedural-light-gear-white-left&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ALS fuselage shadow effect ==&lt;br /&gt;
ALS supports the manipulation of a (simplified) ground shadow. This effect uses an existing simplified shadow animation configuration and by default uses the gear-agl-m property to calculate the ground placement of that simplified shadow.&lt;br /&gt;
&lt;br /&gt;
The system, techniques for using it, and several working examples are on [https://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=24859&amp;amp;start=135 this extensive forum thread about the ALS shadow effects].&lt;br /&gt;
&lt;br /&gt;
[[File:Alsshadow.jpg|800px|ALS Shadow]]&lt;br /&gt;
&lt;br /&gt;
The effect can be applied easily in any aircraft that report the gear-agl-m property by simply adding a declaration inheriting from shadow.eff.&lt;br /&gt;
&lt;br /&gt;
If the aircraft does not support the gear-agl-m property, (notably JSBSim), you need to create a [[Autopilot configuration reference | Property Rule]] to pass a supported AGL data to the gear-agl-m property. In this case we use altitude-agl-ft converted to meters using a property rule configuration file.&lt;br /&gt;
&lt;br /&gt;
For the first example we'll use the &amp;quot;supported gear-agl-m&amp;quot; method for aircraft that don't require a property rule.&lt;br /&gt;
&lt;br /&gt;
Simply add the following inheritance declaration after you declare your shadow animation statement.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;name_of_the_shadow_object&amp;lt;/object-name&amp;gt;&lt;br /&gt;
&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the non-ALS simplified shadow code you normally use a &amp;quot;translate&amp;quot; animation to position the shadow on the ground.&lt;br /&gt;
When using the ALS method you must either remove, comment out, or apply a condition to restrict its use to non ALS shadow applications, because ALS is responsible for computing the shadows ground position.&lt;br /&gt;
&lt;br /&gt;
Here is how we apply a condition to the translation to limit it effect to non-ALS application only.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A complete shadow animation block looks like this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- opaque objects --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- transparent objects --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;not&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/rembrandt/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;/not&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;noshadow&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- pitch --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/pitch-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;-1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;1&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- roll --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;rotate&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/orientation/roll-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;1.0&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
    &amp;lt;axis&amp;gt;&lt;br /&gt;
      &amp;lt;x&amp;gt;1&amp;lt;/x&amp;gt;&lt;br /&gt;
      &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
      &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!--Translate to ground level  --&amp;gt;&lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;translate&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;condition&amp;gt;&lt;br /&gt;
    &amp;lt;not&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/not&amp;gt;&lt;br /&gt;
   &amp;lt;/condition&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;/position/altitude-agl-ft&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;-0.3048&amp;lt;/factor&amp;gt;&lt;br /&gt;
   &amp;lt;center&amp;gt;&lt;br /&gt;
     &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/center&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For aircraft requiring a [[Autopilot configuration reference | Property Rule]] there are a couple extra steps.&lt;br /&gt;
&lt;br /&gt;
In aircraft-set.xml you add the property rule call to the &amp;quot;configuration file&amp;quot; in between the PropertyList/sim/systems tag pairs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;property-rule n=&amp;quot;101&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;gear_agl-m&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;Aircraft/c172p/Systems/gearAGL.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
&amp;lt;/property-rule&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: the n=&amp;quot;101&amp;quot; needs to be =+100 as -100 is reserved for system wide property rules.&lt;br /&gt;
In the above example 101 was used because 100 was already being used by a previous property rule definition.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;configuration file&amp;quot; normally goes in /Systems.&lt;br /&gt;
In this example we named the configuration file /Systems/gearAGL.xml.&lt;br /&gt;
&lt;br /&gt;
Here is the complete /Systems/gearAGL.xml configuration file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;filter&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;reference&amp;gt;6&amp;lt;/reference&amp;gt;&lt;br /&gt;
    &amp;lt;output&amp;gt;/position/gear-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
  &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
What the configuration file does is convert the input of altitude-agl-ft to the output of (((altitude-agl-ft)-6)*0.3048) or (convert ft-6 to m) and pass it to /position/gear-agl-m.&lt;br /&gt;
 &lt;br /&gt;
See [[Autopilot configuration reference | Input and reference properties or values &amp;lt;input&amp;gt; and &amp;lt;reference&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
== ALS 3d shadow volume effect ==&lt;br /&gt;
What might be considered the next level of realism using a relatively &amp;quot;cheap&amp;quot; shadow effect is to use a 3d volume shadow.&lt;br /&gt;
&lt;br /&gt;
[[File:Shadow vol02.jpg|800px|ALS 3d Shadow Volume]]&lt;br /&gt;
&lt;br /&gt;
The procedure to implement the ALS shadow volume is similar to the ALS-shadow above with a few modifications.&lt;br /&gt;
&lt;br /&gt;
First you have to have a 3d shadow volume model of the aircraft you are applying the effect to. This model should be a low poly model that is optimized to be as little of a footprint as possible.&lt;br /&gt;
&lt;br /&gt;
A property rule is required, same as above. This is used to generate the above ground altitude in meters, (altitude-agl-m). The &amp;quot;altitude-agl-m&amp;quot; is used to place the shadow close to the ground in real time at an FDM rate of execution.&lt;br /&gt;
{{note|Do not confuse &amp;quot;altitude-agl-m&amp;quot; with the other type of non-3d ALS-shadow property of &amp;quot;gear-agl-m&amp;quot;. The shaders involved use these two different properties respectively for the two different effect. They are not interchangeable.}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
   &amp;lt;filter&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;gain&amp;gt;0.3048&amp;lt;/gain&amp;gt;&lt;br /&gt;
      &amp;lt;input&amp;gt;/position/altitude-agl-ft&amp;lt;/input&amp;gt;&lt;br /&gt;
      &amp;lt;reference&amp;gt;1.0&amp;lt;/reference&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;/position/altitude-agl-m&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The other difference from the ALS-shadow above is that it uses a different inherited effect.&lt;br /&gt;
Instead of&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
 &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
you use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effect&amp;gt;&lt;br /&gt;
    &amp;lt;inherits-from&amp;gt;Effects/shadow-vol&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make sure there is no duplicate 3d model shown in other renderers besides ALS it is also important to use a different select animation:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
    &amp;lt;!-- hide 3d shadow in non ALS mode --&amp;gt;&lt;br /&gt;
    &amp;lt;object-name&amp;gt;shadow&amp;lt;/object-name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;condition&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/sim/rendering/shaders/skydome&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/condition&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Procedural Texturing]]&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS infrared vision]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;br /&gt;
[[Category:ALS]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Changelog_2018.1&amp;diff=114374</id>
		<title>Changelog 2018.1</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Changelog_2018.1&amp;diff=114374"/>
		<updated>2018-02-11T07:10:08Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Scenery */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{changelogs|prev=2017.3|next=2017.5}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{draft|changelog|This changelog is currently being written for the FlightGear v2018.1 release. Feel free to help! If you are aware of any FlightGear related changes, please add them to the changelog.}}&lt;br /&gt;
&lt;br /&gt;
The FlightGear development team is delighted to announce the v2018.1 &amp;quot;Honolulu&amp;quot; release of FlightGear, the free, open-source flight simulator. This new version contains many exciting new features, enhancements and bugfixes. Highlights in this release include &lt;br /&gt;
Founded in 1997, FlightGear is developed by a worldwide group of volunteers, brought together by a shared ambition to create the most realistic flight simulator possible that is free to use, modify and distribute. FlightGear is used all over the world by desktop flight simulator enthusiasts, for research in universities and for interactive exhibits in museums.&lt;br /&gt;
&lt;br /&gt;
FlightGear features more than 400 aircraft, a worldwide scenery database, a multiplayer environment, detailed sky modelling, a flexible and open aircraft modelling system, varied networking options, multiple display support, a powerful scripting language and an open architecture. Best of all, being open-source, the simulator is owned by the community and everyone is encouraged to contribute. &lt;br /&gt;
&lt;br /&gt;
Download FlightGear v2018.1 for free from [http://www.flightgear.org/ FlightGear.org]&lt;br /&gt;
&lt;br /&gt;
FlightGear - Fly Free!&lt;br /&gt;
&lt;br /&gt;
== Useability ==&lt;br /&gt;
* Improved control for aircraft carriers&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
* Improved &amp;quot;Classic theme&amp;quot; with better fonts and colours&lt;br /&gt;
* Canvas MapStructure support for SlippyMaps, including VFRCharts, STAMEN, &lt;br /&gt;
* Various improvements to the Launcher&lt;br /&gt;
* Atmospheric Light Scattering renderer: extra volumetric vegetation layers for denser undergrowth&lt;br /&gt;
&lt;br /&gt;
== Scenery ==&lt;br /&gt;
* active Volcanos, including Kilauea, Stromboli, Etna, &lt;br /&gt;
* New Hawaii regional texture definitions&lt;br /&gt;
* several scenic waterfalls in the Hawaii area&lt;br /&gt;
* new and unique vegetation textures for several parts of the world&lt;br /&gt;
&lt;br /&gt;
== Significant Aircraft Updates ==&lt;br /&gt;
* A new glider: Rolladen-Schneider LS4&lt;br /&gt;
* [[Space Shuttle]] improvements&lt;br /&gt;
* Cessna 182S&lt;br /&gt;
* Amelia - an animated and hard-working co-pilot for the Alouette III capable of taking off and landing&lt;br /&gt;
* Citation II&lt;br /&gt;
* F-14 - various changes including improved carrier operations&lt;br /&gt;
* Robinson R44 helicopter&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* CH Products Throttle Quadrant supported out-of-the-box.  Thanks to CH Products for providing a sample quadrant.&lt;br /&gt;
* Improved support for Addons&lt;br /&gt;
* Support NMEA traffic alerts (e.g. flarm) to allow FG to feed AI/MP traffic to Nav/moving map clients such as xcsoar, skydemon, skymap&lt;br /&gt;
* Improvements to YASIM, including multiple wing sections, support for whole-stabilizer trim, better information from CLI tools&lt;br /&gt;
* More realistic carrier landings with improvements to the JSBSim arrestor wire behaviour.&lt;br /&gt;
&lt;br /&gt;
[[Category:Changes after 2017.3]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Changelog_2018.1&amp;diff=114373</id>
		<title>Changelog 2018.1</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Changelog_2018.1&amp;diff=114373"/>
		<updated>2018-02-11T07:09:31Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Significant Aircraft Updates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{changelogs|prev=2017.3|next=2017.5}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{draft|changelog|This changelog is currently being written for the FlightGear v2018.1 release. Feel free to help! If you are aware of any FlightGear related changes, please add them to the changelog.}}&lt;br /&gt;
&lt;br /&gt;
The FlightGear development team is delighted to announce the v2018.1 &amp;quot;Honolulu&amp;quot; release of FlightGear, the free, open-source flight simulator. This new version contains many exciting new features, enhancements and bugfixes. Highlights in this release include &lt;br /&gt;
Founded in 1997, FlightGear is developed by a worldwide group of volunteers, brought together by a shared ambition to create the most realistic flight simulator possible that is free to use, modify and distribute. FlightGear is used all over the world by desktop flight simulator enthusiasts, for research in universities and for interactive exhibits in museums.&lt;br /&gt;
&lt;br /&gt;
FlightGear features more than 400 aircraft, a worldwide scenery database, a multiplayer environment, detailed sky modelling, a flexible and open aircraft modelling system, varied networking options, multiple display support, a powerful scripting language and an open architecture. Best of all, being open-source, the simulator is owned by the community and everyone is encouraged to contribute. &lt;br /&gt;
&lt;br /&gt;
Download FlightGear v2018.1 for free from [http://www.flightgear.org/ FlightGear.org]&lt;br /&gt;
&lt;br /&gt;
FlightGear - Fly Free!&lt;br /&gt;
&lt;br /&gt;
== Useability ==&lt;br /&gt;
* Improved control for aircraft carriers&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
* Improved &amp;quot;Classic theme&amp;quot; with better fonts and colours&lt;br /&gt;
* Canvas MapStructure support for SlippyMaps, including VFRCharts, STAMEN, &lt;br /&gt;
* Various improvements to the Launcher&lt;br /&gt;
* Atmospheric Light Scattering renderer: extra volumetric vegetation layers for denser undergrowth&lt;br /&gt;
&lt;br /&gt;
== Scenery ==&lt;br /&gt;
* Volcanos, including Kilauea, Stromboli, Etna, &lt;br /&gt;
* New Hawaii regional texture definitions&lt;br /&gt;
* several scenic waterfalls in the Hawaii area&lt;br /&gt;
* new and unique vegetation textures for several parts of the world&lt;br /&gt;
&lt;br /&gt;
== Significant Aircraft Updates ==&lt;br /&gt;
* A new glider: Rolladen-Schneider LS4&lt;br /&gt;
* [[Space Shuttle]] improvements&lt;br /&gt;
* Cessna 182S&lt;br /&gt;
* Amelia - an animated and hard-working co-pilot for the Alouette III capable of taking off and landing&lt;br /&gt;
* Citation II&lt;br /&gt;
* F-14 - various changes including improved carrier operations&lt;br /&gt;
* Robinson R44 helicopter&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* CH Products Throttle Quadrant supported out-of-the-box.  Thanks to CH Products for providing a sample quadrant.&lt;br /&gt;
* Improved support for Addons&lt;br /&gt;
* Support NMEA traffic alerts (e.g. flarm) to allow FG to feed AI/MP traffic to Nav/moving map clients such as xcsoar, skydemon, skymap&lt;br /&gt;
* Improvements to YASIM, including multiple wing sections, support for whole-stabilizer trim, better information from CLI tools&lt;br /&gt;
* More realistic carrier landings with improvements to the JSBSim arrestor wire behaviour.&lt;br /&gt;
&lt;br /&gt;
[[Category:Changes after 2017.3]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Changelog_2018.1&amp;diff=114372</id>
		<title>Changelog 2018.1</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Changelog_2018.1&amp;diff=114372"/>
		<updated>2018-02-11T07:09:05Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Scenery */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{changelogs|prev=2017.3|next=2017.5}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{draft|changelog|This changelog is currently being written for the FlightGear v2018.1 release. Feel free to help! If you are aware of any FlightGear related changes, please add them to the changelog.}}&lt;br /&gt;
&lt;br /&gt;
The FlightGear development team is delighted to announce the v2018.1 &amp;quot;Honolulu&amp;quot; release of FlightGear, the free, open-source flight simulator. This new version contains many exciting new features, enhancements and bugfixes. Highlights in this release include &lt;br /&gt;
Founded in 1997, FlightGear is developed by a worldwide group of volunteers, brought together by a shared ambition to create the most realistic flight simulator possible that is free to use, modify and distribute. FlightGear is used all over the world by desktop flight simulator enthusiasts, for research in universities and for interactive exhibits in museums.&lt;br /&gt;
&lt;br /&gt;
FlightGear features more than 400 aircraft, a worldwide scenery database, a multiplayer environment, detailed sky modelling, a flexible and open aircraft modelling system, varied networking options, multiple display support, a powerful scripting language and an open architecture. Best of all, being open-source, the simulator is owned by the community and everyone is encouraged to contribute. &lt;br /&gt;
&lt;br /&gt;
Download FlightGear v2018.1 for free from [http://www.flightgear.org/ FlightGear.org]&lt;br /&gt;
&lt;br /&gt;
FlightGear - Fly Free!&lt;br /&gt;
&lt;br /&gt;
== Useability ==&lt;br /&gt;
* Improved control for aircraft carriers&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
* Improved &amp;quot;Classic theme&amp;quot; with better fonts and colours&lt;br /&gt;
* Canvas MapStructure support for SlippyMaps, including VFRCharts, STAMEN, &lt;br /&gt;
* Various improvements to the Launcher&lt;br /&gt;
* Atmospheric Light Scattering renderer: extra volumetric vegetation layers for denser undergrowth&lt;br /&gt;
&lt;br /&gt;
== Scenery ==&lt;br /&gt;
* Volcanos, including Kilauea, Stromboli, Etna, &lt;br /&gt;
* New Hawaii regional texture definitions&lt;br /&gt;
* several scenic waterfalls in the Hawaii area&lt;br /&gt;
* new and unique vegetation textures for several parts of the world&lt;br /&gt;
&lt;br /&gt;
== Significant Aircraft Updates ==&lt;br /&gt;
* A new glider: Rolladen-Schneider LS4&lt;br /&gt;
* [[Space Shuttle]] improvements&lt;br /&gt;
* Cessna 182S&lt;br /&gt;
* Amelia - an animated and hard-working co-pilot for the Alouette III capable of taking off and landing&lt;br /&gt;
* Citation II&lt;br /&gt;
* F-14 - various changes including improved carrier operations&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* CH Products Throttle Quadrant supported out-of-the-box.  Thanks to CH Products for providing a sample quadrant.&lt;br /&gt;
* Improved support for Addons&lt;br /&gt;
* Support NMEA traffic alerts (e.g. flarm) to allow FG to feed AI/MP traffic to Nav/moving map clients such as xcsoar, skydemon, skymap&lt;br /&gt;
* Improvements to YASIM, including multiple wing sections, support for whole-stabilizer trim, better information from CLI tools&lt;br /&gt;
* More realistic carrier landings with improvements to the JSBSim arrestor wire behaviour.&lt;br /&gt;
&lt;br /&gt;
[[Category:Changes after 2017.3]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Changelog_2018.1&amp;diff=114371</id>
		<title>Changelog 2018.1</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Changelog_2018.1&amp;diff=114371"/>
		<updated>2018-02-11T07:07:32Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Significant Aircraft Updates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{changelogs|prev=2017.3|next=2017.5}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{draft|changelog|This changelog is currently being written for the FlightGear v2018.1 release. Feel free to help! If you are aware of any FlightGear related changes, please add them to the changelog.}}&lt;br /&gt;
&lt;br /&gt;
The FlightGear development team is delighted to announce the v2018.1 &amp;quot;Honolulu&amp;quot; release of FlightGear, the free, open-source flight simulator. This new version contains many exciting new features, enhancements and bugfixes. Highlights in this release include &lt;br /&gt;
Founded in 1997, FlightGear is developed by a worldwide group of volunteers, brought together by a shared ambition to create the most realistic flight simulator possible that is free to use, modify and distribute. FlightGear is used all over the world by desktop flight simulator enthusiasts, for research in universities and for interactive exhibits in museums.&lt;br /&gt;
&lt;br /&gt;
FlightGear features more than 400 aircraft, a worldwide scenery database, a multiplayer environment, detailed sky modelling, a flexible and open aircraft modelling system, varied networking options, multiple display support, a powerful scripting language and an open architecture. Best of all, being open-source, the simulator is owned by the community and everyone is encouraged to contribute. &lt;br /&gt;
&lt;br /&gt;
Download FlightGear v2018.1 for free from [http://www.flightgear.org/ FlightGear.org]&lt;br /&gt;
&lt;br /&gt;
FlightGear - Fly Free!&lt;br /&gt;
&lt;br /&gt;
== Useability ==&lt;br /&gt;
* Improved control for aircraft carriers&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
* Improved &amp;quot;Classic theme&amp;quot; with better fonts and colours&lt;br /&gt;
* Canvas MapStructure support for SlippyMaps, including VFRCharts, STAMEN, &lt;br /&gt;
* Various improvements to the Launcher&lt;br /&gt;
* Atmospheric Light Scattering renderer: extra volumetric vegetation layers for denser undergrowth&lt;br /&gt;
&lt;br /&gt;
== Scenery ==&lt;br /&gt;
* Volcanos, including Kilauea, Stromboli, Etna, &lt;br /&gt;
* New Hawaii regional texture definitions&lt;br /&gt;
&lt;br /&gt;
== Significant Aircraft Updates ==&lt;br /&gt;
* A new glider: Rolladen-Schneider LS4&lt;br /&gt;
* [[Space Shuttle]] improvements&lt;br /&gt;
* Cessna 182S&lt;br /&gt;
* Amelia - an animated and hard-working co-pilot for the Alouette III capable of taking off and landing&lt;br /&gt;
* Citation II&lt;br /&gt;
* F-14 - various changes including improved carrier operations&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* CH Products Throttle Quadrant supported out-of-the-box.  Thanks to CH Products for providing a sample quadrant.&lt;br /&gt;
* Improved support for Addons&lt;br /&gt;
* Support NMEA traffic alerts (e.g. flarm) to allow FG to feed AI/MP traffic to Nav/moving map clients such as xcsoar, skydemon, skymap&lt;br /&gt;
* Improvements to YASIM, including multiple wing sections, support for whole-stabilizer trim, better information from CLI tools&lt;br /&gt;
* More realistic carrier landings with improvements to the JSBSim arrestor wire behaviour.&lt;br /&gt;
&lt;br /&gt;
[[Category:Changes after 2017.3]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Changelog_2018.1&amp;diff=114370</id>
		<title>Changelog 2018.1</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Changelog_2018.1&amp;diff=114370"/>
		<updated>2018-02-11T07:06:20Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Graphics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{changelogs|prev=2017.3|next=2017.5}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{draft|changelog|This changelog is currently being written for the FlightGear v2018.1 release. Feel free to help! If you are aware of any FlightGear related changes, please add them to the changelog.}}&lt;br /&gt;
&lt;br /&gt;
The FlightGear development team is delighted to announce the v2018.1 &amp;quot;Honolulu&amp;quot; release of FlightGear, the free, open-source flight simulator. This new version contains many exciting new features, enhancements and bugfixes. Highlights in this release include &lt;br /&gt;
Founded in 1997, FlightGear is developed by a worldwide group of volunteers, brought together by a shared ambition to create the most realistic flight simulator possible that is free to use, modify and distribute. FlightGear is used all over the world by desktop flight simulator enthusiasts, for research in universities and for interactive exhibits in museums.&lt;br /&gt;
&lt;br /&gt;
FlightGear features more than 400 aircraft, a worldwide scenery database, a multiplayer environment, detailed sky modelling, a flexible and open aircraft modelling system, varied networking options, multiple display support, a powerful scripting language and an open architecture. Best of all, being open-source, the simulator is owned by the community and everyone is encouraged to contribute. &lt;br /&gt;
&lt;br /&gt;
Download FlightGear v2018.1 for free from [http://www.flightgear.org/ FlightGear.org]&lt;br /&gt;
&lt;br /&gt;
FlightGear - Fly Free!&lt;br /&gt;
&lt;br /&gt;
== Useability ==&lt;br /&gt;
* Improved control for aircraft carriers&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
* Improved &amp;quot;Classic theme&amp;quot; with better fonts and colours&lt;br /&gt;
* Canvas MapStructure support for SlippyMaps, including VFRCharts, STAMEN, &lt;br /&gt;
* Various improvements to the Launcher&lt;br /&gt;
* Atmospheric Light Scattering renderer: extra volumetric vegetation layers for denser undergrowth&lt;br /&gt;
&lt;br /&gt;
== Scenery ==&lt;br /&gt;
* Volcanos, including Kilauea, Stromboli, Etna, &lt;br /&gt;
* New Hawaii regional texture definitions&lt;br /&gt;
&lt;br /&gt;
== Significant Aircraft Updates ==&lt;br /&gt;
* A new glider: Rolladen-Schneider LS4&lt;br /&gt;
* [[Space Shuttle]] improvements&lt;br /&gt;
* Cessna 182S&lt;br /&gt;
* Amelia - an animated and hard-working co-pilot for the Alouette&lt;br /&gt;
* Citation II&lt;br /&gt;
* F-14 - various changes including improved carrier operations &lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* CH Products Throttle Quadrant supported out-of-the-box.  Thanks to CH Products for providing a sample quadrant.&lt;br /&gt;
* Improved support for Addons&lt;br /&gt;
* Support NMEA traffic alerts (e.g. flarm) to allow FG to feed AI/MP traffic to Nav/moving map clients such as xcsoar, skydemon, skymap&lt;br /&gt;
* Improvements to YASIM, including multiple wing sections, support for whole-stabilizer trim, better information from CLI tools&lt;br /&gt;
* More realistic carrier landings with improvements to the JSBSim arrestor wire behaviour.&lt;br /&gt;
&lt;br /&gt;
[[Category:Changes after 2017.3]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114348</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114348"/>
		<updated>2018-02-08T11:17:38Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* The rope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
=== Amelia ===&lt;br /&gt;
&lt;br /&gt;
The helicopter has the option to select a working co-pilot as assistant or flight instructor - Amelia (inspired by aviation pioneer Amelia Earhart). If she is selected as crew option, she can be asked to take over controls for hover flight. As she is simulating a human pilot rather than an AP, she is not dependent on working instruments to do this but will fly by sight. She is (intentionally) not perfect in achieving a static hover state immediately.&lt;br /&gt;
&lt;br /&gt;
When asked to take off or take over controls  {{Key press|Ctrl|t}} , she'll attempt to stabilize the helicopter in static hover and from then on follow instructions to hover into a certain direction or change altitude given via her GUI menu. She is a fairly capable pilot able to stabilize even a moderately bad situation, but don't expect miracles.&lt;br /&gt;
&lt;br /&gt;
While Amelia is flying, there should be no control input given (otherwise the result will be a fight for control). When Amelia takes over, she will always say 'I'm taking controls' and visibly reach for the stick, when she lets go of controls she will lean back and say 'Your controls.' Taking over from Amelia is generally easier if one asks her to hover higher and faster forward before asking for the controls.&lt;br /&gt;
&lt;br /&gt;
Amelia will not work if not selected as crew, nor will she take over during cruise flight (you can use the AP for that purpose).&lt;br /&gt;
&lt;br /&gt;
[[File:Amelia.jpg|600px|Simulated co-pilot Amelia controlling the Alouette-III]]&lt;br /&gt;
&lt;br /&gt;
=== Auto rotation  ===&lt;br /&gt;
&lt;br /&gt;
Auto rotation uses the residual energy stored in the angular momentum of the rotor to land the helicopter in case of a turbine failure. You can cause an engine failure in the air by switching the fuel pump off.&lt;br /&gt;
&lt;br /&gt;
Move collective into full (down) position. Stabilize airspeed using pitch at 40 kt. The helicopter will drop, the potential energy released helps to drive the rotor to about 200 rpm. Close to the ground, pull up to control sinkrate, then quickly use collective for a soft touchdown.&lt;br /&gt;
&lt;br /&gt;
=== Rescue ops     ===&lt;br /&gt;
&lt;br /&gt;
Rescue operations using the helicopter's winch can be tried. To prepare for such an operation:&lt;br /&gt;
&lt;br /&gt;
* check 'Rescue mission' in the configuration dialog&lt;br /&gt;
* open the left rear cabin door&lt;br /&gt;
&lt;br /&gt;
This puts the winch operator in place as soon as the winch is deployed.&lt;br /&gt;
&lt;br /&gt;
When close to the emergency site, deploy the winch (overhead panel switch or {{Key press|Ctrl|w}}), then the winch rope can be extended and pulled in by {{Key press|w}} and {{Key press|Shift|w}}. There's a model of a man hanging from the rope, he'll vanish as soon as the winch rope is hauled fully in.&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|t}} &lt;br /&gt;
|Toggle Amelia takeover&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|w}} &lt;br /&gt;
|Winch down (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|w}} &lt;br /&gt;
|Winch up (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Ctrl|w}} &lt;br /&gt;
|Toggle winch deploy&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|l}} &lt;br /&gt;
|Toggle landing light&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Special Features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Effects ===&lt;br /&gt;
&lt;br /&gt;
The Alouette-III has been furnished with the full suite of [[Procedural Texturing | ALS effects]] to serve as a demonstration how the various effects can be driven from e.g. a Nasal file (here [https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/Alouette-III/Nasal/effect_manager.nas effect_manager.nas]). The effect suite includes&lt;br /&gt;
&lt;br /&gt;
* procedural landing and position lights with lightspots rendered on the ground&lt;br /&gt;
* environment-dependent rotor wash particles - visible rotor wash is increased when the ground is wet or snowy and changes color when the ground is dusty&lt;br /&gt;
* dynamical rotor wash effect for grass blades and water&lt;br /&gt;
* rain drops rendered on the canopy dependent on airspeed&lt;br /&gt;
* interior shadows&lt;br /&gt;
* heat blur of the turbine exhaust&lt;br /&gt;
&lt;br /&gt;
[[File:Alouette effects.jpg|600px|Environment dependent rotor wash particle system]]&lt;br /&gt;
&lt;br /&gt;
The effect manager should be sufficiently self-explanatory to port these effects to other aircraft&lt;br /&gt;
&lt;br /&gt;
=== The rope ===&lt;br /&gt;
&lt;br /&gt;
There is a dynamical rope implementation selectable for the Alouette-III which may not be realistic equipment, but serves to exemplify the concept of a realistically simulated rope in Flightgaer.&lt;br /&gt;
&lt;br /&gt;
The simulation of the rope solves a simplified set of equations of motion for each rope segment, thus the rope will dangle and deform realistically when subject to wind forces, coil when lowered onto the ground, uncoil when dragged over the ground, gradually adjust direction with the helicopter hover direction of motion when dragged further, change dangle dynamics when under load or lowered/raised via the winch and many details more.&lt;br /&gt;
&lt;br /&gt;
[[File:Alouette rope.jpg|600px|The dynamical rope simulation of the Alouette-III]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The math of the rope is contained as a class in [https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/Alouette-III/Nasal/ropeanimation.nas ropeanimation.nas], how to use the rope animation is explained in [https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/Alouette-III/Documentation/README.rope_manager.txt a README file].&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot;&amp;gt;&lt;br /&gt;
Alouette gallery01.jpg|Rain splashes&lt;br /&gt;
Alouette gallery02.jpg|A rescue mission&lt;br /&gt;
Alouette gallery03.jpg|In flight&lt;br /&gt;
Alouette gallery04.jpg|The winch rope&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114347</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114347"/>
		<updated>2018-02-08T11:12:25Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* The rope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
=== Amelia ===&lt;br /&gt;
&lt;br /&gt;
The helicopter has the option to select a working co-pilot as assistant or flight instructor - Amelia (inspired by aviation pioneer Amelia Earhart). If she is selected as crew option, she can be asked to take over controls for hover flight. As she is simulating a human pilot rather than an AP, she is not dependent on working instruments to do this but will fly by sight. She is (intentionally) not perfect in achieving a static hover state immediately.&lt;br /&gt;
&lt;br /&gt;
When asked to take off or take over controls  {{Key press|Ctrl|t}} , she'll attempt to stabilize the helicopter in static hover and from then on follow instructions to hover into a certain direction or change altitude given via her GUI menu. She is a fairly capable pilot able to stabilize even a moderately bad situation, but don't expect miracles.&lt;br /&gt;
&lt;br /&gt;
While Amelia is flying, there should be no control input given (otherwise the result will be a fight for control). When Amelia takes over, she will always say 'I'm taking controls' and visibly reach for the stick, when she lets go of controls she will lean back and say 'Your controls.' Taking over from Amelia is generally easier if one asks her to hover higher and faster forward before asking for the controls.&lt;br /&gt;
&lt;br /&gt;
Amelia will not work if not selected as crew, nor will she take over during cruise flight (you can use the AP for that purpose).&lt;br /&gt;
&lt;br /&gt;
[[File:Amelia.jpg|600px|Simulated co-pilot Amelia controlling the Alouette-III]]&lt;br /&gt;
&lt;br /&gt;
=== Auto rotation  ===&lt;br /&gt;
&lt;br /&gt;
Auto rotation uses the residual energy stored in the angular momentum of the rotor to land the helicopter in case of a turbine failure. You can cause an engine failure in the air by switching the fuel pump off.&lt;br /&gt;
&lt;br /&gt;
Move collective into full (down) position. Stabilize airspeed using pitch at 40 kt. The helicopter will drop, the potential energy released helps to drive the rotor to about 200 rpm. Close to the ground, pull up to control sinkrate, then quickly use collective for a soft touchdown.&lt;br /&gt;
&lt;br /&gt;
=== Rescue ops     ===&lt;br /&gt;
&lt;br /&gt;
Rescue operations using the helicopter's winch can be tried. To prepare for such an operation:&lt;br /&gt;
&lt;br /&gt;
* check 'Rescue mission' in the configuration dialog&lt;br /&gt;
* open the left rear cabin door&lt;br /&gt;
&lt;br /&gt;
This puts the winch operator in place as soon as the winch is deployed.&lt;br /&gt;
&lt;br /&gt;
When close to the emergency site, deploy the winch (overhead panel switch or {{Key press|Ctrl|w}}), then the winch rope can be extended and pulled in by {{Key press|w}} and {{Key press|Shift|w}}. There's a model of a man hanging from the rope, he'll vanish as soon as the winch rope is hauled fully in.&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|t}} &lt;br /&gt;
|Toggle Amelia takeover&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|w}} &lt;br /&gt;
|Winch down (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|w}} &lt;br /&gt;
|Winch up (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Ctrl|w}} &lt;br /&gt;
|Toggle winch deploy&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|l}} &lt;br /&gt;
|Toggle landing light&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Special Features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Effects ===&lt;br /&gt;
&lt;br /&gt;
The Alouette-III has been furnished with the full suite of [[Procedural Texturing | ALS effects]] to serve as a demonstration how the various effects can be driven from e.g. a Nasal file (here [https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/Alouette-III/Nasal/effect_manager.nas effect_manager.nas]). The effect suite includes&lt;br /&gt;
&lt;br /&gt;
* procedural landing and position lights with lightspots rendered on the ground&lt;br /&gt;
* environment-dependent rotor wash particles - visible rotor wash is increased when the ground is wet or snowy and changes color when the ground is dusty&lt;br /&gt;
* dynamical rotor wash effect for grass blades and water&lt;br /&gt;
* rain drops rendered on the canopy dependent on airspeed&lt;br /&gt;
* interior shadows&lt;br /&gt;
* heat blur of the turbine exhaust&lt;br /&gt;
&lt;br /&gt;
[[File:Alouette effects.jpg|600px|Environment dependent rotor wash particle system]]&lt;br /&gt;
&lt;br /&gt;
The effect manager should be sufficiently self-explanatory to port these effects to other aircraft&lt;br /&gt;
&lt;br /&gt;
=== The rope ===&lt;br /&gt;
&lt;br /&gt;
There is a dynamical rope implementation selectable for the Alouette-III which may not be realistic equipment, but serves to exemplify the concept of a realistically simulated rope in Flightgaer.&lt;br /&gt;
&lt;br /&gt;
The simulation of the rope solves a simplified set of equations of motion for each rope segment, thus the rope will dangle and deform realistically when subject to wind forces, coil when lowered onto the ground, uncoil when dragged over the ground, gradually adjust direction with the helicopter hover direction of motion when dragged further, change dangle dynamics when under load or lowered/raised via the winch and many details more.&lt;br /&gt;
&lt;br /&gt;
[[File:Alouette rope.jpg|600px|The dynamical rope simulation of the Alouette-III]]&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot;&amp;gt;&lt;br /&gt;
Alouette gallery01.jpg|Rain splashes&lt;br /&gt;
Alouette gallery02.jpg|A rescue mission&lt;br /&gt;
Alouette gallery03.jpg|In flight&lt;br /&gt;
Alouette gallery04.jpg|The winch rope&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114346</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114346"/>
		<updated>2018-02-08T11:11:59Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Effects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
=== Amelia ===&lt;br /&gt;
&lt;br /&gt;
The helicopter has the option to select a working co-pilot as assistant or flight instructor - Amelia (inspired by aviation pioneer Amelia Earhart). If she is selected as crew option, she can be asked to take over controls for hover flight. As she is simulating a human pilot rather than an AP, she is not dependent on working instruments to do this but will fly by sight. She is (intentionally) not perfect in achieving a static hover state immediately.&lt;br /&gt;
&lt;br /&gt;
When asked to take off or take over controls  {{Key press|Ctrl|t}} , she'll attempt to stabilize the helicopter in static hover and from then on follow instructions to hover into a certain direction or change altitude given via her GUI menu. She is a fairly capable pilot able to stabilize even a moderately bad situation, but don't expect miracles.&lt;br /&gt;
&lt;br /&gt;
While Amelia is flying, there should be no control input given (otherwise the result will be a fight for control). When Amelia takes over, she will always say 'I'm taking controls' and visibly reach for the stick, when she lets go of controls she will lean back and say 'Your controls.' Taking over from Amelia is generally easier if one asks her to hover higher and faster forward before asking for the controls.&lt;br /&gt;
&lt;br /&gt;
Amelia will not work if not selected as crew, nor will she take over during cruise flight (you can use the AP for that purpose).&lt;br /&gt;
&lt;br /&gt;
[[File:Amelia.jpg|600px|Simulated co-pilot Amelia controlling the Alouette-III]]&lt;br /&gt;
&lt;br /&gt;
=== Auto rotation  ===&lt;br /&gt;
&lt;br /&gt;
Auto rotation uses the residual energy stored in the angular momentum of the rotor to land the helicopter in case of a turbine failure. You can cause an engine failure in the air by switching the fuel pump off.&lt;br /&gt;
&lt;br /&gt;
Move collective into full (down) position. Stabilize airspeed using pitch at 40 kt. The helicopter will drop, the potential energy released helps to drive the rotor to about 200 rpm. Close to the ground, pull up to control sinkrate, then quickly use collective for a soft touchdown.&lt;br /&gt;
&lt;br /&gt;
=== Rescue ops     ===&lt;br /&gt;
&lt;br /&gt;
Rescue operations using the helicopter's winch can be tried. To prepare for such an operation:&lt;br /&gt;
&lt;br /&gt;
* check 'Rescue mission' in the configuration dialog&lt;br /&gt;
* open the left rear cabin door&lt;br /&gt;
&lt;br /&gt;
This puts the winch operator in place as soon as the winch is deployed.&lt;br /&gt;
&lt;br /&gt;
When close to the emergency site, deploy the winch (overhead panel switch or {{Key press|Ctrl|w}}), then the winch rope can be extended and pulled in by {{Key press|w}} and {{Key press|Shift|w}}. There's a model of a man hanging from the rope, he'll vanish as soon as the winch rope is hauled fully in.&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|t}} &lt;br /&gt;
|Toggle Amelia takeover&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|w}} &lt;br /&gt;
|Winch down (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|w}} &lt;br /&gt;
|Winch up (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Ctrl|w}} &lt;br /&gt;
|Toggle winch deploy&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|l}} &lt;br /&gt;
|Toggle landing light&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Special Features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Effects ===&lt;br /&gt;
&lt;br /&gt;
The Alouette-III has been furnished with the full suite of [[Procedural Texturing | ALS effects]] to serve as a demonstration how the various effects can be driven from e.g. a Nasal file (here [https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/Alouette-III/Nasal/effect_manager.nas effect_manager.nas]). The effect suite includes&lt;br /&gt;
&lt;br /&gt;
* procedural landing and position lights with lightspots rendered on the ground&lt;br /&gt;
* environment-dependent rotor wash particles - visible rotor wash is increased when the ground is wet or snowy and changes color when the ground is dusty&lt;br /&gt;
* dynamical rotor wash effect for grass blades and water&lt;br /&gt;
* rain drops rendered on the canopy dependent on airspeed&lt;br /&gt;
* interior shadows&lt;br /&gt;
* heat blur of the turbine exhaust&lt;br /&gt;
&lt;br /&gt;
[[File:Alouette effects.jpg|600px|Environment dependent rotor wash particle system]]&lt;br /&gt;
&lt;br /&gt;
The effect manager should be sufficiently self-explanatory to port these effects to other aircraft&lt;br /&gt;
&lt;br /&gt;
=== The rope ===&lt;br /&gt;
&lt;br /&gt;
There is a dynamical rope implementation selectable for the Alouette-III which may not be realistic equipment, but serves to exemplify the concept of a dynamically simulated rope in Flightgaer.&lt;br /&gt;
&lt;br /&gt;
The simulation of the rope solves a simplified set of equations of motion for each rope segment, thus the rope will dangle and deform realistically when subject to wind forces, coil when lowered onto the ground, uncoil when dragged over the ground, gradually adjust direction with the helicopter hover direction of motion when dragged further, change dangle dynamics when under load or lowered/raised via the winch and many details more.&lt;br /&gt;
&lt;br /&gt;
[[File:Alouette rope.jpg|600px|The dynamical rope simulation of the Alouette-III]]&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot;&amp;gt;&lt;br /&gt;
Alouette gallery01.jpg|Rain splashes&lt;br /&gt;
Alouette gallery02.jpg|A rescue mission&lt;br /&gt;
Alouette gallery03.jpg|In flight&lt;br /&gt;
Alouette gallery04.jpg|The winch rope&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Alouette_rope.jpg&amp;diff=114345</id>
		<title>File:Alouette rope.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Alouette_rope.jpg&amp;diff=114345"/>
		<updated>2018-02-08T11:09:37Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=The dynamical rope simulation of the Alouette-III}}&lt;br /&gt;
|date=2018-02-08&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Rope effect]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114344</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114344"/>
		<updated>2018-02-08T11:07:23Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Special Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
=== Amelia ===&lt;br /&gt;
&lt;br /&gt;
The helicopter has the option to select a working co-pilot as assistant or flight instructor - Amelia (inspired by aviation pioneer Amelia Earhart). If she is selected as crew option, she can be asked to take over controls for hover flight. As she is simulating a human pilot rather than an AP, she is not dependent on working instruments to do this but will fly by sight. She is (intentionally) not perfect in achieving a static hover state immediately.&lt;br /&gt;
&lt;br /&gt;
When asked to take off or take over controls  {{Key press|Ctrl|t}} , she'll attempt to stabilize the helicopter in static hover and from then on follow instructions to hover into a certain direction or change altitude given via her GUI menu. She is a fairly capable pilot able to stabilize even a moderately bad situation, but don't expect miracles.&lt;br /&gt;
&lt;br /&gt;
While Amelia is flying, there should be no control input given (otherwise the result will be a fight for control). When Amelia takes over, she will always say 'I'm taking controls' and visibly reach for the stick, when she lets go of controls she will lean back and say 'Your controls.' Taking over from Amelia is generally easier if one asks her to hover higher and faster forward before asking for the controls.&lt;br /&gt;
&lt;br /&gt;
Amelia will not work if not selected as crew, nor will she take over during cruise flight (you can use the AP for that purpose).&lt;br /&gt;
&lt;br /&gt;
[[File:Amelia.jpg|600px|Simulated co-pilot Amelia controlling the Alouette-III]]&lt;br /&gt;
&lt;br /&gt;
=== Auto rotation  ===&lt;br /&gt;
&lt;br /&gt;
Auto rotation uses the residual energy stored in the angular momentum of the rotor to land the helicopter in case of a turbine failure. You can cause an engine failure in the air by switching the fuel pump off.&lt;br /&gt;
&lt;br /&gt;
Move collective into full (down) position. Stabilize airspeed using pitch at 40 kt. The helicopter will drop, the potential energy released helps to drive the rotor to about 200 rpm. Close to the ground, pull up to control sinkrate, then quickly use collective for a soft touchdown.&lt;br /&gt;
&lt;br /&gt;
=== Rescue ops     ===&lt;br /&gt;
&lt;br /&gt;
Rescue operations using the helicopter's winch can be tried. To prepare for such an operation:&lt;br /&gt;
&lt;br /&gt;
* check 'Rescue mission' in the configuration dialog&lt;br /&gt;
* open the left rear cabin door&lt;br /&gt;
&lt;br /&gt;
This puts the winch operator in place as soon as the winch is deployed.&lt;br /&gt;
&lt;br /&gt;
When close to the emergency site, deploy the winch (overhead panel switch or {{Key press|Ctrl|w}}), then the winch rope can be extended and pulled in by {{Key press|w}} and {{Key press|Shift|w}}. There's a model of a man hanging from the rope, he'll vanish as soon as the winch rope is hauled fully in.&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|t}} &lt;br /&gt;
|Toggle Amelia takeover&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|w}} &lt;br /&gt;
|Winch down (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|w}} &lt;br /&gt;
|Winch up (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Ctrl|w}} &lt;br /&gt;
|Toggle winch deploy&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|l}} &lt;br /&gt;
|Toggle landing light&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Special Features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Effects ===&lt;br /&gt;
&lt;br /&gt;
The Alouette-III has been furnished with the full suite of [[Procedural Texturing | ALS effects]] to serve as a demonstration how the various effects can be driven from e.g. a Nasal file (here [https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/Alouette-III/Nasal/effect_manager.nas effect_manager.nas]). The effect suite includes&lt;br /&gt;
&lt;br /&gt;
* procedural landing and position lights with lightspots rendered on the ground&lt;br /&gt;
* environment-dependent rotor wash particles - visible rotor wash is increased when the ground is wet or snowy and changes color when the ground is dusty&lt;br /&gt;
* dynamical rotor wash effect for grass blades and water&lt;br /&gt;
* rain drops rendered on the canopy dependent on airspeed&lt;br /&gt;
* interior shadows&lt;br /&gt;
* heat blur of the turbine exhaust&lt;br /&gt;
&lt;br /&gt;
[[File:Alouette effects.jpg|600px|Environment dependent rotor wash particle system]]&lt;br /&gt;
&lt;br /&gt;
The effect manager should be sufficiently self-explanatory to port these effects to other aircraft&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot;&amp;gt;&lt;br /&gt;
Alouette gallery01.jpg|Rain splashes&lt;br /&gt;
Alouette gallery02.jpg|A rescue mission&lt;br /&gt;
Alouette gallery03.jpg|In flight&lt;br /&gt;
Alouette gallery04.jpg|The winch rope&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Alouette_gallery04.jpg&amp;diff=114343</id>
		<title>File:Alouette gallery04.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Alouette_gallery04.jpg&amp;diff=114343"/>
		<updated>2018-02-08T11:05:48Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=Tha Alouette-III winchrope}}&lt;br /&gt;
|date=2018-02-08&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Helicopters]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Alouette_gallery03.jpg&amp;diff=114342</id>
		<title>File:Alouette gallery03.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Alouette_gallery03.jpg&amp;diff=114342"/>
		<updated>2018-02-08T11:05:48Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=The Alouette-III}}&lt;br /&gt;
|date=2018-02-08&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Helicopters]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Alouette_gallery02.jpg&amp;diff=114341</id>
		<title>File:Alouette gallery02.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Alouette_gallery02.jpg&amp;diff=114341"/>
		<updated>2018-02-08T11:05:48Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=A rescue mission with the Alouette-III}}&lt;br /&gt;
|date=2018-02-08&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Helicopters]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Alouette_gallery01.jpg&amp;diff=114340</id>
		<title>File:Alouette gallery01.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Alouette_gallery01.jpg&amp;diff=114340"/>
		<updated>2018-02-08T11:05:48Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=Rain splashes on the Alouette-III canopy}}&lt;br /&gt;
|date=2018-02-08&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Helicopters]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114339</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114339"/>
		<updated>2018-02-08T10:59:53Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Special Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
=== Amelia ===&lt;br /&gt;
&lt;br /&gt;
The helicopter has the option to select a working co-pilot as assistant or flight instructor - Amelia (inspired by aviation pioneer Amelia Earhart). If she is selected as crew option, she can be asked to take over controls for hover flight. As she is simulating a human pilot rather than an AP, she is not dependent on working instruments to do this but will fly by sight. She is (intentionally) not perfect in achieving a static hover state immediately.&lt;br /&gt;
&lt;br /&gt;
When asked to take off or take over controls  {{Key press|Ctrl|t}} , she'll attempt to stabilize the helicopter in static hover and from then on follow instructions to hover into a certain direction or change altitude given via her GUI menu. She is a fairly capable pilot able to stabilize even a moderately bad situation, but don't expect miracles.&lt;br /&gt;
&lt;br /&gt;
While Amelia is flying, there should be no control input given (otherwise the result will be a fight for control). When Amelia takes over, she will always say 'I'm taking controls' and visibly reach for the stick, when she lets go of controls she will lean back and say 'Your controls.' Taking over from Amelia is generally easier if one asks her to hover higher and faster forward before asking for the controls.&lt;br /&gt;
&lt;br /&gt;
Amelia will not work if not selected as crew, nor will she take over during cruise flight (you can use the AP for that purpose).&lt;br /&gt;
&lt;br /&gt;
[[File:Amelia.jpg|600px|Simulated co-pilot Amelia controlling the Alouette-III]]&lt;br /&gt;
&lt;br /&gt;
=== Auto rotation  ===&lt;br /&gt;
&lt;br /&gt;
Auto rotation uses the residual energy stored in the angular momentum of the rotor to land the helicopter in case of a turbine failure. You can cause an engine failure in the air by switching the fuel pump off.&lt;br /&gt;
&lt;br /&gt;
Move collective into full (down) position. Stabilize airspeed using pitch at 40 kt. The helicopter will drop, the potential energy released helps to drive the rotor to about 200 rpm. Close to the ground, pull up to control sinkrate, then quickly use collective for a soft touchdown.&lt;br /&gt;
&lt;br /&gt;
=== Rescue ops     ===&lt;br /&gt;
&lt;br /&gt;
Rescue operations using the helicopter's winch can be tried. To prepare for such an operation:&lt;br /&gt;
&lt;br /&gt;
* check 'Rescue mission' in the configuration dialog&lt;br /&gt;
* open the left rear cabin door&lt;br /&gt;
&lt;br /&gt;
This puts the winch operator in place as soon as the winch is deployed.&lt;br /&gt;
&lt;br /&gt;
When close to the emergency site, deploy the winch (overhead panel switch or {{Key press|Ctrl|w}}), then the winch rope can be extended and pulled in by {{Key press|w}} and {{Key press|Shift|w}}. There's a model of a man hanging from the rope, he'll vanish as soon as the winch rope is hauled fully in.&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|t}} &lt;br /&gt;
|Toggle Amelia takeover&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|w}} &lt;br /&gt;
|Winch down (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|w}} &lt;br /&gt;
|Winch up (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Ctrl|w}} &lt;br /&gt;
|Toggle winch deploy&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|l}} &lt;br /&gt;
|Toggle landing light&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Special Features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Effects ===&lt;br /&gt;
&lt;br /&gt;
The Alouette-III has been furnished with the full suite of [[Procedural Texturing | ALS effects]] to serve as a demonstration how the various effects can be driven from e.g. a Nasal file (here [https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/Alouette-III/Nasal/effect_manager.nas effect_manager.nas]). The effect suite includes&lt;br /&gt;
&lt;br /&gt;
* procedural landing and position lights with lightspots rendered on the ground&lt;br /&gt;
* environment-dependent rotor wash particles - visible rotor wash is increased when the ground is wet or snowy and changes color when the ground is dusty&lt;br /&gt;
* dynamical rotor wash effect for grass blades and water&lt;br /&gt;
* rain drops rendered on the canopy dependent on airspeed&lt;br /&gt;
* interior shadows&lt;br /&gt;
* heat blur of the turbine exhaust&lt;br /&gt;
&lt;br /&gt;
[[File:Alouette effects.jpg|600px|Environment dependent rotor wash particle system]]&lt;br /&gt;
&lt;br /&gt;
The effect manager should be sufficiently self-explanatory to port these effects to other aircraft&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Alouette_effects.jpg&amp;diff=114338</id>
		<title>File:Alouette effects.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Alouette_effects.jpg&amp;diff=114338"/>
		<updated>2018-02-08T10:51:29Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=Environment dependent rotor wash particle system}}&lt;br /&gt;
|date=2018-02-08&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Shaders]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114337</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114337"/>
		<updated>2018-02-08T10:48:50Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Key bindings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
=== Amelia ===&lt;br /&gt;
&lt;br /&gt;
The helicopter has the option to select a working co-pilot as assistant or flight instructor - Amelia (inspired by aviation pioneer Amelia Earhart). If she is selected as crew option, she can be asked to take over controls for hover flight. As she is simulating a human pilot rather than an AP, she is not dependent on working instruments to do this but will fly by sight. She is (intentionally) not perfect in achieving a static hover state immediately.&lt;br /&gt;
&lt;br /&gt;
When asked to take off or take over controls  {{Key press|Ctrl|t}} , she'll attempt to stabilize the helicopter in static hover and from then on follow instructions to hover into a certain direction or change altitude given via her GUI menu. She is a fairly capable pilot able to stabilize even a moderately bad situation, but don't expect miracles.&lt;br /&gt;
&lt;br /&gt;
While Amelia is flying, there should be no control input given (otherwise the result will be a fight for control). When Amelia takes over, she will always say 'I'm taking controls' and visibly reach for the stick, when she lets go of controls she will lean back and say 'Your controls.' Taking over from Amelia is generally easier if one asks her to hover higher and faster forward before asking for the controls.&lt;br /&gt;
&lt;br /&gt;
Amelia will not work if not selected as crew, nor will she take over during cruise flight (you can use the AP for that purpose).&lt;br /&gt;
&lt;br /&gt;
[[File:Amelia.jpg|600px|Simulated co-pilot Amelia controlling the Alouette-III]]&lt;br /&gt;
&lt;br /&gt;
=== Auto rotation  ===&lt;br /&gt;
&lt;br /&gt;
Auto rotation uses the residual energy stored in the angular momentum of the rotor to land the helicopter in case of a turbine failure. You can cause an engine failure in the air by switching the fuel pump off.&lt;br /&gt;
&lt;br /&gt;
Move collective into full (down) position. Stabilize airspeed using pitch at 40 kt. The helicopter will drop, the potential energy released helps to drive the rotor to about 200 rpm. Close to the ground, pull up to control sinkrate, then quickly use collective for a soft touchdown.&lt;br /&gt;
&lt;br /&gt;
=== Rescue ops     ===&lt;br /&gt;
&lt;br /&gt;
Rescue operations using the helicopter's winch can be tried. To prepare for such an operation:&lt;br /&gt;
&lt;br /&gt;
* check 'Rescue mission' in the configuration dialog&lt;br /&gt;
* open the left rear cabin door&lt;br /&gt;
&lt;br /&gt;
This puts the winch operator in place as soon as the winch is deployed.&lt;br /&gt;
&lt;br /&gt;
When close to the emergency site, deploy the winch (overhead panel switch or {{Key press|Ctrl|w}}), then the winch rope can be extended and pulled in by {{Key press|w}} and {{Key press|Shift|w}}. There's a model of a man hanging from the rope, he'll vanish as soon as the winch rope is hauled fully in.&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|t}} &lt;br /&gt;
|Toggle Amelia takeover&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|w}} &lt;br /&gt;
|Winch down (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|w}} &lt;br /&gt;
|Winch up (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Ctrl|w}} &lt;br /&gt;
|Toggle winch deploy&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|l}} &lt;br /&gt;
|Toggle landing light&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Special Features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114336</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114336"/>
		<updated>2018-02-08T10:47:14Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Key bindings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
=== Amelia ===&lt;br /&gt;
&lt;br /&gt;
The helicopter has the option to select a working co-pilot as assistant or flight instructor - Amelia (inspired by aviation pioneer Amelia Earhart). If she is selected as crew option, she can be asked to take over controls for hover flight. As she is simulating a human pilot rather than an AP, she is not dependent on working instruments to do this but will fly by sight. She is (intentionally) not perfect in achieving a static hover state immediately.&lt;br /&gt;
&lt;br /&gt;
When asked to take off or take over controls  {{Key press|Ctrl|t}} , she'll attempt to stabilize the helicopter in static hover and from then on follow instructions to hover into a certain direction or change altitude given via her GUI menu. She is a fairly capable pilot able to stabilize even a moderately bad situation, but don't expect miracles.&lt;br /&gt;
&lt;br /&gt;
While Amelia is flying, there should be no control input given (otherwise the result will be a fight for control). When Amelia takes over, she will always say 'I'm taking controls' and visibly reach for the stick, when she lets go of controls she will lean back and say 'Your controls.' Taking over from Amelia is generally easier if one asks her to hover higher and faster forward before asking for the controls.&lt;br /&gt;
&lt;br /&gt;
Amelia will not work if not selected as crew, nor will she take over during cruise flight (you can use the AP for that purpose).&lt;br /&gt;
&lt;br /&gt;
[[File:Amelia.jpg|600px|Simulated co-pilot Amelia controlling the Alouette-III]]&lt;br /&gt;
&lt;br /&gt;
=== Auto rotation  ===&lt;br /&gt;
&lt;br /&gt;
Auto rotation uses the residual energy stored in the angular momentum of the rotor to land the helicopter in case of a turbine failure. You can cause an engine failure in the air by switching the fuel pump off.&lt;br /&gt;
&lt;br /&gt;
Move collective into full (down) position. Stabilize airspeed using pitch at 40 kt. The helicopter will drop, the potential energy released helps to drive the rotor to about 200 rpm. Close to the ground, pull up to control sinkrate, then quickly use collective for a soft touchdown.&lt;br /&gt;
&lt;br /&gt;
=== Rescue ops     ===&lt;br /&gt;
&lt;br /&gt;
Rescue operations using the helicopter's winch can be tried. To prepare for such an operation:&lt;br /&gt;
&lt;br /&gt;
* check 'Rescue mission' in the configuration dialog&lt;br /&gt;
* open the left rear cabin door&lt;br /&gt;
&lt;br /&gt;
This puts the winch operator in place as soon as the winch is deployed.&lt;br /&gt;
&lt;br /&gt;
When close to the emergency site, deploy the winch (overhead panel switch or {{Key press|Ctrl|w}}), then the winch rope can be extended and pulled in by {{Key press|w}} and {{Key press|Shift|w}}. There's a model of a man hanging from the rope, he'll vanish as soon as the winch rope is hauled fully in.&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|t}} &lt;br /&gt;
|Toggle Amelia takeover&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|w}} &lt;br /&gt;
|Winch down (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|w}} &lt;br /&gt;
|Winch up (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Ctrl|w}} &lt;br /&gt;
|Toggle winch deploy&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|l}} &lt;br /&gt;
|Toggle landing light&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114335</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114335"/>
		<updated>2018-02-08T10:46:31Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Amelia */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
=== Amelia ===&lt;br /&gt;
&lt;br /&gt;
The helicopter has the option to select a working co-pilot as assistant or flight instructor - Amelia (inspired by aviation pioneer Amelia Earhart). If she is selected as crew option, she can be asked to take over controls for hover flight. As she is simulating a human pilot rather than an AP, she is not dependent on working instruments to do this but will fly by sight. She is (intentionally) not perfect in achieving a static hover state immediately.&lt;br /&gt;
&lt;br /&gt;
When asked to take off or take over controls  {{Key press|Ctrl|t}} , she'll attempt to stabilize the helicopter in static hover and from then on follow instructions to hover into a certain direction or change altitude given via her GUI menu. She is a fairly capable pilot able to stabilize even a moderately bad situation, but don't expect miracles.&lt;br /&gt;
&lt;br /&gt;
While Amelia is flying, there should be no control input given (otherwise the result will be a fight for control). When Amelia takes over, she will always say 'I'm taking controls' and visibly reach for the stick, when she lets go of controls she will lean back and say 'Your controls.' Taking over from Amelia is generally easier if one asks her to hover higher and faster forward before asking for the controls.&lt;br /&gt;
&lt;br /&gt;
Amelia will not work if not selected as crew, nor will she take over during cruise flight (you can use the AP for that purpose).&lt;br /&gt;
&lt;br /&gt;
[[File:Amelia.jpg|600px|Simulated co-pilot Amelia controlling the Alouette-III]]&lt;br /&gt;
&lt;br /&gt;
=== Auto rotation  ===&lt;br /&gt;
&lt;br /&gt;
Auto rotation uses the residual energy stored in the angular momentum of the rotor to land the helicopter in case of a turbine failure. You can cause an engine failure in the air by switching the fuel pump off.&lt;br /&gt;
&lt;br /&gt;
Move collective into full (down) position. Stabilize airspeed using pitch at 40 kt. The helicopter will drop, the potential energy released helps to drive the rotor to about 200 rpm. Close to the ground, pull up to control sinkrate, then quickly use collective for a soft touchdown.&lt;br /&gt;
&lt;br /&gt;
=== Rescue ops     ===&lt;br /&gt;
&lt;br /&gt;
Rescue operations using the helicopter's winch can be tried. To prepare for such an operation:&lt;br /&gt;
&lt;br /&gt;
* check 'Rescue mission' in the configuration dialog&lt;br /&gt;
* open the left rear cabin door&lt;br /&gt;
&lt;br /&gt;
This puts the winch operator in place as soon as the winch is deployed.&lt;br /&gt;
&lt;br /&gt;
When close to the emergency site, deploy the winch (overhead panel switch or {{Key press|Ctrl|w}}), then the winch rope can be extended and pulled in by {{Key press|w}} and {{Key press|Shift|w}}. There's a model of a man hanging from the rope, he'll vanish as soon as the winch rope is hauled fully in.&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|t}} &lt;br /&gt;
|Toggle Amelia takeover&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|w}} &lt;br /&gt;
|Winch down (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|w}} &lt;br /&gt;
|Winch up (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|l}} &lt;br /&gt;
|Toggle landing light&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114334</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114334"/>
		<updated>2018-02-08T10:44:42Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Amelia */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
=== Amelia ===&lt;br /&gt;
&lt;br /&gt;
The helicopter has the option to select a working co-pilot as assistant or flight instructor - Amelia (inspired by aviation pioneer Amelia Earhart). If she is selected as crew option, she can be asked to take over controls for hover flight. As she is simulating a human pilot rather than an AP, she is not dependent on working instruments to do this but will fly by sight. She is (intentionally) not perfect in achieving a static hover state immediately.&lt;br /&gt;
&lt;br /&gt;
When asked to take off or take over controls  {{Key press|Ctrl|t}} , she'll attempt to stabilize the helicopter in static hover and from then on follow instructions to hover into a certain direction or change altitude given via her GUI menu. She is a fairly capable pilot able to stabilize even a moderately bad situation, but don't expect miracles.&lt;br /&gt;
&lt;br /&gt;
While Amelia is flying, there should be no control input given (otherwise the result will be a fight for control). When Amelia takes over, she will always say 'I'm taking controls' and visibly reach for the stick, when she lets go of controls she will lean back and say 'Your controls.' Taking over from Amelia is generally easier if one asks her to hover higher and faster forward before asking for the controls.&lt;br /&gt;
&lt;br /&gt;
Amelia will not work if not selected as crew, nor will she take over during cruise flight (you can use the AP for that purpose).&lt;br /&gt;
&lt;br /&gt;
[[File:Amelia.jpg|600px|Simulated co-pilot Amelia controlling the Alouette-III]]&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|t}} &lt;br /&gt;
|Toggle Amelia takeover&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|w}} &lt;br /&gt;
|Winch down (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|w}} &lt;br /&gt;
|Winch up (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|l}} &lt;br /&gt;
|Toggle landing light&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Amelia.jpg&amp;diff=114333</id>
		<title>File:Amelia.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Amelia.jpg&amp;diff=114333"/>
		<updated>2018-02-08T10:43:59Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=Simulated co-pilot Amelia controlling the Alouette-III}}&lt;br /&gt;
|date=2018-02-08&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Copilot]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114332</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114332"/>
		<updated>2018-02-08T10:42:10Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Amelia */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
=== Amelia ===&lt;br /&gt;
&lt;br /&gt;
The helicopter has the option to select a working co-pilot as assistant or flight instructor - Amelia (inspired by aviation pioneer Amelia Earhart). If she is selected as crew option, she can be asked to take over controls for hover flight. As she is simulating a human pilot rather than an AP, she is not dependent on working instruments to do this but will fly by sight. She is (intentionally) not perfect in achieving a static hover state immediately.&lt;br /&gt;
&lt;br /&gt;
When asked to take off or take over controls  {{Key press|Ctrl|t}} , she'll attempt to stabilize the helicopter in static hover and from then on follow instructions to hover into a certain direction or change altitude given via her GUI menu. She is a fairly capable pilot able to stabilize even a moderately bad situation, but don't expect miracles.&lt;br /&gt;
&lt;br /&gt;
While Amelia is flying, there should be no control input given (otherwise the result will be a fight for control). When Amelia takes over, she will always say 'I'm taking controls' and visibly reach for the stick, when she lets go of controls she will lean back and say 'Your controls.' Taking over from Amelia is generally easier if one asks her to hover higher and faster forward before asking for the controls.&lt;br /&gt;
&lt;br /&gt;
Amelia will not work if not selected as crew, nor will she take over during cruise flight (you can use the AP for that purpose).&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|t}} &lt;br /&gt;
|Toggle Amelia takeover&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|w}} &lt;br /&gt;
|Winch down (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|w}} &lt;br /&gt;
|Winch up (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|l}} &lt;br /&gt;
|Toggle landing light&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114331</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114331"/>
		<updated>2018-02-08T10:40:00Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Key bindings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
=== Amelia ===&lt;br /&gt;
&lt;br /&gt;
The helicopter has the option to select a working co-pilot as assistant or flight instructor - Amelia (inspired by aviation pioneer Amelia Earhart). If she is selected as crew option, she can be asked to take over controls for hover flight. As she is simulating a human pilot rather than an AP, she is not dependent on working instruments to do this but will fly by sight. She is (intentionally) not perfect in achieving a static hover state immediately.&lt;br /&gt;
&lt;br /&gt;
When asked to take off or take over controls, she'll attempt to stabilize the helicopter in static hover and from then on follow instructions to hover into a certain direction or change altitude. She is a fairly capable pilot able to stabilize even a moderately bad situation, but don't expect miracles.&lt;br /&gt;
&lt;br /&gt;
While Amelia is flying, there should be no control input given (otherwise the result will be a fight for control). When Amelia takes over, she will always say 'I'm taking controls' and visibly reach for the stick, when she lets go of controls she will lean back and say 'Your controls.'&lt;br /&gt;
&lt;br /&gt;
Amelia will not work if not selected as crew, nor will she take over during cruise flight (you can use the AP for that purpose).&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|t}} &lt;br /&gt;
|Toggle Amelia takeover&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|w}} &lt;br /&gt;
|Winch down (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|w}} &lt;br /&gt;
|Winch up (needs to be deployed)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|l}} &lt;br /&gt;
|Toggle landing light&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114330</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114330"/>
		<updated>2018-02-08T10:37:56Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Autopilot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
=== Amelia ===&lt;br /&gt;
&lt;br /&gt;
The helicopter has the option to select a working co-pilot as assistant or flight instructor - Amelia (inspired by aviation pioneer Amelia Earhart). If she is selected as crew option, she can be asked to take over controls for hover flight. As she is simulating a human pilot rather than an AP, she is not dependent on working instruments to do this but will fly by sight. She is (intentionally) not perfect in achieving a static hover state immediately.&lt;br /&gt;
&lt;br /&gt;
When asked to take off or take over controls, she'll attempt to stabilize the helicopter in static hover and from then on follow instructions to hover into a certain direction or change altitude. She is a fairly capable pilot able to stabilize even a moderately bad situation, but don't expect miracles.&lt;br /&gt;
&lt;br /&gt;
While Amelia is flying, there should be no control input given (otherwise the result will be a fight for control). When Amelia takes over, she will always say 'I'm taking controls' and visibly reach for the stick, when she lets go of controls she will lean back and say 'Your controls.'&lt;br /&gt;
&lt;br /&gt;
Amelia will not work if not selected as crew, nor will she take over during cruise flight (you can use the AP for that purpose).&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114329</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114329"/>
		<updated>2018-02-08T10:36:45Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Aircraft help */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
The Alouette-III is equipped with in-sim checklists and tooltips for ease of use - to start the engines, follow the checklist. Most controls are implemented via clickspots in the 3d cockpit, only difficult to reach controls have key bindings.&lt;br /&gt;
&lt;br /&gt;
=== Autopilot ===&lt;br /&gt;
&lt;br /&gt;
The helicopter comes with a simple autopilot which can hold altitude and heading or follow the heading bug. The AP is designed to help you fly the helicopter, not to fly it for you - it expects a well-trimmed craft, do not engage the AP during dynamical maneuvers.&lt;br /&gt;
&lt;br /&gt;
To engage the AP, make sure you're flying straight and level and use the pedals to null drift. First flick the AP master switch  {{Key press|Ctrl|a}} - this makes the AP take over pedal controls. Next engage heading-hold mode {{Key press|Ctrl|h}}  and be prepared to deal with transient altitude changes. Then trim the helicopter well in the pitch axis such that you can let go of the controls for at least 10 seconds without loss of control. Once that is the case, engage altitude hold mode to lock current altitude {{Key press|Ctrl|l}} .&lt;br /&gt;
&lt;br /&gt;
Once the Alouette is in stable flight, you can control it via the heading bug on the heading indicator by engaging the heading bug acquire mode {{Key press|Ctrl|b}} . You have very limited control over airspeed using the collective.&lt;br /&gt;
&lt;br /&gt;
Do not change trim while the AP is on, and do not move your controls around, or you will have to fight nasty transients when you disengage the AP again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key bindings ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|a}} &lt;br /&gt;
|AP master switch&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|b}} &lt;br /&gt;
|AP lock course to heading bug&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|h}} &lt;br /&gt;
|AP lock course to current heading&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|CTRL|l}} &lt;br /&gt;
|AP lock current altitude&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III/info&amp;diff=114328</id>
		<title>Alouette-III/info</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III/info&amp;diff=114328"/>
		<updated>2018-02-08T10:26:32Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{infobox aircraft&lt;br /&gt;
| name           = Aérospatiale Alouette III&lt;br /&gt;
| hangar         = fgaddon&lt;br /&gt;
| aircraft       = Alouette-III&lt;br /&gt;
| image          = Alouette-III-new.jpg&lt;br /&gt;
| type           = Helicopter/Civil utility aircraft/Light aircraft/VTOL aircraft&lt;br /&gt;
| config         = Tricycle landing gear aircraft/Fixed gear aircraft&lt;br /&gt;
| propulsion     = Single-engine aircraft/Turboprop aircraft&lt;br /&gt;
| manufacturer   = Sud Aviation/Aérospatiale&lt;br /&gt;
| authors        = Gerard Robin/David/Josh (FDM)/Thorsten Renk&lt;br /&gt;
| fdm            = JSBSim&lt;br /&gt;
| fgname1        = Alouette-III_sc&lt;br /&gt;
| status-fdm     = 3&lt;br /&gt;
| status-systems = 3&lt;br /&gt;
| status-cockpit = 3&lt;br /&gt;
| status-model   = 3&lt;br /&gt;
| navbar         = 1&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
This is the aircraft infobox subpage of the [[Alouette-III]].&lt;br /&gt;
[[Category:Aircraft infobox documentation]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Alouette-III-new.jpg&amp;diff=114327</id>
		<title>File:Alouette-III-new.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Alouette-III-new.jpg&amp;diff=114327"/>
		<updated>2018-02-08T10:26:08Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=The Alouette-III helicopter}}&lt;br /&gt;
|date=2018-02-08&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Helicopters]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114326</id>
		<title>Alouette-III</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Alouette-III&amp;diff=114326"/>
		<updated>2018-02-08T10:22:56Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
{{for|the Alouette III from the [[:Category:GRTux hangar|GRTux hangar]]|Aérospatiale Alouette III}}&lt;br /&gt;
The '''Aérospatiale Alouette III''' (French for Skylark) is a single-engine, light utility [[helicopter]] developed by Sud Aviation and later manufactured by Aérospatiale of France. The Alouette III is the successor to the [[Aérospatiale Alouette II|Alouette II]], being larger and having more seating.&lt;br /&gt;
&lt;br /&gt;
The helicopter has a long operational history in the air forces or navies of many different countries.&lt;br /&gt;
&lt;br /&gt;
== Aircraft help ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
!Key&lt;br /&gt;
!Function&lt;br /&gt;
|-&lt;br /&gt;
|{{key press|} }}&lt;br /&gt;
|Electric power ON and start engines and rotor gear ON.&lt;br /&gt;
|-&lt;br /&gt;
|{{key press|{}}&lt;br /&gt;
|Shutdown engines and electric power OFF.&lt;br /&gt;
|-&lt;br /&gt;
|{{key press|d}}&lt;br /&gt;
|Toggle passengers door (left door).&lt;br /&gt;
|-&lt;br /&gt;
|{{key press|N}}&lt;br /&gt;
|Toggle rotor brake.&lt;br /&gt;
|-&lt;br /&gt;
|{{key press|B}}&lt;br /&gt;
|Toggle brake-parking.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The helicopter is loaded with the following settings:&lt;br /&gt;
* Electric power OFF.&lt;br /&gt;
* Engines and Rotor Gear OFF.&lt;br /&gt;
* Rotor Brake ON.&lt;br /&gt;
* Brake-Parking ON.&lt;br /&gt;
&lt;br /&gt;
=== Startup ===&lt;br /&gt;
# Set Electric Power ON, Rotor Brake OFF.&lt;br /&gt;
# Start the engine and rotorgear ON {{key press|} }}.&lt;br /&gt;
&lt;br /&gt;
=== Shutdown ===&lt;br /&gt;
# Set Electric Power, Engine and Rotorgear OFF {{key press|{}}.&lt;br /&gt;
&lt;br /&gt;
{{Aérospatiale}}&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Procedural_texturing&amp;diff=114281</id>
		<title>Procedural texturing</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Procedural_texturing&amp;diff=114281"/>
		<updated>2018-02-04T07:40:30Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* The dirt runway effect */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
&lt;br /&gt;
'''Procedural texturing''' is a set of techniques where the color of a pixel is not determined by a texture image but fully or partially by evaluating a mathematical function. This article describes why procedural texturing is useful, what it can and can't do and how it is used and configured in [[FlightGear]].&lt;br /&gt;
&lt;br /&gt;
== The terrain texturing challenge ==&lt;br /&gt;
&lt;br /&gt;
The FlightGear terrain is segmented into different landclasses (Urban, Ocean, Glacier, ShrubCover,...) which describe what the terrain at a location is like. In the default texturing scheme, the file '''materials.xml''' is used to describe (among other things) what texture sheet is mapped onto a given landclass.&lt;br /&gt;
&lt;br /&gt;
A typical terrain texture sheet has 512x512 pixels and is mapped onto a 2000m x 2000m sized area, which means that each pixel covers a 4m x 4m area in unsloped terrain. For the sake of the argument, assume the texture has a size of 300 kB in compressed form which expands to about 1 MB in the GPU memory after mipmapping.&lt;br /&gt;
&lt;br /&gt;
The optimal distance to view the texture is when every texture pixel corresponds to a pixel on the screen, as then the maximum possible detail of the texture is exploited. Assuming a 60 deg field of view looking straight down onto the texture, that distance is about 2500 m.&lt;br /&gt;
&lt;br /&gt;
If the texture is seem from a much larger distance, it does not large enough to cover the terrain, and hence it is automatically repeated. From about 3 times the optimal distance, this repetition creates a visually rather pronounced pattern which is referred to as tiling:&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|center|An example for texture tiling]]&lt;br /&gt;
&lt;br /&gt;
If the texture is seen from a much smaller distance, a single texture pixel covers multiple screen pixels, which makes the terrain look coarse-grained and unrealistic:&lt;br /&gt;
&lt;br /&gt;
[[File:resolution_example.jpg|400px|center|An example for low texture resolution]]&lt;br /&gt;
&lt;br /&gt;
A third problem occurs because the boundaries of the landclasses are vector data, i.e. they appear as unnaturally sharp division lines between different textures.&lt;br /&gt;
&lt;br /&gt;
Thus, the main challenges for realistic terrain texturing can be summarized as the three areas&lt;br /&gt;
&lt;br /&gt;
* tiling&lt;br /&gt;
* resolution&lt;br /&gt;
* boundaries&lt;br /&gt;
&lt;br /&gt;
=== Addressing the challenges ===&lt;br /&gt;
&lt;br /&gt;
Tiling and resolution are correlated problems, i.e. many solution to one tend to make the other worse. For instance, resolution can easily be dealt with by mapping the texture sheet onto a smaller area, say 500m x 500 m, which gives a pixel size of 1m. However, then tiling becomes apparent from just 1500 m distance, i.e. almost inevitably.&lt;br /&gt;
&lt;br /&gt;
Tiling is also reduced if the variation of contrast inside a texture is reduced, i.e. the texture becomes more 'dull' and the pattern repetition is less obvious:&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|An example for texture tiling]]&lt;br /&gt;
[[File:contrast_reduction.jpg|400px|Reduced contrast makes the problem less apparent]]&lt;br /&gt;
&lt;br /&gt;
However, contrasts within a texture are the best way to distract the eye from the sharp landclass boundaries, so if one uses low contrast textures, the landclass boundary problem gets often worse.&lt;br /&gt;
&lt;br /&gt;
Tiling can also be reduced at the expense of texture detail if a single texture sheet is mapped onto a larger area.&lt;br /&gt;
&lt;br /&gt;
To some degree, all problems lessen with increased texture resolution - using 4096x4096 texture sheets allow 0.5m x 0.5m resolution if mapped onto the same areas - but memory consumption quickly becomes as issue as a single texture sheet of that size uses ~64 MB of graphic memory already. &lt;br /&gt;
&lt;br /&gt;
=== Photo texturing ===&lt;br /&gt;
&lt;br /&gt;
The tiling problem can be solved if each 2000m x 2000m area to be textured does not get the same texture sheet. If aerial imagery is used (see [[Photoscenery]]) then also the landclass boundary is solved. However, this inevitably creates a resolution problem. To see this, consider the following numbers: On a clear day, the visibility from airliner cruise altitude can easily be 120 km. This means that 45.000 square kilometers of terrain are visible at any given time. Using 2000mx2000m mapped texture sheets as in the example above, unique terrain texturing then needs 11.000 different texture sheets with a size of 1 MB each in graphic memory, or about 11 GB of graphic memory, quite exceeding the capabilities of modern graphic cards. Assuming that about 1 GB of graphic memory is available for terrain textures (clouds, models, the cockpit,... also need memory), the individual pixel must have a size of 12 m x 12 m or larger, which means that photoscenery can either not be used for large visibility, or has a terrible resolution from close-up, or uses a LOD scheme (the above photoscenery would still use 3 GB of harddisk space though).&lt;br /&gt;
&lt;br /&gt;
Photo-texturing has other disadvantages - for instance the photographs are usually taken in a particular season in certain light, so the scene may easily seem unrealistic or wrong in a different season or at a different time of the day. FlightGear texturing also encodes meta-information (where on a texture to place trees or buildings) - such meta-information can not easily be encoded in photoscenery.&lt;br /&gt;
&lt;br /&gt;
=== Procedural texturing ===&lt;br /&gt;
&lt;br /&gt;
Procedural texturing is a solution to both the tiling and the resolution problem, and partially also for the boundary problem. A mathematical function, unlike a lookup table (which a texture in essence is) does not end at any boundary, i.e. it can simply be used across the whole scene without ever creating a repetition. Using a suitable noise function to mix various textures, a complete de-tiling effect can be achieved (this is really the same scene):&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|An example for texture tiling]]&lt;br /&gt;
[[File:procedural_detiling.jpg|400px|Procedural texturing removes the tiling]]&lt;br /&gt;
&lt;br /&gt;
A function can also be evaluated at any scale resolution. Unlike a texture which needs to be stored regardless if it is used or not, a function only needs to be evaluated for every screen pixel, i.e. the workload and memory requirement do not grow quadratically with the needed resolution but only linear. This scaling allows to dynamically add details to the scene as one gets closer (this is really the same scene):&lt;br /&gt;
&lt;br /&gt;
[[File:resolution_example.jpg|400px|An example for low texture resolution]]&lt;br /&gt;
[[File:procedural_resolution.jpg|400px|Procedural texturing adds details at close range]]&lt;br /&gt;
&lt;br /&gt;
== Building blocks of procedural texturing ==&lt;br /&gt;
&lt;br /&gt;
Mathematical functions can describe quite complex structures, but in order to be rendered in real time, the function has to evaluate fast enough. This means that 'simple' textures like snow, or possibly sand or rock can be completely procedural, while more complex shapes like agriculture which shows fields, crops, access paths and drains can remain a texture with some structure added procedurally. In general, a mixture of textures and functions is used for best effect. &lt;br /&gt;
&lt;br /&gt;
The most important building blocks of procedural texturing are noise functions. A noise function is a function which takes the coordinates of a pixel as input and returns a pseudo-random number between 0 and 1 as output. Noise functions aren't uniquely defined, and there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
=== Perlin noise ===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Perlin_noise '''Perlin noise'''] is noise which exists at a certain scale (say 10 m). It is built by dividing the scene into a 10m x 10 m grid, creating random values at each grid point and interpolating smoothly between the grid points. The function created that way varies typically at a scale of 10 m, but not at much smaller scales and averages to 0.5 at much larger scales. Perlin noise isn't so useful at just a single scale, but noise at several scales added together can achieve a very realistic effect of roughness and structure. Finding the correct noise frequencies and amplitudes for blending Perlin noise to a realistic appearance is an art rather than a computational task.&lt;br /&gt;
&lt;br /&gt;
=== Sparse dot noise ===&lt;br /&gt;
&lt;br /&gt;
For sparse dot noise, the terrain is divided into a grid at certain scale, then random values at the grid edges are used to determine if a dot is placed into the cell, where into the cell it is placed and what radius it has. Based on the distance to the dot, the function returns 0 if the point probed is far from the dot and 1 at the dot position. &lt;br /&gt;
&lt;br /&gt;
From the superposition of several sparse dot distributions, dense dot distributions can be created. Note that a sparse dot distribution does not average to 0.5 but, dependent on the details of the implementation, to a much lower value.&lt;br /&gt;
&lt;br /&gt;
=== Stratified noise ===&lt;br /&gt;
&lt;br /&gt;
Stratified noise uses the terrain mesh altitude information to draw bands of constant altitude which each have a random number associated. The bands are then distorted in width by an altitude-dependent random number and modulated with an (xy)-position dependent random number. Stratified noise is rather useful for some types of rock formations.&lt;br /&gt;
&lt;br /&gt;
=== Domain noise ===&lt;br /&gt;
&lt;br /&gt;
The idea of domain noise is to segment the terrain into discrete patches, each of which has a random number associated. Unlike for Perlin noise, the number is not interpolated, it suddenly jumps at the domain boundary to a different value.&lt;br /&gt;
&lt;br /&gt;
The FG implementation of domain noise uses a regular grid at some wavelength, then distorts the grid points by random numbers and uses [http://en.wikipedia.org/wiki/Voronoi '''Voronoi tiling'''] to determine the domains within the distorted grid. This creates domains with a controllable irregularity which are all about the same size.&lt;br /&gt;
&lt;br /&gt;
Domain noise is very useful for man-made patterns, e.g. managed forest, agriculture or cities.&lt;br /&gt;
&lt;br /&gt;
=== Slope line noise ===&lt;br /&gt;
&lt;br /&gt;
For slope line noise, the terrain is segmented in patches, and based on the normal of the terrain, a line along the direction of steepest descent is drawn on the patch, with precise line position and thickness modulated by random numbers. This type of noise mixed into Perlin noise can give a good impression of snow distributions on steep slope or erosion patterns on terrain.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
To the left is an example for domain noise scaling the size of trees in patches of few hundred meters size, thus giving the impression of the different age of forest patches in a managed forest. On the right is an example of slopeline noise, emphasizing the vertical structure of the granite walls in Yosemite National Park.&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_forest.jpg|400px|Domain noise for forest]] [[File:Southwest08.jpg|375px|Slope line noise for Yosemite granite]]&lt;br /&gt;
&lt;br /&gt;
=== Terrain probing functions ===&lt;br /&gt;
&lt;br /&gt;
The underlying terrain can also be used as input for functions in a different way. Commonly used functions are for instance the altitude of a terrain pixel (for instance to determine the snow line) or its slope (to place rock textures on steep slopes). Since the underlying vector geometry of the terrain mesh leads to very sharp division lines, usually terrain probing functions are mixed with some noise for a more realistic appearance.&lt;br /&gt;
&lt;br /&gt;
=== Pixel color postprocessing ===&lt;br /&gt;
&lt;br /&gt;
Many environmental effects can be simulated at the simple expense of post-processing the color of a terrain pixel. For instance, mixing every pixel with a constant dust color can give the terrain a dusty appearance, mixing the final pixel color with a mossy green can give it an overgrown appearance. This is similar to the way pixel color is adjusted for fog, but unlike fog effects environment pixel color postprocessing does not involve distance computations between eye and pixel, rather the color is adjusted independent of the distance (but possibly dependent on terrain gradient or altitude).&lt;br /&gt;
&lt;br /&gt;
== Procedural terrain texturing in Flightgear ==&lt;br /&gt;
&lt;br /&gt;
As of Flightgear 2.10+, procedural texturing of the terrain is done by a general terrain shader which is configurable from &amp;lt;b&amp;gt;materials.xml&amp;lt;/b&amp;gt;. The creation of separate effects for various terrain types is not required (but still possible if so desired). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Currently the following requires that [[Atmospheric light scattering]] is on!&amp;lt;/b&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Basic texturing scheme ===&lt;br /&gt;
&lt;br /&gt;
The texturing scheme is controlled on a per-landclass basis from &amp;lt;b&amp;gt;materials.xml&amp;lt;/b&amp;gt;. The relevant sections for procedural textruring in each material declaration are &amp;lt;texture-set&amp;gt; and &amp;lt;parameters&amp;gt;. Here the &amp;lt;texture-set&amp;gt; block controls what textures are used whereas the &amp;lt;parameters&amp;gt; block controls how these textures are used. &lt;br /&gt;
&lt;br /&gt;
Another important part are &amp;lt;xsize&amp;gt; and &amp;lt;ysize&amp;gt; (the sections which describes to which size in meters the base texture is mapped). The procedural texturing shader computes the size of all used textures &amp;lt;i&amp;gt;relative&amp;lt;/i&amp;gt; to the base texture size, so if a base texture is declared to have a size of 500 m rather than the default 2000 m, the resolution of the hires overlay or the grain texture will automatically also be 5 times higher then default - which may or may not be desired.&lt;br /&gt;
&lt;br /&gt;
The individual textures which can be used are:&lt;br /&gt;
&lt;br /&gt;
==== Base texture ====&lt;br /&gt;
&lt;br /&gt;
The base texture is used as in the default scheme to give the basic appearance of a landclass. The base texture is assumed to be opaque, and its alpha channel is hence not evaluated to transparent, but rather used to encode where the autumn color effect should be used. An alpha value of 0.5 is appropriate for deciduous forests which should get a strong red-orange appearance in autumn, a value of 0.8-0.9 is more appropriate for grass surfaces.&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|center|Base Texture]]&lt;br /&gt;
&lt;br /&gt;
The base texture can take some additional parameters. The first is intrinsic wetness. If the quality level of the shader supports it, this will make the texture appear wet and add sparkling specular reflections to the terrain even if the surrounding terrain is dry. The dust resistance acts in the opposite way, it is intended for irrigated terrain in desert areas and is a multiplier for the dust effect, i.e. a value of 0.0 will make a landclass completely impervious to dust. Finally, rock strata represents an integer flag whether a stratified pattern will be drawn on vertical surfaces or not.  &lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;intrinsic_wetness&amp;gt;0.0&amp;lt;/intrinsic_wetness&amp;gt;&lt;br /&gt;
  &amp;lt;dust_resistance&amp;gt;1.0&amp;lt;/dust_resistance&amp;gt;&lt;br /&gt;
  &amp;lt;rock_strata&amp;gt;0&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value of intrinsic wetness is zero, the parameter can range from 0 (dry) to 1 (very wet, lots of open water). The defaul value of duse resistance is one, and the parameter can range from 1 (gets dusty like everything else) to 0 (impervious to dust).&lt;br /&gt;
&lt;br /&gt;
==== The overlay texture ====&lt;br /&gt;
&lt;br /&gt;
The overlay texture is a texture at a similar resolution level which is mixed with the base texture to achieve de-tiling or gradient effects. By default, it covers about 50% of the available scene. As for the base texture, the alpha channel of the overlay texture encodes color rotations in autumn.&lt;br /&gt;
&lt;br /&gt;
[[File:overlay1.jpg|400px|center|The overlay Texture]]&lt;br /&gt;
&lt;br /&gt;
The overlay texture can be used in two different modes or a mixture of them. The control parameter is &amp;lt;transition_model&amp;gt; - if this parameter is set to 0, the transition between base and overlay texture is determined by a noise function. If the parameter is set to 1, the slope of the terrain determines the transition and the overlay texture is only used on steep slopes. A setting of 0.5 uses a mixture of noise and slope information to drive the transition.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default texture selected is void.png which corresponds to no overlay texture.&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;transition_model&amp;gt;0.5&amp;lt;/transition_model&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.5, the parameter can range from 0 (random transition) to 1 (gradient-driven transition).&lt;br /&gt;
&lt;br /&gt;
==== The hires texture ====&lt;br /&gt;
&lt;br /&gt;
The hires texture adds patches of a texture at much higher resolution into the mix, which both add to de-tiling and lead to a better experience of the scenery from close-up. The hires textured patches will however inevitably appear featureless from large distance and will show tiling themselves, so the amount of hires texture as well as the hires texture sheet itself must be designed carefully.&lt;br /&gt;
&lt;br /&gt;
The areas covered by the hires texture will (partially to mask tiling of the hires patches) receive a stronger bumpmap and some distortion than the rest of the terrain by the shader.&lt;br /&gt;
&lt;br /&gt;
As for the base texture, the alpha channel of the hires texture encodes color rotations in autumn.&lt;br /&gt;
&lt;br /&gt;
[[File:overlay02.jpg|400px|center|The hires Texture]]&lt;br /&gt;
&lt;br /&gt;
The parameter &amp;lt;hires_overlay_bias&amp;gt; controls the fraction of terrain covered by the hires texture patches - by default about 40% of the scene will be covered. Positive or negative biases can make the fraction arbitrarily small or large.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default texture selected is void.png which corresponds to no hires texture. The hires texture does not require the overlay texture to be declared.&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;hires_overlay_bias&amp;gt;0.0&amp;lt;/hires_overlay_bias&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.0, the parameter can range from -0.5 (strong suppression of the hires overlay texture) to +0.5 (strong enhancement of the hires overlay texture).&lt;br /&gt;
&lt;br /&gt;
==== The gradient texture ====&lt;br /&gt;
&lt;br /&gt;
The gradient texture is exclusively used for steep terrain gradients (significantly steeper than the point at which the overlay texture may be used) to account for the fact that beyond a certain slope, terrain can not have vegetation cover and hence landclass information needs to be corrected if necessary.&lt;br /&gt;
&lt;br /&gt;
The default texture is rock.png which is hence used for all landclasses unless specifically declared otherwise. The default may be inappropriate in some regions (volcanic terrain with different rock hue, tropical terrain in which even steep slopes are covered) - the gradient texture then needs to be declared a different texture for all materials in the area. Declaring void.png will not use a gradient texture.&lt;br /&gt;
&lt;br /&gt;
The gradient texture does not use any parameters.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== The grain texture ====&lt;br /&gt;
&lt;br /&gt;
The grain texture adds a grainy pattern to the terrain at close distances, giving the appearance of better resolution. The grain texture parses the texture alpha channel as transparency (since it just superimposes a pattern), so here the alpha channel can not be used to encode vegetation effects, and the grain texture may not have a strong color.&lt;br /&gt;
&lt;br /&gt;
[[File:grain_texture.jpg|400px|center|The grain overlay texture]]&lt;br /&gt;
&lt;br /&gt;
To allow fine-tuning of the grain effect, the texture can be multiplied with the &amp;lt;grain_strength&amp;gt; parameter which sets the overall alpha of the grain effect - a low value works best on bright base textures whereas dark base textures may require a stronger grain.&lt;br /&gt;
&lt;br /&gt;
The default grain texture is grain_texture.png which adds a vegetation-like grain. This can be replaced with other grain patterns or void.png for no grain where appropriate.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain_strength&amp;gt; 0.5&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.5 and the parameter range is 0 (completely transparent) to 1 (completely opaque).&lt;br /&gt;
&lt;br /&gt;
==== The dot texture ====&lt;br /&gt;
&lt;br /&gt;
The dot overlay uses sparse dot noise to create detail in the scene. Sparse dot noise textured with a rock texture can give the appearance of boulders scattered across the terrain, the same noise textured with a grass texture can be used to create round vegetation patches.&lt;br /&gt;
&lt;br /&gt;
[[File:hires_terrain03.jpg|400px|center|The dot overlay texture creating grass patches]]&lt;br /&gt;
&lt;br /&gt;
Both the dot size and the dot density can be controlled by the user. The range out to which the dots are visible is automatically adjusted based on the dot size scale. By default, the dot texture is set to void.png, which means that no dot texture is used.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;dot_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;dot_density&amp;gt; 1.0&amp;lt;/dot_density&amp;gt;&lt;br /&gt;
  &amp;lt;dot_size&amp;gt; 1.0&amp;lt;/dot_size&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value for &amp;lt;dot_density&amp;gt; is 1.0, the parameter can be set in the range from 0.0 to 1.0 (values above 1.0 do not increase the dot density further). The default value for &amp;lt;dot_size&amp;gt; is also 1.0, which creates dots at size scales varying between 10 cm and few m. The parameter is a multiplier for these default values, i.e. at a value of 10 dots of ~10-20 m size are created.&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
The following declaration&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;texture-set&amp;gt;&lt;br /&gt;
   &amp;lt;texture&amp;gt;Terrain/marsh2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;Terrain/grass_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;Terrain/marsh4a.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
   &amp;lt;grain_strength&amp;gt;0.9&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
   &amp;lt;intrinsic_wetness&amp;gt;0.6&amp;lt;/intrinsic_wetness&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in marshland drawn like this&lt;br /&gt;
&lt;br /&gt;
[[File:marsh_example.jpg|400px|Procedural marshland close-up]]&lt;br /&gt;
[[File:wetness.jpg|400px|Procedural marshland from the distance]]&lt;br /&gt;
&lt;br /&gt;
The following declaration&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;texture&amp;gt;Terrain/shrub-hawaii.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;Terrain/sand_hires_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;Terrain/rock_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;Terrain/rock_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;Terrain/grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
   &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;rock_strata&amp;gt;1&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
   &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in stratified rock structures like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Southwest04.jpg|400px|Procedural rock Grand Canyon]]&lt;br /&gt;
[[File:Southwest09.jpg|400px|Procedural rock Zion National Park]]&lt;br /&gt;
&lt;br /&gt;
=== The agriculture effect ===&lt;br /&gt;
&lt;br /&gt;
The basic texture scheme based on Perlin noise is of limited value for e.g. agricultural terrain which rarely shows the organic shapes generated by Perlin noise. For such terrain, the agriculture effect should be used instead which is based on Perlin noise.&lt;br /&gt;
&lt;br /&gt;
The effect needs to be declared for the landclass as&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;effect&amp;gt;Effects/agriculture&amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(note that since the default rendering scheme has typically the crop effect associated with agriculture, this declaration inherits crop.eff).&lt;br /&gt;
&lt;br /&gt;
By default, large patches of agriculture usually show strong tiling:&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro01.jpg|400px|center|Tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
It is implemented in two modes, overlay and rotation. Since the agriculture effect is optional, its overlay texture is declared separately from the normal declaration above as follows:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the overlay texture is declared void.png (to which the effect defaults), it is not used. The effect takes a number of parameters. For the overlay, the fraction taken by the overlay texture and the scale at which the patches are drawn can be specified through the overlay fraction and the overlay scale, while the shape of the domains can be controlled using a distortion factor.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;overlay_fraction&amp;gt;0.5&amp;lt;/overlay_fraction&amp;gt;&lt;br /&gt;
   &amp;lt;overlay_scale&amp;gt;1000.0&amp;lt;/overlay_scale&amp;gt;&lt;br /&gt;
   &amp;lt;distortion_factor&amp;gt;0.3&amp;lt;/distortion_factor&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This results in the overlay texture superimposed in irregular patches. &lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro03.jpg|400px|center|Overlay de-tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
De-tiling can also be achieved by rotating the texture coordinates inside patches. This is controlled by a rotation flag which can be set to 1 (random rotation) or 2 (rotation by multiples of 90 degrees only) in addition to a rotation scale. In case of very regular textures which should be rotated by multiples of 90 degrees only, uv texture coordinate offsets are provided to align texture and rotated domain.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;rotation_flag&amp;gt;1&amp;lt;/rotation_flag&amp;gt;&lt;br /&gt;
   &amp;lt;rotation_scale&amp;gt;2000.0&amp;lt;/rotation_scale&amp;gt;&lt;br /&gt;
   &amp;lt;uv_xoffset&amp;gt;0.0&amp;lt;/uv_xoffset&amp;gt;&lt;br /&gt;
   &amp;lt;uv_yoffset&amp;gt;0.0&amp;lt;/uv_yoffset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using domain rotation also leads to a reasonable de-tiling while keeping the color impression.&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro02.jpg|400px|center|Overlay de-tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
Both rotation and overlay can be combined. Neither of the effects is compatible with patterns of random trees of buildings created by placement masks, as these are used at tile loading time and can not be changed runtime like shader effects.&lt;br /&gt;
&lt;br /&gt;
=== The rock effect ===&lt;br /&gt;
&lt;br /&gt;
Specifically for rock, a completely procedural scheme to generate various types of rock structures is available. Since this is computationally about on par with the overlay texture schemes for generic terrain, it activates only at highest rendering quality level.&lt;br /&gt;
&lt;br /&gt;
The effect needs to be declared for the landclass as&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;effect&amp;gt;Effects/rock&amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rock is drawn by overlaying several structure layers. The base layer is set by several octaves of Perlin noise superimposed as brightness variation onto a specified texture color. The relevant configuration parameters are e.g.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;1.3&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;base-color&amp;gt; is a rgb triplet with color values ranging from 0 to 1 specifying the primary hue of the rock to be drawn. &amp;lt;ontrast&amp;gt; regulates how strongly the noise modification of rock brightness will appear from 0 (no noise modulation) to 1 (full noise modulation). &amp;lt;grain-fade-power&amp;gt; regulates the balance between large-scale and small-scale noise. Values above 1 will emphasize small-scale structures, values below 1 will emphasize large-scale structures. There is no real limit to the parameter, but presumably values outside [0.5:1.5] won't look compelling.&lt;br /&gt;
&lt;br /&gt;
The effect of the fade power ranging from 0.8 to 1.3 is illustrated by the following series of screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp0.8.jpg|300px|Grain fade power 0.8]]&lt;br /&gt;
[[File:Rock-gfp1.0.jpg|300px|Grain fade power 1.0]]&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|Grain fade power 1.3]]&lt;br /&gt;
&lt;br /&gt;
The effect of the contrast parameter changing from 1.0 to 0.7 looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|Contrast 1.0]]&lt;br /&gt;
[[File:Rock-contrast.jpg|300px|Contrast 0.7]]&lt;br /&gt;
&lt;br /&gt;
Since it is difficult to guess the resulting visual brightness of rock after all noise and overlay patterns have been added, &amp;lt;rock-brightness&amp;gt; is a convenient scale after to multiply pixel color after all layers have been added.&lt;br /&gt;
&lt;br /&gt;
The overlay layer is based on Perlin noise domains and draws with a different color onto the base layer. The relevant parameters are&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;-0.05&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the &amp;lt;overlay-color&amp;gt; is again a rgb triplet and &amp;lt;overlay-alpha&amp;gt; its transparency value. &amp;lt;overlay-bias&amp;gt; should take values between -0.5 and 0.5 and controls the amount of surface to be covered with the overlay color.&lt;br /&gt;
&lt;br /&gt;
As illustrated by the following screenshots, the overlay layer can be used to draw moss and lichen cover as well as mineral crusts on top of the base rock layer:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|No overlay]]&lt;br /&gt;
[[File:Rock-lichen.jpg|300px|Green overlay, small alpha, positive bias]]&lt;br /&gt;
[[File:Rock-crust.jpg|300px|White overlay, large alpha, negative bias]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The crack layer is based on stretched Perlin noise isolines and controlled by the parameters&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;crack-depth&amp;gt; (from 0 to 1) regulates how pronounced the darkening inside the crack region is whereas the &amp;lt;crack-pattern-stretch&amp;gt; (from 1 to roughly 10) controls the elongation of the crack pattern.&lt;br /&gt;
&lt;br /&gt;
For low stretch values, the crack layer can be used to draw bands of different mineral inside the rock, for high stretch values it can simukate a genuine pattern of cracks in the surface, see screenshots below for an illustration:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-crust.jpg|300px|No cracks]]&lt;br /&gt;
[[File:Rock-crack1.jpg|300px|Stretch factor 1]]&lt;br /&gt;
[[File:Rock-crack7.jpg|300px|Stretch factor 7]]&lt;br /&gt;
&lt;br /&gt;
Finally, stratified and slope line noise (see above) are also available as texture brightness modifiers. The parameters are&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/rock_strata&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;slope-contrast&amp;gt; (value between 0 and 1) regulates how pronounced the slope lines are drawn and &amp;lt;rock_strata&amp;gt; (value 0 or 1) indicated whether stratified noise should be used or not. Neither slope noise nor stratified noise affect flat rock surfaces, they only lead to modulation on sufficiently steep rock surfaces.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 1:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter set&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt; &lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;7.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata&amp;gt;0&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in rock drawn like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-example1.jpg|500px|center|Procedural rock, example 1]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following set of parameters&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.3&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata&amp;gt;1&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
leads to stratified rock like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-example2.jpg|500px|center|Procedural rock, example 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The dirt runway effect ===&lt;br /&gt;
&lt;br /&gt;
Using a dedicated ALS effect, it is possible to generate a wide variety of visuals for non-paved runways. The effect is used to texture a runway as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;Effects/dirt-runway&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the textures and parameters to configure it must be specified in the &amp;lt;parameters&amp;gt; section of the landclass used for the runway.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Part of the effect explicitly relies on a particular uv-mapping of the dirt runways. For this reason, the effect may or may not work as intended with scenery other than FG world scenery 2.0 - in particular custom scenery builds may not give the desired visuals if they treat unpaved runways differently.&lt;br /&gt;
&lt;br /&gt;
The effect uses a mixture of three texture layers - a base texture layer (n=16) an overlay texture layer (n=17) and a grain texture layer (supposed to be a largely transparent texture with just a darker overlay pattern on it, n=18).&lt;br /&gt;
&lt;br /&gt;
For each of the textures, a mapping to a physical size of the texture patch can be defined by the set of parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;100.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;100.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(i.e. setting a parameter to 100 means that the texture sheet is supposed to represent a 100 m x 100 m patch of runway). This is different from the way the default renderer treats dirt runways by stretching the assigned texture over the whole runway (i.e. texture magnification depends on runway size). The strength of the grain overlay can be controlled by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.3&amp;lt;/grain_strength&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where a value of zero implies no grain texture and a value of 1 the full grain effect as on the texture.&lt;br /&gt;
&lt;br /&gt;
The mixture of base and overlay texture layers is controlled by filtered Perlin noise. The frequencies of the base noise distribution can be controlled by &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the sum of all parameters is supposed to be 1. Strengthening a parameter generates more structure at this scale, for instance in order to generate a small-scale, fine-grained pattern one should set the lower frequencies to larger values, whereas for large continuous patches of texture strength_10m and strength_5m should be largest.&lt;br /&gt;
&lt;br /&gt;
The raw Perlin noise is post-processed by a filter driven by two parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of these, the threshold regulates the relative mixture of the two textures (0.5 roughly corresponds to 50%) and transition how the mixture will be drawn. A small transition value (say 0.1) corresponds to an either/ or scenario in which only one of the textures will be drawn (appropriate for grass patches on dirt), a large transition value smoothly blends the textures (appropriate for different sand textures).&lt;br /&gt;
&lt;br /&gt;
If&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
is set to 1, the noise distribution will tend to favor the base layer in the center of the runway. &amp;lt;b&amp;gt;This requires a specific uv-mapping and will not work for custom-generated runways.&amp;lt;/b&amp;gt; The strength of that bias is set by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is between 0 (no bias) and 1 (don't draw overlay layer in runway center no matter what).&lt;br /&gt;
&lt;br /&gt;
In addition, the effect uses a normal map (since it is used in a non-standard way, touch at your own risk) - the visual 'bumpiness' of the runway can be adjusted using &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using different mixtures of textures and parameters, a wide variety of visuals can be achieved, a few examples in the following.&lt;br /&gt;
&lt;br /&gt;
A lakebed texture overlaid with sand gives proper visuals for e.g. the Rogers Dry Lake runways at Edwards AFB:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Terrain/sand_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand1.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;100.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;100.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.3&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Dirt rwy01.jpg|500px|center|Dirt runway example 1]]&lt;br /&gt;
&lt;br /&gt;
Using a largely grass-textured surface and allowing some gravel to show in the runway center gives the appearance of a worn grass runway:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Terrain/sand_hires_ochre.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.3&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.0&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.1&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.2&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.15&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.1&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;30.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;50.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.8&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Dirt rwy02.jpg|500px|center|Dirt runway example 2]]&lt;br /&gt;
&lt;br /&gt;
Using the effect 'as is', i.e. without any additional parameters, reproduces the old appearance of the dirt runway effect in ALS:&lt;br /&gt;
&lt;br /&gt;
[[File:Dirt rwy03.jpg|500px|center|Dirt runway example 3]]&lt;br /&gt;
&lt;br /&gt;
With the original dirt runway texture mapped to a small size and framed by less structured dirt, also a compelling result can be achieved:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand_hires_ochre.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;25.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.4&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Dirt rwy04.jpg|500px|center|Dirt runway example 4]]&lt;br /&gt;
&lt;br /&gt;
Using grass as the overlay material blends the runway outline nicely into the airport keep:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.2&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.6&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.2&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.0&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.0&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.1&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.8&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;20.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
       &amp;lt;grain_strength&amp;gt;0.6&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Dirt rwy05.jpg|500px|center|Dirt runway example 5]]&lt;br /&gt;
&lt;br /&gt;
Finally an example of diffuse sand patches blended into each other by low frequency noise and a large value of the transition in the filter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.2&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.3&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.2&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.4&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.5&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;20.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.2&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Dirt rwy06.jpg|500px|center|Dirt runway example 6]]&lt;br /&gt;
&lt;br /&gt;
=== Overlay layers ===&lt;br /&gt;
&lt;br /&gt;
The ALS rendering framework also supports rendering a low layer with a '3D' structure which is created dynamically by a geometry shader - this can be used for undergrowth or rocks - see below for an example of undergrowth in northern boreal forest:&lt;br /&gt;
&lt;br /&gt;
[[File:Overlay01.jpg|500px|center|Overlay layer used as undergrowth]]&lt;br /&gt;
&lt;br /&gt;
The overlay layer is created by extruding a number of 'shells' from the base ground surface (with a LOD system controlling how many shells are extruded) and texturing the part of the shell which intersects with the 3d structure of the object to be rendered. This looks fairly compelling from above, but of course for shallow viewing angles the nature of the illusion is readily apparent, and once the view direction is parallel to the shells, the 3D structure vanishes because one is looking right between shells. It's therefore a good idea to keep the overlay layer low (&amp;lt; 1 m) and supplement it with other elements such as random vegetation.&lt;br /&gt;
&lt;br /&gt;
The overlay layer needs to be both enabled in user preferences and requested by the landclass definition to be shown. In the materials file, the corresponding effect needs to be set as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;effect&amp;gt;Effects/terrain-overlay&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to enable the layer. If the overlay is not selected in the ALS quality levels, the effect will automatically fall back to terrain-default (the same will happen if ALS is not selected as renderer).&lt;br /&gt;
&lt;br /&gt;
In the materials file, a number of parameters govern the appearance of the overlay layer. The following example is from Hawaii texturing (here (...) means that these declarations for the layer need to be done in addition to other procedural texturing described above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;texture-set&amp;gt;&lt;br /&gt;
          (...)&lt;br /&gt;
	  &amp;lt;texture n=&amp;quot;20&amp;quot;&amp;gt;Terrain/dry_pasture4.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
	  &amp;lt;texture n=&amp;quot;21&amp;quot;&amp;gt;Terrain/dry_pasture4.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;/texture-set&amp;gt;&lt;br /&gt;
	&amp;lt;parameters&amp;gt;&lt;br /&gt;
          (...)&lt;br /&gt;
	  &amp;lt;max_overlay_height&amp;gt;1.0&amp;lt;/max_overlay_height&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_hardness&amp;gt;0.0&amp;lt;/overlay_hardness&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_density&amp;gt;0.6&amp;lt;/overlay_density&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_scale&amp;gt;2.0&amp;lt;/overlay_scale&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_autumn_flag&amp;gt;0&amp;lt;/overlay_autumn_flag&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_brightness_top&amp;gt;0.8&amp;lt;/overlay_brightness_top&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_brightness_bottom&amp;gt;0.4&amp;lt;/overlay_brightness_bottom&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_secondary_flag&amp;gt;1&amp;lt;/overlay_secondary_flag&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_secondary_hardness&amp;gt;0.0&amp;lt;/overlay_secondary_hardness&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_secondary_density&amp;gt;1.0&amp;lt;/overlay_secondary_density&amp;gt;&lt;br /&gt;
         &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's go through these entries.&lt;br /&gt;
&lt;br /&gt;
First, the overlay layer can support two different structures with different textures (for instance undergrowth and rock). The number 20 defines the texture for the primary layer, the number 21 for the secondary layer. The code makes an assumption that the secondary layer is smaller in height than the primary layer, so plan accordingly.&lt;br /&gt;
&lt;br /&gt;
The first four parameters determine the apparent geometry of the overlay objects. All 'objects' (which really are painted on the shells only, remember) are based on Perlin noise to give them a pseudo-random appearance. &amp;lt;b&amp;gt;&amp;lt;max_overlay_height&amp;gt;&amp;lt;/b&amp;gt; is the maximal distance the upper layer will be extruded from the ground - the largest of the random structures will reach to this level. As mentioned above, it's generally a good idea to keep this &amp;lt; 1 m (although the effect will run for higher numbers). The &amp;lt;b&amp;gt;&amp;lt;overlay_hardness&amp;gt;&amp;lt;/b&amp;gt; is a number between 0 and 1 and determines how blurry the edges of the structures will be - generally for vegetation one wants a now hardness, for rock (see below) a high hardness to get the illusion of a well-defined surface). &lt;br /&gt;
&lt;br /&gt;
[[File:Overlay03.jpg|500px|center|Overlay layer used as rock]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;b&amp;gt;&amp;lt;overlay_density&amp;gt;&amp;lt;/b&amp;gt; determines how much overlay objects there will be (technically, it's a bias for the Perlin noise) - a high density will give a nearly closed layer, a low density instead only a few objects far and between. Finally, the &amp;lt;b&amp;gt;&amp;lt;overlay_scale&amp;gt;&amp;lt;/b&amp;gt; is a parameter used to stretch the noise pattern horizontally. By default, the pattern is around 1-2 m scale, setting the parameter e.g. to 5 will stretch this horizontally to 5-10 m (while leaving the vertical height constant).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The overlay layer is fully interfaced with pixel-post-processing (see below). It is automatically submerged in snow based on altitude information and the simulated snow level, but the shader can not know whether a structure is supposed to be rock or vegetation, thus to participate in autumn coloring, the &amp;lt;b&amp;gt;&amp;lt;overlay_autumn_flag&amp;gt;&amp;lt;/b&amp;gt; needs to be set.&lt;br /&gt;
&lt;br /&gt;
A nice shading effect bringing out the 3d structure better (a cheap version of ambient occlusion basically) can be achieved by setting &amp;lt;b&amp;gt;&amp;lt;overlay_brightness_top&amp;gt;&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;&amp;lt;overlay_brightness_bottom&amp;gt;&amp;lt;/b&amp;gt; to different values (these are multiplies for the base texture color). What the best values should be really depends on the texture that is used.&lt;br /&gt;
&lt;br /&gt;
The secondary layer shares most properties with the primary layer. It needs to be activated using &amp;lt;b&amp;gt;&amp;lt;overlay_secondary_flag&amp;gt;&amp;lt;/b&amp;gt; and it is possible to give it a different apparent hardness and density using &amp;lt;b&amp;gt;&amp;lt;overlay_secondary_hardness&amp;gt;&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;&amp;lt;overlay_secondary_density&amp;gt;&amp;lt;/b&amp;gt;. Since the secondary layer utilizes &amp;lt;i&amp;gt; the same&amp;lt;/i&amp;gt; Perlin noise generated for the primary layer, the two layers can not generate overlapping structures by constructions (thus, no 'bush' and merge with a 'rock'). That also means that a secondary layer with texture and parameters identical to the primary layer can be declared to generate an extra-dense layer. Generally though secondary layers should be used with care.&lt;br /&gt;
&lt;br /&gt;
=== Pixel color postprocessing ===&lt;br /&gt;
&lt;br /&gt;
A number of environment effects are implemented under user control in the Environment menu. Let's consider the changes to the base scene:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural01.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Snow ====&lt;br /&gt;
&lt;br /&gt;
Using terrain elevation and gradient information, the base location of a snow layer can be determined. The actual snow cover is a white base color, mixed with Perlin noise and normal-mapped with Perlin noise of multiple frequencies. A bias factor for the mixing allows to simulate snow layer of varying thickness.&lt;br /&gt;
&lt;br /&gt;
A low layer thickness creates patches of snow on the terrain through which the basic terrain textures are visible:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural02.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
A high layer thickness completely covers the terrain in snow. Subtle procedural color variations of the snow and bump-mapping change the base white snow pixel color into a realistic texture:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural03.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
If the snowline is placed higher, snow is only simulated on the mountain tops - note also that steep gradients tend to remain clear of snow:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural04.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Dust ====&lt;br /&gt;
&lt;br /&gt;
The dust effect mixes all pixels of the terrain with a basic dust color. A low dust effect setting gives the terrain a dry and parched appearance, as after a long summer period without rain.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural05.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
A high dust effect setting changes the appearance to desert-like terrain (which is rather unrealistic for this scenery):&lt;br /&gt;
&lt;br /&gt;
[[File:procedural06.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Wetness ====&lt;br /&gt;
&lt;br /&gt;
Wet terrain is rendered overall darker. In flat areas, in addition patches of high specular reflection are added, leading to the appearance of glitterin light reflections on water puddles.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural07.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Vegetation ====&lt;br /&gt;
&lt;br /&gt;
A high setting of the vegetation cover is most appropriate for tropical settings, but it can also be used to show seasonal effects, for instance the desert a few days after rainfall. It covers the whole terrain with mossy overgrowth, which in the case of the Grenoble scenery used here blurs the boundaries of the fields and gives the appearance of abandoned agriculture.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural08.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Autumn colors ====&lt;br /&gt;
&lt;br /&gt;
The autumn color effect is unique in the pixel color postprocessing effects in that it needs modifications to the base texture to work. Since the basic terrain texture is never transparent, the information of where vegetation changes color in autumn and where it remains unchanged is hence encoded in the terrain texture alpha channel. A value of 1 means no change of color, a value of 0.5 is appropriate for high changes to bright red-orange. In order to work with the autumn effect, all textures need to be edited manually to indicate where the effect should be computed.&lt;br /&gt;
&lt;br /&gt;
In early autumn, vegetation just tends to pale a little:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural09.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
Later, fields get bright golden-yellow whereas deciduous forests go to orange-red (mixed forest cover rotates locally where indicated by the alpha channel):&lt;br /&gt;
&lt;br /&gt;
[[File:procedural10.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
Finally, in late autumn all vegetation cover is turned into a dull brown:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural11.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
== Limitations of procedural texturing ==&lt;br /&gt;
&lt;br /&gt;
Despite its obvious benefits, there are some problems which are not easily addressed by procedural terrain texturing.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Landclass boundaries&amp;lt;/b&amp;gt;: Procedural texturing can de-emphasize landclass boundaries. This happens for instance if a landclass uses both overlay and detail texture, and only the base texture is changed in the adjacent landclass. Since the noise is continuous across landclass boundaries, the change in base texture is masked by the continuous overlay components. However, procedural texturing can not remove the landclass seams, as a different texture mix is evaluated for every declared landclass.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Detail averaging:&amp;lt;/b&amp;gt; A problem arises when details are generated which are smaller than a pixel. In this case, the rendering engine does not average over many sub-pixels to determine the final color of the pixel but just takes one (few) samples. This means that a high contrast detailed structure of black and white is not averaged to a grey pixel but, dependent on the viewer position, either results in a black or a white pixel. The net result is a flickering Moire pattern which is visually very unpleasant (the same effect occurs when models get smaller than a pixel). In textures, the problem is solved by mipmapping - every 4 pixels are averaged to a single pixel on a coarse-grained version of the texture at texture loading time, and only the appropriate resolution level of the texture is referenced. To do the same thing in procedural texturing is very expensive (two resolution levels up one ends with 16 times the calculational effort for a pixel), so a viable strategy to remove the flickering patterns involves replacing noise by its &amp;lt;i&amp;gt;global&amp;lt;/i&amp;gt; average (i.e. the 'all pixel' rather than '4 pixel' average, which is usually known for the noise function). The net result is that procedurally generated details tend to looks less grainy than true textures as soon as details get smaller than a single pixel, which is s subtle, but noticeable effect. In essence, this is similar to an antialiasing problem and could also be dealt with by generically sampling multiple sub-pixels at the expense of the increased performance cost.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Computational cost:&amp;lt;/b&amp;gt; Especially on older graphics cards, multiple texture lookups combined with evaluating noise and other functions is significantly slower than just texturing the terrain with a single texture. Most optimization strategies used in other 3D games (such as filling the z-buffer early and discarding occluded pixels) do not work well for a flight simulator where most of the terrain is visible at any given time.&lt;br /&gt;
&lt;br /&gt;
Some points have found a solution:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Terrain tile boundaries&amp;lt;/b&amp;gt;: Terrain is loaded in discrete chunks, so-called tiles. For technical reasons, the coordinate system used to address positions changes for each tile. In practice, this unfortunately implies that noise functions are discontinuous across tile boundaries, and this shows in more or less pronounced seams in the computed textures -&amp;gt; however this can be addressed by going from tile-based to FG world coordinates and using 3-d noise. Due to the large distances involved, small-scale noise becomes then numerically unstable, but noise wavelength above 250 m can safely be done in world coordinates, leading to appealing visuals both at large and small distance.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Tiling for non-natural landclasses&amp;lt;/b&amp;gt;: The de-tiling strategies described above are based on mixing texture components using noise functions. This works fine for natural landclasses, but human-influenced landclasses like agriculture or urban terrain are not well described by Perlin noise, and de-tiling crop fields using noise functions does not yield plausible results.This is now solved by domain noise.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS technical notes]]&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.science-and-fiction.org/rendering/noise.html From random number to texture - GLSL noise functions]&lt;br /&gt;
* http://www.upvector.com/?section=Tutorials&amp;amp;subsection=Intro%20to%20Procedural%20Textures&lt;br /&gt;
* http://www.graphics.usc.edu/cgit/publications/papers/p95-rhoades.pdf&lt;br /&gt;
* http://www.vis.uni-stuttgart.de/~dachsbcn/download/ProcReproduction.pdf&lt;br /&gt;
* http://www.unilim.fr/pages_perso/guillaume.gilet/Recherche/pdf/CGI12.pdf&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg39692.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Procedural_texturing&amp;diff=114280</id>
		<title>Procedural texturing</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Procedural_texturing&amp;diff=114280"/>
		<updated>2018-02-04T07:35:32Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Overlay layers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
&lt;br /&gt;
'''Procedural texturing''' is a set of techniques where the color of a pixel is not determined by a texture image but fully or partially by evaluating a mathematical function. This article describes why procedural texturing is useful, what it can and can't do and how it is used and configured in [[FlightGear]].&lt;br /&gt;
&lt;br /&gt;
== The terrain texturing challenge ==&lt;br /&gt;
&lt;br /&gt;
The FlightGear terrain is segmented into different landclasses (Urban, Ocean, Glacier, ShrubCover,...) which describe what the terrain at a location is like. In the default texturing scheme, the file '''materials.xml''' is used to describe (among other things) what texture sheet is mapped onto a given landclass.&lt;br /&gt;
&lt;br /&gt;
A typical terrain texture sheet has 512x512 pixels and is mapped onto a 2000m x 2000m sized area, which means that each pixel covers a 4m x 4m area in unsloped terrain. For the sake of the argument, assume the texture has a size of 300 kB in compressed form which expands to about 1 MB in the GPU memory after mipmapping.&lt;br /&gt;
&lt;br /&gt;
The optimal distance to view the texture is when every texture pixel corresponds to a pixel on the screen, as then the maximum possible detail of the texture is exploited. Assuming a 60 deg field of view looking straight down onto the texture, that distance is about 2500 m.&lt;br /&gt;
&lt;br /&gt;
If the texture is seem from a much larger distance, it does not large enough to cover the terrain, and hence it is automatically repeated. From about 3 times the optimal distance, this repetition creates a visually rather pronounced pattern which is referred to as tiling:&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|center|An example for texture tiling]]&lt;br /&gt;
&lt;br /&gt;
If the texture is seen from a much smaller distance, a single texture pixel covers multiple screen pixels, which makes the terrain look coarse-grained and unrealistic:&lt;br /&gt;
&lt;br /&gt;
[[File:resolution_example.jpg|400px|center|An example for low texture resolution]]&lt;br /&gt;
&lt;br /&gt;
A third problem occurs because the boundaries of the landclasses are vector data, i.e. they appear as unnaturally sharp division lines between different textures.&lt;br /&gt;
&lt;br /&gt;
Thus, the main challenges for realistic terrain texturing can be summarized as the three areas&lt;br /&gt;
&lt;br /&gt;
* tiling&lt;br /&gt;
* resolution&lt;br /&gt;
* boundaries&lt;br /&gt;
&lt;br /&gt;
=== Addressing the challenges ===&lt;br /&gt;
&lt;br /&gt;
Tiling and resolution are correlated problems, i.e. many solution to one tend to make the other worse. For instance, resolution can easily be dealt with by mapping the texture sheet onto a smaller area, say 500m x 500 m, which gives a pixel size of 1m. However, then tiling becomes apparent from just 1500 m distance, i.e. almost inevitably.&lt;br /&gt;
&lt;br /&gt;
Tiling is also reduced if the variation of contrast inside a texture is reduced, i.e. the texture becomes more 'dull' and the pattern repetition is less obvious:&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|An example for texture tiling]]&lt;br /&gt;
[[File:contrast_reduction.jpg|400px|Reduced contrast makes the problem less apparent]]&lt;br /&gt;
&lt;br /&gt;
However, contrasts within a texture are the best way to distract the eye from the sharp landclass boundaries, so if one uses low contrast textures, the landclass boundary problem gets often worse.&lt;br /&gt;
&lt;br /&gt;
Tiling can also be reduced at the expense of texture detail if a single texture sheet is mapped onto a larger area.&lt;br /&gt;
&lt;br /&gt;
To some degree, all problems lessen with increased texture resolution - using 4096x4096 texture sheets allow 0.5m x 0.5m resolution if mapped onto the same areas - but memory consumption quickly becomes as issue as a single texture sheet of that size uses ~64 MB of graphic memory already. &lt;br /&gt;
&lt;br /&gt;
=== Photo texturing ===&lt;br /&gt;
&lt;br /&gt;
The tiling problem can be solved if each 2000m x 2000m area to be textured does not get the same texture sheet. If aerial imagery is used (see [[Photoscenery]]) then also the landclass boundary is solved. However, this inevitably creates a resolution problem. To see this, consider the following numbers: On a clear day, the visibility from airliner cruise altitude can easily be 120 km. This means that 45.000 square kilometers of terrain are visible at any given time. Using 2000mx2000m mapped texture sheets as in the example above, unique terrain texturing then needs 11.000 different texture sheets with a size of 1 MB each in graphic memory, or about 11 GB of graphic memory, quite exceeding the capabilities of modern graphic cards. Assuming that about 1 GB of graphic memory is available for terrain textures (clouds, models, the cockpit,... also need memory), the individual pixel must have a size of 12 m x 12 m or larger, which means that photoscenery can either not be used for large visibility, or has a terrible resolution from close-up, or uses a LOD scheme (the above photoscenery would still use 3 GB of harddisk space though).&lt;br /&gt;
&lt;br /&gt;
Photo-texturing has other disadvantages - for instance the photographs are usually taken in a particular season in certain light, so the scene may easily seem unrealistic or wrong in a different season or at a different time of the day. FlightGear texturing also encodes meta-information (where on a texture to place trees or buildings) - such meta-information can not easily be encoded in photoscenery.&lt;br /&gt;
&lt;br /&gt;
=== Procedural texturing ===&lt;br /&gt;
&lt;br /&gt;
Procedural texturing is a solution to both the tiling and the resolution problem, and partially also for the boundary problem. A mathematical function, unlike a lookup table (which a texture in essence is) does not end at any boundary, i.e. it can simply be used across the whole scene without ever creating a repetition. Using a suitable noise function to mix various textures, a complete de-tiling effect can be achieved (this is really the same scene):&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|An example for texture tiling]]&lt;br /&gt;
[[File:procedural_detiling.jpg|400px|Procedural texturing removes the tiling]]&lt;br /&gt;
&lt;br /&gt;
A function can also be evaluated at any scale resolution. Unlike a texture which needs to be stored regardless if it is used or not, a function only needs to be evaluated for every screen pixel, i.e. the workload and memory requirement do not grow quadratically with the needed resolution but only linear. This scaling allows to dynamically add details to the scene as one gets closer (this is really the same scene):&lt;br /&gt;
&lt;br /&gt;
[[File:resolution_example.jpg|400px|An example for low texture resolution]]&lt;br /&gt;
[[File:procedural_resolution.jpg|400px|Procedural texturing adds details at close range]]&lt;br /&gt;
&lt;br /&gt;
== Building blocks of procedural texturing ==&lt;br /&gt;
&lt;br /&gt;
Mathematical functions can describe quite complex structures, but in order to be rendered in real time, the function has to evaluate fast enough. This means that 'simple' textures like snow, or possibly sand or rock can be completely procedural, while more complex shapes like agriculture which shows fields, crops, access paths and drains can remain a texture with some structure added procedurally. In general, a mixture of textures and functions is used for best effect. &lt;br /&gt;
&lt;br /&gt;
The most important building blocks of procedural texturing are noise functions. A noise function is a function which takes the coordinates of a pixel as input and returns a pseudo-random number between 0 and 1 as output. Noise functions aren't uniquely defined, and there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
=== Perlin noise ===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Perlin_noise '''Perlin noise'''] is noise which exists at a certain scale (say 10 m). It is built by dividing the scene into a 10m x 10 m grid, creating random values at each grid point and interpolating smoothly between the grid points. The function created that way varies typically at a scale of 10 m, but not at much smaller scales and averages to 0.5 at much larger scales. Perlin noise isn't so useful at just a single scale, but noise at several scales added together can achieve a very realistic effect of roughness and structure. Finding the correct noise frequencies and amplitudes for blending Perlin noise to a realistic appearance is an art rather than a computational task.&lt;br /&gt;
&lt;br /&gt;
=== Sparse dot noise ===&lt;br /&gt;
&lt;br /&gt;
For sparse dot noise, the terrain is divided into a grid at certain scale, then random values at the grid edges are used to determine if a dot is placed into the cell, where into the cell it is placed and what radius it has. Based on the distance to the dot, the function returns 0 if the point probed is far from the dot and 1 at the dot position. &lt;br /&gt;
&lt;br /&gt;
From the superposition of several sparse dot distributions, dense dot distributions can be created. Note that a sparse dot distribution does not average to 0.5 but, dependent on the details of the implementation, to a much lower value.&lt;br /&gt;
&lt;br /&gt;
=== Stratified noise ===&lt;br /&gt;
&lt;br /&gt;
Stratified noise uses the terrain mesh altitude information to draw bands of constant altitude which each have a random number associated. The bands are then distorted in width by an altitude-dependent random number and modulated with an (xy)-position dependent random number. Stratified noise is rather useful for some types of rock formations.&lt;br /&gt;
&lt;br /&gt;
=== Domain noise ===&lt;br /&gt;
&lt;br /&gt;
The idea of domain noise is to segment the terrain into discrete patches, each of which has a random number associated. Unlike for Perlin noise, the number is not interpolated, it suddenly jumps at the domain boundary to a different value.&lt;br /&gt;
&lt;br /&gt;
The FG implementation of domain noise uses a regular grid at some wavelength, then distorts the grid points by random numbers and uses [http://en.wikipedia.org/wiki/Voronoi '''Voronoi tiling'''] to determine the domains within the distorted grid. This creates domains with a controllable irregularity which are all about the same size.&lt;br /&gt;
&lt;br /&gt;
Domain noise is very useful for man-made patterns, e.g. managed forest, agriculture or cities.&lt;br /&gt;
&lt;br /&gt;
=== Slope line noise ===&lt;br /&gt;
&lt;br /&gt;
For slope line noise, the terrain is segmented in patches, and based on the normal of the terrain, a line along the direction of steepest descent is drawn on the patch, with precise line position and thickness modulated by random numbers. This type of noise mixed into Perlin noise can give a good impression of snow distributions on steep slope or erosion patterns on terrain.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
To the left is an example for domain noise scaling the size of trees in patches of few hundred meters size, thus giving the impression of the different age of forest patches in a managed forest. On the right is an example of slopeline noise, emphasizing the vertical structure of the granite walls in Yosemite National Park.&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_forest.jpg|400px|Domain noise for forest]] [[File:Southwest08.jpg|375px|Slope line noise for Yosemite granite]]&lt;br /&gt;
&lt;br /&gt;
=== Terrain probing functions ===&lt;br /&gt;
&lt;br /&gt;
The underlying terrain can also be used as input for functions in a different way. Commonly used functions are for instance the altitude of a terrain pixel (for instance to determine the snow line) or its slope (to place rock textures on steep slopes). Since the underlying vector geometry of the terrain mesh leads to very sharp division lines, usually terrain probing functions are mixed with some noise for a more realistic appearance.&lt;br /&gt;
&lt;br /&gt;
=== Pixel color postprocessing ===&lt;br /&gt;
&lt;br /&gt;
Many environmental effects can be simulated at the simple expense of post-processing the color of a terrain pixel. For instance, mixing every pixel with a constant dust color can give the terrain a dusty appearance, mixing the final pixel color with a mossy green can give it an overgrown appearance. This is similar to the way pixel color is adjusted for fog, but unlike fog effects environment pixel color postprocessing does not involve distance computations between eye and pixel, rather the color is adjusted independent of the distance (but possibly dependent on terrain gradient or altitude).&lt;br /&gt;
&lt;br /&gt;
== Procedural terrain texturing in Flightgear ==&lt;br /&gt;
&lt;br /&gt;
As of Flightgear 2.10+, procedural texturing of the terrain is done by a general terrain shader which is configurable from &amp;lt;b&amp;gt;materials.xml&amp;lt;/b&amp;gt;. The creation of separate effects for various terrain types is not required (but still possible if so desired). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Currently the following requires that [[Atmospheric light scattering]] is on!&amp;lt;/b&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Basic texturing scheme ===&lt;br /&gt;
&lt;br /&gt;
The texturing scheme is controlled on a per-landclass basis from &amp;lt;b&amp;gt;materials.xml&amp;lt;/b&amp;gt;. The relevant sections for procedural textruring in each material declaration are &amp;lt;texture-set&amp;gt; and &amp;lt;parameters&amp;gt;. Here the &amp;lt;texture-set&amp;gt; block controls what textures are used whereas the &amp;lt;parameters&amp;gt; block controls how these textures are used. &lt;br /&gt;
&lt;br /&gt;
Another important part are &amp;lt;xsize&amp;gt; and &amp;lt;ysize&amp;gt; (the sections which describes to which size in meters the base texture is mapped). The procedural texturing shader computes the size of all used textures &amp;lt;i&amp;gt;relative&amp;lt;/i&amp;gt; to the base texture size, so if a base texture is declared to have a size of 500 m rather than the default 2000 m, the resolution of the hires overlay or the grain texture will automatically also be 5 times higher then default - which may or may not be desired.&lt;br /&gt;
&lt;br /&gt;
The individual textures which can be used are:&lt;br /&gt;
&lt;br /&gt;
==== Base texture ====&lt;br /&gt;
&lt;br /&gt;
The base texture is used as in the default scheme to give the basic appearance of a landclass. The base texture is assumed to be opaque, and its alpha channel is hence not evaluated to transparent, but rather used to encode where the autumn color effect should be used. An alpha value of 0.5 is appropriate for deciduous forests which should get a strong red-orange appearance in autumn, a value of 0.8-0.9 is more appropriate for grass surfaces.&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|center|Base Texture]]&lt;br /&gt;
&lt;br /&gt;
The base texture can take some additional parameters. The first is intrinsic wetness. If the quality level of the shader supports it, this will make the texture appear wet and add sparkling specular reflections to the terrain even if the surrounding terrain is dry. The dust resistance acts in the opposite way, it is intended for irrigated terrain in desert areas and is a multiplier for the dust effect, i.e. a value of 0.0 will make a landclass completely impervious to dust. Finally, rock strata represents an integer flag whether a stratified pattern will be drawn on vertical surfaces or not.  &lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;intrinsic_wetness&amp;gt;0.0&amp;lt;/intrinsic_wetness&amp;gt;&lt;br /&gt;
  &amp;lt;dust_resistance&amp;gt;1.0&amp;lt;/dust_resistance&amp;gt;&lt;br /&gt;
  &amp;lt;rock_strata&amp;gt;0&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value of intrinsic wetness is zero, the parameter can range from 0 (dry) to 1 (very wet, lots of open water). The defaul value of duse resistance is one, and the parameter can range from 1 (gets dusty like everything else) to 0 (impervious to dust).&lt;br /&gt;
&lt;br /&gt;
==== The overlay texture ====&lt;br /&gt;
&lt;br /&gt;
The overlay texture is a texture at a similar resolution level which is mixed with the base texture to achieve de-tiling or gradient effects. By default, it covers about 50% of the available scene. As for the base texture, the alpha channel of the overlay texture encodes color rotations in autumn.&lt;br /&gt;
&lt;br /&gt;
[[File:overlay1.jpg|400px|center|The overlay Texture]]&lt;br /&gt;
&lt;br /&gt;
The overlay texture can be used in two different modes or a mixture of them. The control parameter is &amp;lt;transition_model&amp;gt; - if this parameter is set to 0, the transition between base and overlay texture is determined by a noise function. If the parameter is set to 1, the slope of the terrain determines the transition and the overlay texture is only used on steep slopes. A setting of 0.5 uses a mixture of noise and slope information to drive the transition.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default texture selected is void.png which corresponds to no overlay texture.&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;transition_model&amp;gt;0.5&amp;lt;/transition_model&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.5, the parameter can range from 0 (random transition) to 1 (gradient-driven transition).&lt;br /&gt;
&lt;br /&gt;
==== The hires texture ====&lt;br /&gt;
&lt;br /&gt;
The hires texture adds patches of a texture at much higher resolution into the mix, which both add to de-tiling and lead to a better experience of the scenery from close-up. The hires textured patches will however inevitably appear featureless from large distance and will show tiling themselves, so the amount of hires texture as well as the hires texture sheet itself must be designed carefully.&lt;br /&gt;
&lt;br /&gt;
The areas covered by the hires texture will (partially to mask tiling of the hires patches) receive a stronger bumpmap and some distortion than the rest of the terrain by the shader.&lt;br /&gt;
&lt;br /&gt;
As for the base texture, the alpha channel of the hires texture encodes color rotations in autumn.&lt;br /&gt;
&lt;br /&gt;
[[File:overlay02.jpg|400px|center|The hires Texture]]&lt;br /&gt;
&lt;br /&gt;
The parameter &amp;lt;hires_overlay_bias&amp;gt; controls the fraction of terrain covered by the hires texture patches - by default about 40% of the scene will be covered. Positive or negative biases can make the fraction arbitrarily small or large.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default texture selected is void.png which corresponds to no hires texture. The hires texture does not require the overlay texture to be declared.&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;hires_overlay_bias&amp;gt;0.0&amp;lt;/hires_overlay_bias&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.0, the parameter can range from -0.5 (strong suppression of the hires overlay texture) to +0.5 (strong enhancement of the hires overlay texture).&lt;br /&gt;
&lt;br /&gt;
==== The gradient texture ====&lt;br /&gt;
&lt;br /&gt;
The gradient texture is exclusively used for steep terrain gradients (significantly steeper than the point at which the overlay texture may be used) to account for the fact that beyond a certain slope, terrain can not have vegetation cover and hence landclass information needs to be corrected if necessary.&lt;br /&gt;
&lt;br /&gt;
The default texture is rock.png which is hence used for all landclasses unless specifically declared otherwise. The default may be inappropriate in some regions (volcanic terrain with different rock hue, tropical terrain in which even steep slopes are covered) - the gradient texture then needs to be declared a different texture for all materials in the area. Declaring void.png will not use a gradient texture.&lt;br /&gt;
&lt;br /&gt;
The gradient texture does not use any parameters.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== The grain texture ====&lt;br /&gt;
&lt;br /&gt;
The grain texture adds a grainy pattern to the terrain at close distances, giving the appearance of better resolution. The grain texture parses the texture alpha channel as transparency (since it just superimposes a pattern), so here the alpha channel can not be used to encode vegetation effects, and the grain texture may not have a strong color.&lt;br /&gt;
&lt;br /&gt;
[[File:grain_texture.jpg|400px|center|The grain overlay texture]]&lt;br /&gt;
&lt;br /&gt;
To allow fine-tuning of the grain effect, the texture can be multiplied with the &amp;lt;grain_strength&amp;gt; parameter which sets the overall alpha of the grain effect - a low value works best on bright base textures whereas dark base textures may require a stronger grain.&lt;br /&gt;
&lt;br /&gt;
The default grain texture is grain_texture.png which adds a vegetation-like grain. This can be replaced with other grain patterns or void.png for no grain where appropriate.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain_strength&amp;gt; 0.5&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.5 and the parameter range is 0 (completely transparent) to 1 (completely opaque).&lt;br /&gt;
&lt;br /&gt;
==== The dot texture ====&lt;br /&gt;
&lt;br /&gt;
The dot overlay uses sparse dot noise to create detail in the scene. Sparse dot noise textured with a rock texture can give the appearance of boulders scattered across the terrain, the same noise textured with a grass texture can be used to create round vegetation patches.&lt;br /&gt;
&lt;br /&gt;
[[File:hires_terrain03.jpg|400px|center|The dot overlay texture creating grass patches]]&lt;br /&gt;
&lt;br /&gt;
Both the dot size and the dot density can be controlled by the user. The range out to which the dots are visible is automatically adjusted based on the dot size scale. By default, the dot texture is set to void.png, which means that no dot texture is used.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;dot_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;dot_density&amp;gt; 1.0&amp;lt;/dot_density&amp;gt;&lt;br /&gt;
  &amp;lt;dot_size&amp;gt; 1.0&amp;lt;/dot_size&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value for &amp;lt;dot_density&amp;gt; is 1.0, the parameter can be set in the range from 0.0 to 1.0 (values above 1.0 do not increase the dot density further). The default value for &amp;lt;dot_size&amp;gt; is also 1.0, which creates dots at size scales varying between 10 cm and few m. The parameter is a multiplier for these default values, i.e. at a value of 10 dots of ~10-20 m size are created.&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
The following declaration&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;texture-set&amp;gt;&lt;br /&gt;
   &amp;lt;texture&amp;gt;Terrain/marsh2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;Terrain/grass_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;Terrain/marsh4a.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
   &amp;lt;grain_strength&amp;gt;0.9&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
   &amp;lt;intrinsic_wetness&amp;gt;0.6&amp;lt;/intrinsic_wetness&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in marshland drawn like this&lt;br /&gt;
&lt;br /&gt;
[[File:marsh_example.jpg|400px|Procedural marshland close-up]]&lt;br /&gt;
[[File:wetness.jpg|400px|Procedural marshland from the distance]]&lt;br /&gt;
&lt;br /&gt;
The following declaration&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;texture&amp;gt;Terrain/shrub-hawaii.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;Terrain/sand_hires_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;Terrain/rock_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;Terrain/rock_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;Terrain/grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
   &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;rock_strata&amp;gt;1&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
   &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in stratified rock structures like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Southwest04.jpg|400px|Procedural rock Grand Canyon]]&lt;br /&gt;
[[File:Southwest09.jpg|400px|Procedural rock Zion National Park]]&lt;br /&gt;
&lt;br /&gt;
=== The agriculture effect ===&lt;br /&gt;
&lt;br /&gt;
The basic texture scheme based on Perlin noise is of limited value for e.g. agricultural terrain which rarely shows the organic shapes generated by Perlin noise. For such terrain, the agriculture effect should be used instead which is based on Perlin noise.&lt;br /&gt;
&lt;br /&gt;
The effect needs to be declared for the landclass as&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;effect&amp;gt;Effects/agriculture&amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(note that since the default rendering scheme has typically the crop effect associated with agriculture, this declaration inherits crop.eff).&lt;br /&gt;
&lt;br /&gt;
By default, large patches of agriculture usually show strong tiling:&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro01.jpg|400px|center|Tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
It is implemented in two modes, overlay and rotation. Since the agriculture effect is optional, its overlay texture is declared separately from the normal declaration above as follows:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the overlay texture is declared void.png (to which the effect defaults), it is not used. The effect takes a number of parameters. For the overlay, the fraction taken by the overlay texture and the scale at which the patches are drawn can be specified through the overlay fraction and the overlay scale, while the shape of the domains can be controlled using a distortion factor.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;overlay_fraction&amp;gt;0.5&amp;lt;/overlay_fraction&amp;gt;&lt;br /&gt;
   &amp;lt;overlay_scale&amp;gt;1000.0&amp;lt;/overlay_scale&amp;gt;&lt;br /&gt;
   &amp;lt;distortion_factor&amp;gt;0.3&amp;lt;/distortion_factor&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This results in the overlay texture superimposed in irregular patches. &lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro03.jpg|400px|center|Overlay de-tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
De-tiling can also be achieved by rotating the texture coordinates inside patches. This is controlled by a rotation flag which can be set to 1 (random rotation) or 2 (rotation by multiples of 90 degrees only) in addition to a rotation scale. In case of very regular textures which should be rotated by multiples of 90 degrees only, uv texture coordinate offsets are provided to align texture and rotated domain.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;rotation_flag&amp;gt;1&amp;lt;/rotation_flag&amp;gt;&lt;br /&gt;
   &amp;lt;rotation_scale&amp;gt;2000.0&amp;lt;/rotation_scale&amp;gt;&lt;br /&gt;
   &amp;lt;uv_xoffset&amp;gt;0.0&amp;lt;/uv_xoffset&amp;gt;&lt;br /&gt;
   &amp;lt;uv_yoffset&amp;gt;0.0&amp;lt;/uv_yoffset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using domain rotation also leads to a reasonable de-tiling while keeping the color impression.&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro02.jpg|400px|center|Overlay de-tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
Both rotation and overlay can be combined. Neither of the effects is compatible with patterns of random trees of buildings created by placement masks, as these are used at tile loading time and can not be changed runtime like shader effects.&lt;br /&gt;
&lt;br /&gt;
=== The rock effect ===&lt;br /&gt;
&lt;br /&gt;
Specifically for rock, a completely procedural scheme to generate various types of rock structures is available. Since this is computationally about on par with the overlay texture schemes for generic terrain, it activates only at highest rendering quality level.&lt;br /&gt;
&lt;br /&gt;
The effect needs to be declared for the landclass as&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;effect&amp;gt;Effects/rock&amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rock is drawn by overlaying several structure layers. The base layer is set by several octaves of Perlin noise superimposed as brightness variation onto a specified texture color. The relevant configuration parameters are e.g.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;1.3&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;base-color&amp;gt; is a rgb triplet with color values ranging from 0 to 1 specifying the primary hue of the rock to be drawn. &amp;lt;ontrast&amp;gt; regulates how strongly the noise modification of rock brightness will appear from 0 (no noise modulation) to 1 (full noise modulation). &amp;lt;grain-fade-power&amp;gt; regulates the balance between large-scale and small-scale noise. Values above 1 will emphasize small-scale structures, values below 1 will emphasize large-scale structures. There is no real limit to the parameter, but presumably values outside [0.5:1.5] won't look compelling.&lt;br /&gt;
&lt;br /&gt;
The effect of the fade power ranging from 0.8 to 1.3 is illustrated by the following series of screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp0.8.jpg|300px|Grain fade power 0.8]]&lt;br /&gt;
[[File:Rock-gfp1.0.jpg|300px|Grain fade power 1.0]]&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|Grain fade power 1.3]]&lt;br /&gt;
&lt;br /&gt;
The effect of the contrast parameter changing from 1.0 to 0.7 looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|Contrast 1.0]]&lt;br /&gt;
[[File:Rock-contrast.jpg|300px|Contrast 0.7]]&lt;br /&gt;
&lt;br /&gt;
Since it is difficult to guess the resulting visual brightness of rock after all noise and overlay patterns have been added, &amp;lt;rock-brightness&amp;gt; is a convenient scale after to multiply pixel color after all layers have been added.&lt;br /&gt;
&lt;br /&gt;
The overlay layer is based on Perlin noise domains and draws with a different color onto the base layer. The relevant parameters are&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;-0.05&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the &amp;lt;overlay-color&amp;gt; is again a rgb triplet and &amp;lt;overlay-alpha&amp;gt; its transparency value. &amp;lt;overlay-bias&amp;gt; should take values between -0.5 and 0.5 and controls the amount of surface to be covered with the overlay color.&lt;br /&gt;
&lt;br /&gt;
As illustrated by the following screenshots, the overlay layer can be used to draw moss and lichen cover as well as mineral crusts on top of the base rock layer:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|No overlay]]&lt;br /&gt;
[[File:Rock-lichen.jpg|300px|Green overlay, small alpha, positive bias]]&lt;br /&gt;
[[File:Rock-crust.jpg|300px|White overlay, large alpha, negative bias]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The crack layer is based on stretched Perlin noise isolines and controlled by the parameters&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;crack-depth&amp;gt; (from 0 to 1) regulates how pronounced the darkening inside the crack region is whereas the &amp;lt;crack-pattern-stretch&amp;gt; (from 1 to roughly 10) controls the elongation of the crack pattern.&lt;br /&gt;
&lt;br /&gt;
For low stretch values, the crack layer can be used to draw bands of different mineral inside the rock, for high stretch values it can simukate a genuine pattern of cracks in the surface, see screenshots below for an illustration:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-crust.jpg|300px|No cracks]]&lt;br /&gt;
[[File:Rock-crack1.jpg|300px|Stretch factor 1]]&lt;br /&gt;
[[File:Rock-crack7.jpg|300px|Stretch factor 7]]&lt;br /&gt;
&lt;br /&gt;
Finally, stratified and slope line noise (see above) are also available as texture brightness modifiers. The parameters are&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/rock_strata&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;slope-contrast&amp;gt; (value between 0 and 1) regulates how pronounced the slope lines are drawn and &amp;lt;rock_strata&amp;gt; (value 0 or 1) indicated whether stratified noise should be used or not. Neither slope noise nor stratified noise affect flat rock surfaces, they only lead to modulation on sufficiently steep rock surfaces.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 1:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter set&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt; &lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;7.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata&amp;gt;0&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in rock drawn like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-example1.jpg|500px|center|Procedural rock, example 1]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following set of parameters&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.3&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata&amp;gt;1&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
leads to stratified rock like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-example2.jpg|500px|center|Procedural rock, example 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The dirt runway effect ===&lt;br /&gt;
&lt;br /&gt;
Using a dedicated ALS effect, it is possible to generate a wide variety of visuals for non-paved runways. The effect is used to texture a runway as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;Effects/dirt-runway&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the textures and parameters to configure it must be specified in the &amp;lt;parameters&amp;gt; section of the landclass used for the runway.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Part of the effect explicitly relies on a particular uv-mapping of the dirt runways. For this reason, the effect may or may not work as intended with scenery other than FG world scenery 2.0 - in particular custom scenery builds may not give the desired visuals if they treat unpaved runways differently.&lt;br /&gt;
&lt;br /&gt;
The effect uses a mixture of three texture layers - a base texture layer (n=16) an overlay texture layer (n=17) and a grain texture layer (supposed to be a largely transparent texture with just a darker overlay pattern on it, n=18).&lt;br /&gt;
&lt;br /&gt;
For each of the textures, a mapping to a physical size of the texture patch can be defined by the set of parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;100.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;100.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(i.e. setting a parameter to 100 means that the texture sheet is supposed to represent a 100 m x 100 m patch of runway). This is different from the way the default renderer treats dirt runways by stretching the assigned texture over the whole runway (i.e. texture magnification depends on runway size). The strength of the grain overlay can be controlled by&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.3&amp;lt;/grain_strength&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
where a value of zero implies no grain texture and a value of 1 the full grain effect as on the texture.&lt;br /&gt;
&lt;br /&gt;
The mixture of base and overlay texture layers is controlled by filtered Perlin noise. The frequencies of the base noise distribution can be controlled by &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the sum of all parameters is supposed to be 1. Strengthening a parameter generates more structure at this scale, for instance in order to generate a small-scale, fine-grained pattern one should set the lower frequencies to larger values, whereas for large continuous patches of texture strength_10m and strength_5m should be largest.&lt;br /&gt;
&lt;br /&gt;
The raw Perlin noise is post-processed by a filter driven by two parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of these, the threshold regulates the relative mixture of the two textures (0.5 roughly corresponds to 50%) and transition how the mixture will be drawn. A small transition value (say 0.1) corresponds to an either/ or scenario in which only one of the textures will be drawn (appropriate for grass patches on dirt), a large transition value smoothly blends the textures (appropriate for different sand textures).&lt;br /&gt;
&lt;br /&gt;
If&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
is set to 1, the noise distribution will tend to favor the base layer in the center of the runway. &amp;lt;b&amp;gt;This requires a specific uv-mapping and will not work for custom-generated runways.&amp;lt;/b&amp;gt; The strength of that bias is set by&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is between 0 (no bias) and 1 (don't draw overlay layer in runway center no matter what).&lt;br /&gt;
&lt;br /&gt;
In addition, the effect uses a normal map (since it is used in a non-standard way, touch at your own risk) - the visual 'bumpiness' of the runway can be adjusted using &lt;br /&gt;
&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using different mixtures of textures and parameters, a wide variety of visuals can be achieved, a few examples in the following.&lt;br /&gt;
&lt;br /&gt;
A lakebed texture overlaid with sand gives proper visuals for e.g. the Rogers Dry Lake runways at Edwards AFB:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Terrain/sand_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand1.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;100.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;100.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.3&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy01.jpg|500px|Dirt runway example 1]]&lt;br /&gt;
&lt;br /&gt;
Using a largely grass-textured surface and allowing some gravel to show in the runway center gives the appearance of a worn grass runway:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Terrain/sand_hires_ochre.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.3&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.0&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.1&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.2&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.15&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.1&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;30.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;50.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.8&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy02.jpg|500px|Dirt runway example 2]]&lt;br /&gt;
&lt;br /&gt;
Using the effect 'as is', i.e. without any additional parameters, reproduces the old appearance of the dirt runway effect in ALS:&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy03.jpg|500px|Dirt runway example 3]]&lt;br /&gt;
&lt;br /&gt;
With the original dirt runway texture mapped to a small size and framed by less structured dirt, also a compelling result can be achieved:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand_hires_ochre.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;25.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.4&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy04.jpg|500px|Dirt runway example 4]]&lt;br /&gt;
&lt;br /&gt;
Using grass as the overlay material blends the runway outline nicely into the airport keep:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.2&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.6&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.2&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.0&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.0&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.1&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.8&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;20.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
       &amp;lt;grain_strength&amp;gt;0.6&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy05.jpg|500px|Dirt runway example 5]]&lt;br /&gt;
&lt;br /&gt;
Finally an example of diffuse sand patches blended into each other by low frequency noise and a large value of the transition in the filter:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.2&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.3&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.2&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.4&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.5&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;20.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.2&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy06.jpg|500px|Dirt runway example 6]]&lt;br /&gt;
&lt;br /&gt;
=== Overlay layers ===&lt;br /&gt;
&lt;br /&gt;
The ALS rendering framework also supports rendering a low layer with a '3D' structure which is created dynamically by a geometry shader - this can be used for undergrowth or rocks - see below for an example of undergrowth in northern boreal forest:&lt;br /&gt;
&lt;br /&gt;
[[File:Overlay01.jpg|500px|center|Overlay layer used as undergrowth]]&lt;br /&gt;
&lt;br /&gt;
The overlay layer is created by extruding a number of 'shells' from the base ground surface (with a LOD system controlling how many shells are extruded) and texturing the part of the shell which intersects with the 3d structure of the object to be rendered. This looks fairly compelling from above, but of course for shallow viewing angles the nature of the illusion is readily apparent, and once the view direction is parallel to the shells, the 3D structure vanishes because one is looking right between shells. It's therefore a good idea to keep the overlay layer low (&amp;lt; 1 m) and supplement it with other elements such as random vegetation.&lt;br /&gt;
&lt;br /&gt;
The overlay layer needs to be both enabled in user preferences and requested by the landclass definition to be shown. In the materials file, the corresponding effect needs to be set as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;effect&amp;gt;Effects/terrain-overlay&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to enable the layer. If the overlay is not selected in the ALS quality levels, the effect will automatically fall back to terrain-default (the same will happen if ALS is not selected as renderer).&lt;br /&gt;
&lt;br /&gt;
In the materials file, a number of parameters govern the appearance of the overlay layer. The following example is from Hawaii texturing (here (...) means that these declarations for the layer need to be done in addition to other procedural texturing described above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;texture-set&amp;gt;&lt;br /&gt;
          (...)&lt;br /&gt;
	  &amp;lt;texture n=&amp;quot;20&amp;quot;&amp;gt;Terrain/dry_pasture4.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
	  &amp;lt;texture n=&amp;quot;21&amp;quot;&amp;gt;Terrain/dry_pasture4.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;/texture-set&amp;gt;&lt;br /&gt;
	&amp;lt;parameters&amp;gt;&lt;br /&gt;
          (...)&lt;br /&gt;
	  &amp;lt;max_overlay_height&amp;gt;1.0&amp;lt;/max_overlay_height&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_hardness&amp;gt;0.0&amp;lt;/overlay_hardness&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_density&amp;gt;0.6&amp;lt;/overlay_density&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_scale&amp;gt;2.0&amp;lt;/overlay_scale&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_autumn_flag&amp;gt;0&amp;lt;/overlay_autumn_flag&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_brightness_top&amp;gt;0.8&amp;lt;/overlay_brightness_top&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_brightness_bottom&amp;gt;0.4&amp;lt;/overlay_brightness_bottom&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_secondary_flag&amp;gt;1&amp;lt;/overlay_secondary_flag&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_secondary_hardness&amp;gt;0.0&amp;lt;/overlay_secondary_hardness&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_secondary_density&amp;gt;1.0&amp;lt;/overlay_secondary_density&amp;gt;&lt;br /&gt;
         &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's go through these entries.&lt;br /&gt;
&lt;br /&gt;
First, the overlay layer can support two different structures with different textures (for instance undergrowth and rock). The number 20 defines the texture for the primary layer, the number 21 for the secondary layer. The code makes an assumption that the secondary layer is smaller in height than the primary layer, so plan accordingly.&lt;br /&gt;
&lt;br /&gt;
The first four parameters determine the apparent geometry of the overlay objects. All 'objects' (which really are painted on the shells only, remember) are based on Perlin noise to give them a pseudo-random appearance. &amp;lt;b&amp;gt;&amp;lt;max_overlay_height&amp;gt;&amp;lt;/b&amp;gt; is the maximal distance the upper layer will be extruded from the ground - the largest of the random structures will reach to this level. As mentioned above, it's generally a good idea to keep this &amp;lt; 1 m (although the effect will run for higher numbers). The &amp;lt;b&amp;gt;&amp;lt;overlay_hardness&amp;gt;&amp;lt;/b&amp;gt; is a number between 0 and 1 and determines how blurry the edges of the structures will be - generally for vegetation one wants a now hardness, for rock (see below) a high hardness to get the illusion of a well-defined surface). &lt;br /&gt;
&lt;br /&gt;
[[File:Overlay03.jpg|500px|center|Overlay layer used as rock]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;b&amp;gt;&amp;lt;overlay_density&amp;gt;&amp;lt;/b&amp;gt; determines how much overlay objects there will be (technically, it's a bias for the Perlin noise) - a high density will give a nearly closed layer, a low density instead only a few objects far and between. Finally, the &amp;lt;b&amp;gt;&amp;lt;overlay_scale&amp;gt;&amp;lt;/b&amp;gt; is a parameter used to stretch the noise pattern horizontally. By default, the pattern is around 1-2 m scale, setting the parameter e.g. to 5 will stretch this horizontally to 5-10 m (while leaving the vertical height constant).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The overlay layer is fully interfaced with pixel-post-processing (see below). It is automatically submerged in snow based on altitude information and the simulated snow level, but the shader can not know whether a structure is supposed to be rock or vegetation, thus to participate in autumn coloring, the &amp;lt;b&amp;gt;&amp;lt;overlay_autumn_flag&amp;gt;&amp;lt;/b&amp;gt; needs to be set.&lt;br /&gt;
&lt;br /&gt;
A nice shading effect bringing out the 3d structure better (a cheap version of ambient occlusion basically) can be achieved by setting &amp;lt;b&amp;gt;&amp;lt;overlay_brightness_top&amp;gt;&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;&amp;lt;overlay_brightness_bottom&amp;gt;&amp;lt;/b&amp;gt; to different values (these are multiplies for the base texture color). What the best values should be really depends on the texture that is used.&lt;br /&gt;
&lt;br /&gt;
The secondary layer shares most properties with the primary layer. It needs to be activated using &amp;lt;b&amp;gt;&amp;lt;overlay_secondary_flag&amp;gt;&amp;lt;/b&amp;gt; and it is possible to give it a different apparent hardness and density using &amp;lt;b&amp;gt;&amp;lt;overlay_secondary_hardness&amp;gt;&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;&amp;lt;overlay_secondary_density&amp;gt;&amp;lt;/b&amp;gt;. Since the secondary layer utilizes &amp;lt;i&amp;gt; the same&amp;lt;/i&amp;gt; Perlin noise generated for the primary layer, the two layers can not generate overlapping structures by constructions (thus, no 'bush' and merge with a 'rock'). That also means that a secondary layer with texture and parameters identical to the primary layer can be declared to generate an extra-dense layer. Generally though secondary layers should be used with care.&lt;br /&gt;
&lt;br /&gt;
=== Pixel color postprocessing ===&lt;br /&gt;
&lt;br /&gt;
A number of environment effects are implemented under user control in the Environment menu. Let's consider the changes to the base scene:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural01.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Snow ====&lt;br /&gt;
&lt;br /&gt;
Using terrain elevation and gradient information, the base location of a snow layer can be determined. The actual snow cover is a white base color, mixed with Perlin noise and normal-mapped with Perlin noise of multiple frequencies. A bias factor for the mixing allows to simulate snow layer of varying thickness.&lt;br /&gt;
&lt;br /&gt;
A low layer thickness creates patches of snow on the terrain through which the basic terrain textures are visible:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural02.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
A high layer thickness completely covers the terrain in snow. Subtle procedural color variations of the snow and bump-mapping change the base white snow pixel color into a realistic texture:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural03.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
If the snowline is placed higher, snow is only simulated on the mountain tops - note also that steep gradients tend to remain clear of snow:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural04.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Dust ====&lt;br /&gt;
&lt;br /&gt;
The dust effect mixes all pixels of the terrain with a basic dust color. A low dust effect setting gives the terrain a dry and parched appearance, as after a long summer period without rain.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural05.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
A high dust effect setting changes the appearance to desert-like terrain (which is rather unrealistic for this scenery):&lt;br /&gt;
&lt;br /&gt;
[[File:procedural06.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Wetness ====&lt;br /&gt;
&lt;br /&gt;
Wet terrain is rendered overall darker. In flat areas, in addition patches of high specular reflection are added, leading to the appearance of glitterin light reflections on water puddles.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural07.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Vegetation ====&lt;br /&gt;
&lt;br /&gt;
A high setting of the vegetation cover is most appropriate for tropical settings, but it can also be used to show seasonal effects, for instance the desert a few days after rainfall. It covers the whole terrain with mossy overgrowth, which in the case of the Grenoble scenery used here blurs the boundaries of the fields and gives the appearance of abandoned agriculture.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural08.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Autumn colors ====&lt;br /&gt;
&lt;br /&gt;
The autumn color effect is unique in the pixel color postprocessing effects in that it needs modifications to the base texture to work. Since the basic terrain texture is never transparent, the information of where vegetation changes color in autumn and where it remains unchanged is hence encoded in the terrain texture alpha channel. A value of 1 means no change of color, a value of 0.5 is appropriate for high changes to bright red-orange. In order to work with the autumn effect, all textures need to be edited manually to indicate where the effect should be computed.&lt;br /&gt;
&lt;br /&gt;
In early autumn, vegetation just tends to pale a little:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural09.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
Later, fields get bright golden-yellow whereas deciduous forests go to orange-red (mixed forest cover rotates locally where indicated by the alpha channel):&lt;br /&gt;
&lt;br /&gt;
[[File:procedural10.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
Finally, in late autumn all vegetation cover is turned into a dull brown:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural11.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
== Limitations of procedural texturing ==&lt;br /&gt;
&lt;br /&gt;
Despite its obvious benefits, there are some problems which are not easily addressed by procedural terrain texturing.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Landclass boundaries&amp;lt;/b&amp;gt;: Procedural texturing can de-emphasize landclass boundaries. This happens for instance if a landclass uses both overlay and detail texture, and only the base texture is changed in the adjacent landclass. Since the noise is continuous across landclass boundaries, the change in base texture is masked by the continuous overlay components. However, procedural texturing can not remove the landclass seams, as a different texture mix is evaluated for every declared landclass.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Detail averaging:&amp;lt;/b&amp;gt; A problem arises when details are generated which are smaller than a pixel. In this case, the rendering engine does not average over many sub-pixels to determine the final color of the pixel but just takes one (few) samples. This means that a high contrast detailed structure of black and white is not averaged to a grey pixel but, dependent on the viewer position, either results in a black or a white pixel. The net result is a flickering Moire pattern which is visually very unpleasant (the same effect occurs when models get smaller than a pixel). In textures, the problem is solved by mipmapping - every 4 pixels are averaged to a single pixel on a coarse-grained version of the texture at texture loading time, and only the appropriate resolution level of the texture is referenced. To do the same thing in procedural texturing is very expensive (two resolution levels up one ends with 16 times the calculational effort for a pixel), so a viable strategy to remove the flickering patterns involves replacing noise by its &amp;lt;i&amp;gt;global&amp;lt;/i&amp;gt; average (i.e. the 'all pixel' rather than '4 pixel' average, which is usually known for the noise function). The net result is that procedurally generated details tend to looks less grainy than true textures as soon as details get smaller than a single pixel, which is s subtle, but noticeable effect. In essence, this is similar to an antialiasing problem and could also be dealt with by generically sampling multiple sub-pixels at the expense of the increased performance cost.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Computational cost:&amp;lt;/b&amp;gt; Especially on older graphics cards, multiple texture lookups combined with evaluating noise and other functions is significantly slower than just texturing the terrain with a single texture. Most optimization strategies used in other 3D games (such as filling the z-buffer early and discarding occluded pixels) do not work well for a flight simulator where most of the terrain is visible at any given time.&lt;br /&gt;
&lt;br /&gt;
Some points have found a solution:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Terrain tile boundaries&amp;lt;/b&amp;gt;: Terrain is loaded in discrete chunks, so-called tiles. For technical reasons, the coordinate system used to address positions changes for each tile. In practice, this unfortunately implies that noise functions are discontinuous across tile boundaries, and this shows in more or less pronounced seams in the computed textures -&amp;gt; however this can be addressed by going from tile-based to FG world coordinates and using 3-d noise. Due to the large distances involved, small-scale noise becomes then numerically unstable, but noise wavelength above 250 m can safely be done in world coordinates, leading to appealing visuals both at large and small distance.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Tiling for non-natural landclasses&amp;lt;/b&amp;gt;: The de-tiling strategies described above are based on mixing texture components using noise functions. This works fine for natural landclasses, but human-influenced landclasses like agriculture or urban terrain are not well described by Perlin noise, and de-tiling crop fields using noise functions does not yield plausible results.This is now solved by domain noise.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS technical notes]]&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.science-and-fiction.org/rendering/noise.html From random number to texture - GLSL noise functions]&lt;br /&gt;
* http://www.upvector.com/?section=Tutorials&amp;amp;subsection=Intro%20to%20Procedural%20Textures&lt;br /&gt;
* http://www.graphics.usc.edu/cgit/publications/papers/p95-rhoades.pdf&lt;br /&gt;
* http://www.vis.uni-stuttgart.de/~dachsbcn/download/ProcReproduction.pdf&lt;br /&gt;
* http://www.unilim.fr/pages_perso/guillaume.gilet/Recherche/pdf/CGI12.pdf&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg39692.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Procedural_texturing&amp;diff=114279</id>
		<title>Procedural texturing</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Procedural_texturing&amp;diff=114279"/>
		<updated>2018-02-04T07:27:22Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Overlay layers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
&lt;br /&gt;
'''Procedural texturing''' is a set of techniques where the color of a pixel is not determined by a texture image but fully or partially by evaluating a mathematical function. This article describes why procedural texturing is useful, what it can and can't do and how it is used and configured in [[FlightGear]].&lt;br /&gt;
&lt;br /&gt;
== The terrain texturing challenge ==&lt;br /&gt;
&lt;br /&gt;
The FlightGear terrain is segmented into different landclasses (Urban, Ocean, Glacier, ShrubCover,...) which describe what the terrain at a location is like. In the default texturing scheme, the file '''materials.xml''' is used to describe (among other things) what texture sheet is mapped onto a given landclass.&lt;br /&gt;
&lt;br /&gt;
A typical terrain texture sheet has 512x512 pixels and is mapped onto a 2000m x 2000m sized area, which means that each pixel covers a 4m x 4m area in unsloped terrain. For the sake of the argument, assume the texture has a size of 300 kB in compressed form which expands to about 1 MB in the GPU memory after mipmapping.&lt;br /&gt;
&lt;br /&gt;
The optimal distance to view the texture is when every texture pixel corresponds to a pixel on the screen, as then the maximum possible detail of the texture is exploited. Assuming a 60 deg field of view looking straight down onto the texture, that distance is about 2500 m.&lt;br /&gt;
&lt;br /&gt;
If the texture is seem from a much larger distance, it does not large enough to cover the terrain, and hence it is automatically repeated. From about 3 times the optimal distance, this repetition creates a visually rather pronounced pattern which is referred to as tiling:&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|center|An example for texture tiling]]&lt;br /&gt;
&lt;br /&gt;
If the texture is seen from a much smaller distance, a single texture pixel covers multiple screen pixels, which makes the terrain look coarse-grained and unrealistic:&lt;br /&gt;
&lt;br /&gt;
[[File:resolution_example.jpg|400px|center|An example for low texture resolution]]&lt;br /&gt;
&lt;br /&gt;
A third problem occurs because the boundaries of the landclasses are vector data, i.e. they appear as unnaturally sharp division lines between different textures.&lt;br /&gt;
&lt;br /&gt;
Thus, the main challenges for realistic terrain texturing can be summarized as the three areas&lt;br /&gt;
&lt;br /&gt;
* tiling&lt;br /&gt;
* resolution&lt;br /&gt;
* boundaries&lt;br /&gt;
&lt;br /&gt;
=== Addressing the challenges ===&lt;br /&gt;
&lt;br /&gt;
Tiling and resolution are correlated problems, i.e. many solution to one tend to make the other worse. For instance, resolution can easily be dealt with by mapping the texture sheet onto a smaller area, say 500m x 500 m, which gives a pixel size of 1m. However, then tiling becomes apparent from just 1500 m distance, i.e. almost inevitably.&lt;br /&gt;
&lt;br /&gt;
Tiling is also reduced if the variation of contrast inside a texture is reduced, i.e. the texture becomes more 'dull' and the pattern repetition is less obvious:&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|An example for texture tiling]]&lt;br /&gt;
[[File:contrast_reduction.jpg|400px|Reduced contrast makes the problem less apparent]]&lt;br /&gt;
&lt;br /&gt;
However, contrasts within a texture are the best way to distract the eye from the sharp landclass boundaries, so if one uses low contrast textures, the landclass boundary problem gets often worse.&lt;br /&gt;
&lt;br /&gt;
Tiling can also be reduced at the expense of texture detail if a single texture sheet is mapped onto a larger area.&lt;br /&gt;
&lt;br /&gt;
To some degree, all problems lessen with increased texture resolution - using 4096x4096 texture sheets allow 0.5m x 0.5m resolution if mapped onto the same areas - but memory consumption quickly becomes as issue as a single texture sheet of that size uses ~64 MB of graphic memory already. &lt;br /&gt;
&lt;br /&gt;
=== Photo texturing ===&lt;br /&gt;
&lt;br /&gt;
The tiling problem can be solved if each 2000m x 2000m area to be textured does not get the same texture sheet. If aerial imagery is used (see [[Photoscenery]]) then also the landclass boundary is solved. However, this inevitably creates a resolution problem. To see this, consider the following numbers: On a clear day, the visibility from airliner cruise altitude can easily be 120 km. This means that 45.000 square kilometers of terrain are visible at any given time. Using 2000mx2000m mapped texture sheets as in the example above, unique terrain texturing then needs 11.000 different texture sheets with a size of 1 MB each in graphic memory, or about 11 GB of graphic memory, quite exceeding the capabilities of modern graphic cards. Assuming that about 1 GB of graphic memory is available for terrain textures (clouds, models, the cockpit,... also need memory), the individual pixel must have a size of 12 m x 12 m or larger, which means that photoscenery can either not be used for large visibility, or has a terrible resolution from close-up, or uses a LOD scheme (the above photoscenery would still use 3 GB of harddisk space though).&lt;br /&gt;
&lt;br /&gt;
Photo-texturing has other disadvantages - for instance the photographs are usually taken in a particular season in certain light, so the scene may easily seem unrealistic or wrong in a different season or at a different time of the day. FlightGear texturing also encodes meta-information (where on a texture to place trees or buildings) - such meta-information can not easily be encoded in photoscenery.&lt;br /&gt;
&lt;br /&gt;
=== Procedural texturing ===&lt;br /&gt;
&lt;br /&gt;
Procedural texturing is a solution to both the tiling and the resolution problem, and partially also for the boundary problem. A mathematical function, unlike a lookup table (which a texture in essence is) does not end at any boundary, i.e. it can simply be used across the whole scene without ever creating a repetition. Using a suitable noise function to mix various textures, a complete de-tiling effect can be achieved (this is really the same scene):&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|An example for texture tiling]]&lt;br /&gt;
[[File:procedural_detiling.jpg|400px|Procedural texturing removes the tiling]]&lt;br /&gt;
&lt;br /&gt;
A function can also be evaluated at any scale resolution. Unlike a texture which needs to be stored regardless if it is used or not, a function only needs to be evaluated for every screen pixel, i.e. the workload and memory requirement do not grow quadratically with the needed resolution but only linear. This scaling allows to dynamically add details to the scene as one gets closer (this is really the same scene):&lt;br /&gt;
&lt;br /&gt;
[[File:resolution_example.jpg|400px|An example for low texture resolution]]&lt;br /&gt;
[[File:procedural_resolution.jpg|400px|Procedural texturing adds details at close range]]&lt;br /&gt;
&lt;br /&gt;
== Building blocks of procedural texturing ==&lt;br /&gt;
&lt;br /&gt;
Mathematical functions can describe quite complex structures, but in order to be rendered in real time, the function has to evaluate fast enough. This means that 'simple' textures like snow, or possibly sand or rock can be completely procedural, while more complex shapes like agriculture which shows fields, crops, access paths and drains can remain a texture with some structure added procedurally. In general, a mixture of textures and functions is used for best effect. &lt;br /&gt;
&lt;br /&gt;
The most important building blocks of procedural texturing are noise functions. A noise function is a function which takes the coordinates of a pixel as input and returns a pseudo-random number between 0 and 1 as output. Noise functions aren't uniquely defined, and there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
=== Perlin noise ===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Perlin_noise '''Perlin noise'''] is noise which exists at a certain scale (say 10 m). It is built by dividing the scene into a 10m x 10 m grid, creating random values at each grid point and interpolating smoothly between the grid points. The function created that way varies typically at a scale of 10 m, but not at much smaller scales and averages to 0.5 at much larger scales. Perlin noise isn't so useful at just a single scale, but noise at several scales added together can achieve a very realistic effect of roughness and structure. Finding the correct noise frequencies and amplitudes for blending Perlin noise to a realistic appearance is an art rather than a computational task.&lt;br /&gt;
&lt;br /&gt;
=== Sparse dot noise ===&lt;br /&gt;
&lt;br /&gt;
For sparse dot noise, the terrain is divided into a grid at certain scale, then random values at the grid edges are used to determine if a dot is placed into the cell, where into the cell it is placed and what radius it has. Based on the distance to the dot, the function returns 0 if the point probed is far from the dot and 1 at the dot position. &lt;br /&gt;
&lt;br /&gt;
From the superposition of several sparse dot distributions, dense dot distributions can be created. Note that a sparse dot distribution does not average to 0.5 but, dependent on the details of the implementation, to a much lower value.&lt;br /&gt;
&lt;br /&gt;
=== Stratified noise ===&lt;br /&gt;
&lt;br /&gt;
Stratified noise uses the terrain mesh altitude information to draw bands of constant altitude which each have a random number associated. The bands are then distorted in width by an altitude-dependent random number and modulated with an (xy)-position dependent random number. Stratified noise is rather useful for some types of rock formations.&lt;br /&gt;
&lt;br /&gt;
=== Domain noise ===&lt;br /&gt;
&lt;br /&gt;
The idea of domain noise is to segment the terrain into discrete patches, each of which has a random number associated. Unlike for Perlin noise, the number is not interpolated, it suddenly jumps at the domain boundary to a different value.&lt;br /&gt;
&lt;br /&gt;
The FG implementation of domain noise uses a regular grid at some wavelength, then distorts the grid points by random numbers and uses [http://en.wikipedia.org/wiki/Voronoi '''Voronoi tiling'''] to determine the domains within the distorted grid. This creates domains with a controllable irregularity which are all about the same size.&lt;br /&gt;
&lt;br /&gt;
Domain noise is very useful for man-made patterns, e.g. managed forest, agriculture or cities.&lt;br /&gt;
&lt;br /&gt;
=== Slope line noise ===&lt;br /&gt;
&lt;br /&gt;
For slope line noise, the terrain is segmented in patches, and based on the normal of the terrain, a line along the direction of steepest descent is drawn on the patch, with precise line position and thickness modulated by random numbers. This type of noise mixed into Perlin noise can give a good impression of snow distributions on steep slope or erosion patterns on terrain.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
To the left is an example for domain noise scaling the size of trees in patches of few hundred meters size, thus giving the impression of the different age of forest patches in a managed forest. On the right is an example of slopeline noise, emphasizing the vertical structure of the granite walls in Yosemite National Park.&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_forest.jpg|400px|Domain noise for forest]] [[File:Southwest08.jpg|375px|Slope line noise for Yosemite granite]]&lt;br /&gt;
&lt;br /&gt;
=== Terrain probing functions ===&lt;br /&gt;
&lt;br /&gt;
The underlying terrain can also be used as input for functions in a different way. Commonly used functions are for instance the altitude of a terrain pixel (for instance to determine the snow line) or its slope (to place rock textures on steep slopes). Since the underlying vector geometry of the terrain mesh leads to very sharp division lines, usually terrain probing functions are mixed with some noise for a more realistic appearance.&lt;br /&gt;
&lt;br /&gt;
=== Pixel color postprocessing ===&lt;br /&gt;
&lt;br /&gt;
Many environmental effects can be simulated at the simple expense of post-processing the color of a terrain pixel. For instance, mixing every pixel with a constant dust color can give the terrain a dusty appearance, mixing the final pixel color with a mossy green can give it an overgrown appearance. This is similar to the way pixel color is adjusted for fog, but unlike fog effects environment pixel color postprocessing does not involve distance computations between eye and pixel, rather the color is adjusted independent of the distance (but possibly dependent on terrain gradient or altitude).&lt;br /&gt;
&lt;br /&gt;
== Procedural terrain texturing in Flightgear ==&lt;br /&gt;
&lt;br /&gt;
As of Flightgear 2.10+, procedural texturing of the terrain is done by a general terrain shader which is configurable from &amp;lt;b&amp;gt;materials.xml&amp;lt;/b&amp;gt;. The creation of separate effects for various terrain types is not required (but still possible if so desired). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Currently the following requires that [[Atmospheric light scattering]] is on!&amp;lt;/b&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Basic texturing scheme ===&lt;br /&gt;
&lt;br /&gt;
The texturing scheme is controlled on a per-landclass basis from &amp;lt;b&amp;gt;materials.xml&amp;lt;/b&amp;gt;. The relevant sections for procedural textruring in each material declaration are &amp;lt;texture-set&amp;gt; and &amp;lt;parameters&amp;gt;. Here the &amp;lt;texture-set&amp;gt; block controls what textures are used whereas the &amp;lt;parameters&amp;gt; block controls how these textures are used. &lt;br /&gt;
&lt;br /&gt;
Another important part are &amp;lt;xsize&amp;gt; and &amp;lt;ysize&amp;gt; (the sections which describes to which size in meters the base texture is mapped). The procedural texturing shader computes the size of all used textures &amp;lt;i&amp;gt;relative&amp;lt;/i&amp;gt; to the base texture size, so if a base texture is declared to have a size of 500 m rather than the default 2000 m, the resolution of the hires overlay or the grain texture will automatically also be 5 times higher then default - which may or may not be desired.&lt;br /&gt;
&lt;br /&gt;
The individual textures which can be used are:&lt;br /&gt;
&lt;br /&gt;
==== Base texture ====&lt;br /&gt;
&lt;br /&gt;
The base texture is used as in the default scheme to give the basic appearance of a landclass. The base texture is assumed to be opaque, and its alpha channel is hence not evaluated to transparent, but rather used to encode where the autumn color effect should be used. An alpha value of 0.5 is appropriate for deciduous forests which should get a strong red-orange appearance in autumn, a value of 0.8-0.9 is more appropriate for grass surfaces.&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|center|Base Texture]]&lt;br /&gt;
&lt;br /&gt;
The base texture can take some additional parameters. The first is intrinsic wetness. If the quality level of the shader supports it, this will make the texture appear wet and add sparkling specular reflections to the terrain even if the surrounding terrain is dry. The dust resistance acts in the opposite way, it is intended for irrigated terrain in desert areas and is a multiplier for the dust effect, i.e. a value of 0.0 will make a landclass completely impervious to dust. Finally, rock strata represents an integer flag whether a stratified pattern will be drawn on vertical surfaces or not.  &lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;intrinsic_wetness&amp;gt;0.0&amp;lt;/intrinsic_wetness&amp;gt;&lt;br /&gt;
  &amp;lt;dust_resistance&amp;gt;1.0&amp;lt;/dust_resistance&amp;gt;&lt;br /&gt;
  &amp;lt;rock_strata&amp;gt;0&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value of intrinsic wetness is zero, the parameter can range from 0 (dry) to 1 (very wet, lots of open water). The defaul value of duse resistance is one, and the parameter can range from 1 (gets dusty like everything else) to 0 (impervious to dust).&lt;br /&gt;
&lt;br /&gt;
==== The overlay texture ====&lt;br /&gt;
&lt;br /&gt;
The overlay texture is a texture at a similar resolution level which is mixed with the base texture to achieve de-tiling or gradient effects. By default, it covers about 50% of the available scene. As for the base texture, the alpha channel of the overlay texture encodes color rotations in autumn.&lt;br /&gt;
&lt;br /&gt;
[[File:overlay1.jpg|400px|center|The overlay Texture]]&lt;br /&gt;
&lt;br /&gt;
The overlay texture can be used in two different modes or a mixture of them. The control parameter is &amp;lt;transition_model&amp;gt; - if this parameter is set to 0, the transition between base and overlay texture is determined by a noise function. If the parameter is set to 1, the slope of the terrain determines the transition and the overlay texture is only used on steep slopes. A setting of 0.5 uses a mixture of noise and slope information to drive the transition.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default texture selected is void.png which corresponds to no overlay texture.&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;transition_model&amp;gt;0.5&amp;lt;/transition_model&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.5, the parameter can range from 0 (random transition) to 1 (gradient-driven transition).&lt;br /&gt;
&lt;br /&gt;
==== The hires texture ====&lt;br /&gt;
&lt;br /&gt;
The hires texture adds patches of a texture at much higher resolution into the mix, which both add to de-tiling and lead to a better experience of the scenery from close-up. The hires textured patches will however inevitably appear featureless from large distance and will show tiling themselves, so the amount of hires texture as well as the hires texture sheet itself must be designed carefully.&lt;br /&gt;
&lt;br /&gt;
The areas covered by the hires texture will (partially to mask tiling of the hires patches) receive a stronger bumpmap and some distortion than the rest of the terrain by the shader.&lt;br /&gt;
&lt;br /&gt;
As for the base texture, the alpha channel of the hires texture encodes color rotations in autumn.&lt;br /&gt;
&lt;br /&gt;
[[File:overlay02.jpg|400px|center|The hires Texture]]&lt;br /&gt;
&lt;br /&gt;
The parameter &amp;lt;hires_overlay_bias&amp;gt; controls the fraction of terrain covered by the hires texture patches - by default about 40% of the scene will be covered. Positive or negative biases can make the fraction arbitrarily small or large.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default texture selected is void.png which corresponds to no hires texture. The hires texture does not require the overlay texture to be declared.&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;hires_overlay_bias&amp;gt;0.0&amp;lt;/hires_overlay_bias&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.0, the parameter can range from -0.5 (strong suppression of the hires overlay texture) to +0.5 (strong enhancement of the hires overlay texture).&lt;br /&gt;
&lt;br /&gt;
==== The gradient texture ====&lt;br /&gt;
&lt;br /&gt;
The gradient texture is exclusively used for steep terrain gradients (significantly steeper than the point at which the overlay texture may be used) to account for the fact that beyond a certain slope, terrain can not have vegetation cover and hence landclass information needs to be corrected if necessary.&lt;br /&gt;
&lt;br /&gt;
The default texture is rock.png which is hence used for all landclasses unless specifically declared otherwise. The default may be inappropriate in some regions (volcanic terrain with different rock hue, tropical terrain in which even steep slopes are covered) - the gradient texture then needs to be declared a different texture for all materials in the area. Declaring void.png will not use a gradient texture.&lt;br /&gt;
&lt;br /&gt;
The gradient texture does not use any parameters.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== The grain texture ====&lt;br /&gt;
&lt;br /&gt;
The grain texture adds a grainy pattern to the terrain at close distances, giving the appearance of better resolution. The grain texture parses the texture alpha channel as transparency (since it just superimposes a pattern), so here the alpha channel can not be used to encode vegetation effects, and the grain texture may not have a strong color.&lt;br /&gt;
&lt;br /&gt;
[[File:grain_texture.jpg|400px|center|The grain overlay texture]]&lt;br /&gt;
&lt;br /&gt;
To allow fine-tuning of the grain effect, the texture can be multiplied with the &amp;lt;grain_strength&amp;gt; parameter which sets the overall alpha of the grain effect - a low value works best on bright base textures whereas dark base textures may require a stronger grain.&lt;br /&gt;
&lt;br /&gt;
The default grain texture is grain_texture.png which adds a vegetation-like grain. This can be replaced with other grain patterns or void.png for no grain where appropriate.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain_strength&amp;gt; 0.5&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.5 and the parameter range is 0 (completely transparent) to 1 (completely opaque).&lt;br /&gt;
&lt;br /&gt;
==== The dot texture ====&lt;br /&gt;
&lt;br /&gt;
The dot overlay uses sparse dot noise to create detail in the scene. Sparse dot noise textured with a rock texture can give the appearance of boulders scattered across the terrain, the same noise textured with a grass texture can be used to create round vegetation patches.&lt;br /&gt;
&lt;br /&gt;
[[File:hires_terrain03.jpg|400px|center|The dot overlay texture creating grass patches]]&lt;br /&gt;
&lt;br /&gt;
Both the dot size and the dot density can be controlled by the user. The range out to which the dots are visible is automatically adjusted based on the dot size scale. By default, the dot texture is set to void.png, which means that no dot texture is used.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;dot_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;dot_density&amp;gt; 1.0&amp;lt;/dot_density&amp;gt;&lt;br /&gt;
  &amp;lt;dot_size&amp;gt; 1.0&amp;lt;/dot_size&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value for &amp;lt;dot_density&amp;gt; is 1.0, the parameter can be set in the range from 0.0 to 1.0 (values above 1.0 do not increase the dot density further). The default value for &amp;lt;dot_size&amp;gt; is also 1.0, which creates dots at size scales varying between 10 cm and few m. The parameter is a multiplier for these default values, i.e. at a value of 10 dots of ~10-20 m size are created.&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
The following declaration&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;texture-set&amp;gt;&lt;br /&gt;
   &amp;lt;texture&amp;gt;Terrain/marsh2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;Terrain/grass_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;Terrain/marsh4a.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
   &amp;lt;grain_strength&amp;gt;0.9&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
   &amp;lt;intrinsic_wetness&amp;gt;0.6&amp;lt;/intrinsic_wetness&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in marshland drawn like this&lt;br /&gt;
&lt;br /&gt;
[[File:marsh_example.jpg|400px|Procedural marshland close-up]]&lt;br /&gt;
[[File:wetness.jpg|400px|Procedural marshland from the distance]]&lt;br /&gt;
&lt;br /&gt;
The following declaration&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;texture&amp;gt;Terrain/shrub-hawaii.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;Terrain/sand_hires_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;Terrain/rock_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;Terrain/rock_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;Terrain/grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
   &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;rock_strata&amp;gt;1&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
   &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in stratified rock structures like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Southwest04.jpg|400px|Procedural rock Grand Canyon]]&lt;br /&gt;
[[File:Southwest09.jpg|400px|Procedural rock Zion National Park]]&lt;br /&gt;
&lt;br /&gt;
=== The agriculture effect ===&lt;br /&gt;
&lt;br /&gt;
The basic texture scheme based on Perlin noise is of limited value for e.g. agricultural terrain which rarely shows the organic shapes generated by Perlin noise. For such terrain, the agriculture effect should be used instead which is based on Perlin noise.&lt;br /&gt;
&lt;br /&gt;
The effect needs to be declared for the landclass as&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;effect&amp;gt;Effects/agriculture&amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(note that since the default rendering scheme has typically the crop effect associated with agriculture, this declaration inherits crop.eff).&lt;br /&gt;
&lt;br /&gt;
By default, large patches of agriculture usually show strong tiling:&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro01.jpg|400px|center|Tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
It is implemented in two modes, overlay and rotation. Since the agriculture effect is optional, its overlay texture is declared separately from the normal declaration above as follows:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the overlay texture is declared void.png (to which the effect defaults), it is not used. The effect takes a number of parameters. For the overlay, the fraction taken by the overlay texture and the scale at which the patches are drawn can be specified through the overlay fraction and the overlay scale, while the shape of the domains can be controlled using a distortion factor.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;overlay_fraction&amp;gt;0.5&amp;lt;/overlay_fraction&amp;gt;&lt;br /&gt;
   &amp;lt;overlay_scale&amp;gt;1000.0&amp;lt;/overlay_scale&amp;gt;&lt;br /&gt;
   &amp;lt;distortion_factor&amp;gt;0.3&amp;lt;/distortion_factor&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This results in the overlay texture superimposed in irregular patches. &lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro03.jpg|400px|center|Overlay de-tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
De-tiling can also be achieved by rotating the texture coordinates inside patches. This is controlled by a rotation flag which can be set to 1 (random rotation) or 2 (rotation by multiples of 90 degrees only) in addition to a rotation scale. In case of very regular textures which should be rotated by multiples of 90 degrees only, uv texture coordinate offsets are provided to align texture and rotated domain.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;rotation_flag&amp;gt;1&amp;lt;/rotation_flag&amp;gt;&lt;br /&gt;
   &amp;lt;rotation_scale&amp;gt;2000.0&amp;lt;/rotation_scale&amp;gt;&lt;br /&gt;
   &amp;lt;uv_xoffset&amp;gt;0.0&amp;lt;/uv_xoffset&amp;gt;&lt;br /&gt;
   &amp;lt;uv_yoffset&amp;gt;0.0&amp;lt;/uv_yoffset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using domain rotation also leads to a reasonable de-tiling while keeping the color impression.&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro02.jpg|400px|center|Overlay de-tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
Both rotation and overlay can be combined. Neither of the effects is compatible with patterns of random trees of buildings created by placement masks, as these are used at tile loading time and can not be changed runtime like shader effects.&lt;br /&gt;
&lt;br /&gt;
=== The rock effect ===&lt;br /&gt;
&lt;br /&gt;
Specifically for rock, a completely procedural scheme to generate various types of rock structures is available. Since this is computationally about on par with the overlay texture schemes for generic terrain, it activates only at highest rendering quality level.&lt;br /&gt;
&lt;br /&gt;
The effect needs to be declared for the landclass as&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;effect&amp;gt;Effects/rock&amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rock is drawn by overlaying several structure layers. The base layer is set by several octaves of Perlin noise superimposed as brightness variation onto a specified texture color. The relevant configuration parameters are e.g.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;1.3&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;base-color&amp;gt; is a rgb triplet with color values ranging from 0 to 1 specifying the primary hue of the rock to be drawn. &amp;lt;ontrast&amp;gt; regulates how strongly the noise modification of rock brightness will appear from 0 (no noise modulation) to 1 (full noise modulation). &amp;lt;grain-fade-power&amp;gt; regulates the balance between large-scale and small-scale noise. Values above 1 will emphasize small-scale structures, values below 1 will emphasize large-scale structures. There is no real limit to the parameter, but presumably values outside [0.5:1.5] won't look compelling.&lt;br /&gt;
&lt;br /&gt;
The effect of the fade power ranging from 0.8 to 1.3 is illustrated by the following series of screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp0.8.jpg|300px|Grain fade power 0.8]]&lt;br /&gt;
[[File:Rock-gfp1.0.jpg|300px|Grain fade power 1.0]]&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|Grain fade power 1.3]]&lt;br /&gt;
&lt;br /&gt;
The effect of the contrast parameter changing from 1.0 to 0.7 looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|Contrast 1.0]]&lt;br /&gt;
[[File:Rock-contrast.jpg|300px|Contrast 0.7]]&lt;br /&gt;
&lt;br /&gt;
Since it is difficult to guess the resulting visual brightness of rock after all noise and overlay patterns have been added, &amp;lt;rock-brightness&amp;gt; is a convenient scale after to multiply pixel color after all layers have been added.&lt;br /&gt;
&lt;br /&gt;
The overlay layer is based on Perlin noise domains and draws with a different color onto the base layer. The relevant parameters are&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;-0.05&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the &amp;lt;overlay-color&amp;gt; is again a rgb triplet and &amp;lt;overlay-alpha&amp;gt; its transparency value. &amp;lt;overlay-bias&amp;gt; should take values between -0.5 and 0.5 and controls the amount of surface to be covered with the overlay color.&lt;br /&gt;
&lt;br /&gt;
As illustrated by the following screenshots, the overlay layer can be used to draw moss and lichen cover as well as mineral crusts on top of the base rock layer:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|No overlay]]&lt;br /&gt;
[[File:Rock-lichen.jpg|300px|Green overlay, small alpha, positive bias]]&lt;br /&gt;
[[File:Rock-crust.jpg|300px|White overlay, large alpha, negative bias]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The crack layer is based on stretched Perlin noise isolines and controlled by the parameters&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;crack-depth&amp;gt; (from 0 to 1) regulates how pronounced the darkening inside the crack region is whereas the &amp;lt;crack-pattern-stretch&amp;gt; (from 1 to roughly 10) controls the elongation of the crack pattern.&lt;br /&gt;
&lt;br /&gt;
For low stretch values, the crack layer can be used to draw bands of different mineral inside the rock, for high stretch values it can simukate a genuine pattern of cracks in the surface, see screenshots below for an illustration:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-crust.jpg|300px|No cracks]]&lt;br /&gt;
[[File:Rock-crack1.jpg|300px|Stretch factor 1]]&lt;br /&gt;
[[File:Rock-crack7.jpg|300px|Stretch factor 7]]&lt;br /&gt;
&lt;br /&gt;
Finally, stratified and slope line noise (see above) are also available as texture brightness modifiers. The parameters are&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/rock_strata&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;slope-contrast&amp;gt; (value between 0 and 1) regulates how pronounced the slope lines are drawn and &amp;lt;rock_strata&amp;gt; (value 0 or 1) indicated whether stratified noise should be used or not. Neither slope noise nor stratified noise affect flat rock surfaces, they only lead to modulation on sufficiently steep rock surfaces.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 1:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter set&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt; &lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;7.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata&amp;gt;0&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in rock drawn like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-example1.jpg|500px|center|Procedural rock, example 1]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following set of parameters&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.3&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata&amp;gt;1&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
leads to stratified rock like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-example2.jpg|500px|center|Procedural rock, example 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The dirt runway effect ===&lt;br /&gt;
&lt;br /&gt;
Using a dedicated ALS effect, it is possible to generate a wide variety of visuals for non-paved runways. The effect is used to texture a runway as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;Effects/dirt-runway&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the textures and parameters to configure it must be specified in the &amp;lt;parameters&amp;gt; section of the landclass used for the runway.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Part of the effect explicitly relies on a particular uv-mapping of the dirt runways. For this reason, the effect may or may not work as intended with scenery other than FG world scenery 2.0 - in particular custom scenery builds may not give the desired visuals if they treat unpaved runways differently.&lt;br /&gt;
&lt;br /&gt;
The effect uses a mixture of three texture layers - a base texture layer (n=16) an overlay texture layer (n=17) and a grain texture layer (supposed to be a largely transparent texture with just a darker overlay pattern on it, n=18).&lt;br /&gt;
&lt;br /&gt;
For each of the textures, a mapping to a physical size of the texture patch can be defined by the set of parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;100.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;100.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(i.e. setting a parameter to 100 means that the texture sheet is supposed to represent a 100 m x 100 m patch of runway). This is different from the way the default renderer treats dirt runways by stretching the assigned texture over the whole runway (i.e. texture magnification depends on runway size). The strength of the grain overlay can be controlled by&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.3&amp;lt;/grain_strength&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
where a value of zero implies no grain texture and a value of 1 the full grain effect as on the texture.&lt;br /&gt;
&lt;br /&gt;
The mixture of base and overlay texture layers is controlled by filtered Perlin noise. The frequencies of the base noise distribution can be controlled by &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the sum of all parameters is supposed to be 1. Strengthening a parameter generates more structure at this scale, for instance in order to generate a small-scale, fine-grained pattern one should set the lower frequencies to larger values, whereas for large continuous patches of texture strength_10m and strength_5m should be largest.&lt;br /&gt;
&lt;br /&gt;
The raw Perlin noise is post-processed by a filter driven by two parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of these, the threshold regulates the relative mixture of the two textures (0.5 roughly corresponds to 50%) and transition how the mixture will be drawn. A small transition value (say 0.1) corresponds to an either/ or scenario in which only one of the textures will be drawn (appropriate for grass patches on dirt), a large transition value smoothly blends the textures (appropriate for different sand textures).&lt;br /&gt;
&lt;br /&gt;
If&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
is set to 1, the noise distribution will tend to favor the base layer in the center of the runway. &amp;lt;b&amp;gt;This requires a specific uv-mapping and will not work for custom-generated runways.&amp;lt;/b&amp;gt; The strength of that bias is set by&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is between 0 (no bias) and 1 (don't draw overlay layer in runway center no matter what).&lt;br /&gt;
&lt;br /&gt;
In addition, the effect uses a normal map (since it is used in a non-standard way, touch at your own risk) - the visual 'bumpiness' of the runway can be adjusted using &lt;br /&gt;
&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using different mixtures of textures and parameters, a wide variety of visuals can be achieved, a few examples in the following.&lt;br /&gt;
&lt;br /&gt;
A lakebed texture overlaid with sand gives proper visuals for e.g. the Rogers Dry Lake runways at Edwards AFB:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Terrain/sand_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand1.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;100.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;100.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.3&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy01.jpg|500px|Dirt runway example 1]]&lt;br /&gt;
&lt;br /&gt;
Using a largely grass-textured surface and allowing some gravel to show in the runway center gives the appearance of a worn grass runway:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Terrain/sand_hires_ochre.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.3&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.0&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.1&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.2&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.15&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.1&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;30.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;50.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.8&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy02.jpg|500px|Dirt runway example 2]]&lt;br /&gt;
&lt;br /&gt;
Using the effect 'as is', i.e. without any additional parameters, reproduces the old appearance of the dirt runway effect in ALS:&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy03.jpg|500px|Dirt runway example 3]]&lt;br /&gt;
&lt;br /&gt;
With the original dirt runway texture mapped to a small size and framed by less structured dirt, also a compelling result can be achieved:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand_hires_ochre.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;25.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.4&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy04.jpg|500px|Dirt runway example 4]]&lt;br /&gt;
&lt;br /&gt;
Using grass as the overlay material blends the runway outline nicely into the airport keep:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.2&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.6&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.2&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.0&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.0&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.1&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.8&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;20.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
       &amp;lt;grain_strength&amp;gt;0.6&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy05.jpg|500px|Dirt runway example 5]]&lt;br /&gt;
&lt;br /&gt;
Finally an example of diffuse sand patches blended into each other by low frequency noise and a large value of the transition in the filter:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.2&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.3&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.2&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.4&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.5&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;20.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.2&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy06.jpg|500px|Dirt runway example 6]]&lt;br /&gt;
&lt;br /&gt;
=== Overlay layers ===&lt;br /&gt;
&lt;br /&gt;
The ALS rendering framework also supports rendering a low layer with a '3D' structure which is created dynamically by a geometry shader - this can be used for undergrowth or rocks - see below for an example of undergrowth in northern boreal forest:&lt;br /&gt;
&lt;br /&gt;
[[File:Overlay01.jpg|500px|center|Overlay layer used as undergrowth]]&lt;br /&gt;
&lt;br /&gt;
The overlay layer is created by extruding a number of 'shells' from the base ground surface (with a LOD system controlling how many shells are extruded) and texturing the part of the shell which intersects with the 3d structure of the object to be rendered. This looks fairly compelling from above, but of course for shallow viewing angles the nature of the illusion is readily apparent, and once the view direction is parallel to the shells, the 3D structure vanishes because one is looking right between shells. It's therefore a good idea to keep the overlay layer low (&amp;lt; 1 m) and supplement it with other elements such as random vegetation.&lt;br /&gt;
&lt;br /&gt;
The overlay layer needs to be both enabled in user preferences and requested by the landclass definition to be shown. In the materials file, the corresponding effect needs to be set as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;effect&amp;gt;Effects/terrain-overlay&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to enable the layer. If the overlay is not selected in the ALS quality levels, the effect will automatically fall back to terrain-default (the same will happen if ALS is not selected as renderer).&lt;br /&gt;
&lt;br /&gt;
In the materials file, a number of parameters govern the appearance of the overlay layer. The following example is from Hawaii texturing (here (...) means that these declarations for the layer need to be done in addition to other procedural texturing described above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;texture-set&amp;gt;&lt;br /&gt;
          (...)&lt;br /&gt;
	  &amp;lt;texture n=&amp;quot;20&amp;quot;&amp;gt;Terrain/dry_pasture4.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
	  &amp;lt;texture n=&amp;quot;21&amp;quot;&amp;gt;Terrain/dry_pasture4.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
	&amp;lt;/texture-set&amp;gt;&lt;br /&gt;
	&amp;lt;parameters&amp;gt;&lt;br /&gt;
          (...)&lt;br /&gt;
	  &amp;lt;max_overlay_height&amp;gt;1.0&amp;lt;/max_overlay_height&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_hardness&amp;gt;0.0&amp;lt;/overlay_hardness&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_density&amp;gt;0.6&amp;lt;/overlay_density&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_scale&amp;gt;2.0&amp;lt;/overlay_scale&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_autumn_flag&amp;gt;0&amp;lt;/overlay_autumn_flag&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_brightness_top&amp;gt;0.8&amp;lt;/overlay_brightness_top&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_brightness_bottom&amp;gt;0.4&amp;lt;/overlay_brightness_bottom&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_secondary_flag&amp;gt;1&amp;lt;/overlay_secondary_flag&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_secondary_hardness&amp;gt;0.0&amp;lt;/overlay_secondary_hardness&amp;gt;&lt;br /&gt;
	  &amp;lt;overlay_secondary_density&amp;gt;1.0&amp;lt;/overlay_secondary_density&amp;gt;&lt;br /&gt;
         &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's go through these entries.&lt;br /&gt;
&lt;br /&gt;
First, the overlay layer can support two different structures with different textures (for instance undergrowth and rock). The number 20 defines the texture for the primary layer, the number 21 for the secondary layer. The code makes an assumption that the secondary layer is smaller in height than the primary layer, so plan accordingly.&lt;br /&gt;
&lt;br /&gt;
The first four parameters determine the apparent geometry of the overlay objects. All 'objects' (which really are painted on the shells only, remember) are based on Perlin noise to give them a pseudo-random appearance. &amp;lt;b&amp;gt;&amp;lt;max_overlay_height&amp;gt;&amp;lt;/b&amp;gt; is the maximal distance the upper layer will be extruded from the ground - the largest of the random structures will reach to this level. As mentioned above, it's generally a good idea to keep this &amp;lt; 1 m (although the effect will run for higher numbers). The &amp;lt;b&amp;gt;&amp;lt;overlay_hardness&amp;gt;&amp;lt;/b&amp;gt; is a number between 0 and 1 and determines how blurry the edges of the structures will be - generally for vegetation one wants a now hardness, for rock (see below) a high hardness to get the illusion of a well-defined surface). &lt;br /&gt;
&lt;br /&gt;
[[File:Overlay03.jpg|500px|center|Overlay layer used as rock]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;b&amp;gt;&amp;lt;overlay_density&amp;gt;&amp;lt;/b&amp;gt; determines how much overlay objects there will be (technically, it's a bias for the Perlin noise) - a high density will give a nearly closed layer, a low density instead only a few objects far and between. Finally, the &amp;lt;b&amp;gt;&amp;lt;overlay_scale&amp;gt;&amp;lt;/b&amp;gt; is a parameter used to stretch the noise pattern horizontally. By default, the pattern is around 1-2 m scale, setting the parameter e.g. to 5 will stretch this horizontally to 5-10 m (while leaving the vertical height constant).&lt;br /&gt;
&lt;br /&gt;
=== Pixel color postprocessing ===&lt;br /&gt;
&lt;br /&gt;
A number of environment effects are implemented under user control in the Environment menu. Let's consider the changes to the base scene:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural01.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Snow ====&lt;br /&gt;
&lt;br /&gt;
Using terrain elevation and gradient information, the base location of a snow layer can be determined. The actual snow cover is a white base color, mixed with Perlin noise and normal-mapped with Perlin noise of multiple frequencies. A bias factor for the mixing allows to simulate snow layer of varying thickness.&lt;br /&gt;
&lt;br /&gt;
A low layer thickness creates patches of snow on the terrain through which the basic terrain textures are visible:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural02.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
A high layer thickness completely covers the terrain in snow. Subtle procedural color variations of the snow and bump-mapping change the base white snow pixel color into a realistic texture:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural03.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
If the snowline is placed higher, snow is only simulated on the mountain tops - note also that steep gradients tend to remain clear of snow:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural04.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Dust ====&lt;br /&gt;
&lt;br /&gt;
The dust effect mixes all pixels of the terrain with a basic dust color. A low dust effect setting gives the terrain a dry and parched appearance, as after a long summer period without rain.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural05.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
A high dust effect setting changes the appearance to desert-like terrain (which is rather unrealistic for this scenery):&lt;br /&gt;
&lt;br /&gt;
[[File:procedural06.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Wetness ====&lt;br /&gt;
&lt;br /&gt;
Wet terrain is rendered overall darker. In flat areas, in addition patches of high specular reflection are added, leading to the appearance of glitterin light reflections on water puddles.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural07.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Vegetation ====&lt;br /&gt;
&lt;br /&gt;
A high setting of the vegetation cover is most appropriate for tropical settings, but it can also be used to show seasonal effects, for instance the desert a few days after rainfall. It covers the whole terrain with mossy overgrowth, which in the case of the Grenoble scenery used here blurs the boundaries of the fields and gives the appearance of abandoned agriculture.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural08.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Autumn colors ====&lt;br /&gt;
&lt;br /&gt;
The autumn color effect is unique in the pixel color postprocessing effects in that it needs modifications to the base texture to work. Since the basic terrain texture is never transparent, the information of where vegetation changes color in autumn and where it remains unchanged is hence encoded in the terrain texture alpha channel. A value of 1 means no change of color, a value of 0.5 is appropriate for high changes to bright red-orange. In order to work with the autumn effect, all textures need to be edited manually to indicate where the effect should be computed.&lt;br /&gt;
&lt;br /&gt;
In early autumn, vegetation just tends to pale a little:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural09.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
Later, fields get bright golden-yellow whereas deciduous forests go to orange-red (mixed forest cover rotates locally where indicated by the alpha channel):&lt;br /&gt;
&lt;br /&gt;
[[File:procedural10.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
Finally, in late autumn all vegetation cover is turned into a dull brown:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural11.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
== Limitations of procedural texturing ==&lt;br /&gt;
&lt;br /&gt;
Despite its obvious benefits, there are some problems which are not easily addressed by procedural terrain texturing.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Landclass boundaries&amp;lt;/b&amp;gt;: Procedural texturing can de-emphasize landclass boundaries. This happens for instance if a landclass uses both overlay and detail texture, and only the base texture is changed in the adjacent landclass. Since the noise is continuous across landclass boundaries, the change in base texture is masked by the continuous overlay components. However, procedural texturing can not remove the landclass seams, as a different texture mix is evaluated for every declared landclass.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Detail averaging:&amp;lt;/b&amp;gt; A problem arises when details are generated which are smaller than a pixel. In this case, the rendering engine does not average over many sub-pixels to determine the final color of the pixel but just takes one (few) samples. This means that a high contrast detailed structure of black and white is not averaged to a grey pixel but, dependent on the viewer position, either results in a black or a white pixel. The net result is a flickering Moire pattern which is visually very unpleasant (the same effect occurs when models get smaller than a pixel). In textures, the problem is solved by mipmapping - every 4 pixels are averaged to a single pixel on a coarse-grained version of the texture at texture loading time, and only the appropriate resolution level of the texture is referenced. To do the same thing in procedural texturing is very expensive (two resolution levels up one ends with 16 times the calculational effort for a pixel), so a viable strategy to remove the flickering patterns involves replacing noise by its &amp;lt;i&amp;gt;global&amp;lt;/i&amp;gt; average (i.e. the 'all pixel' rather than '4 pixel' average, which is usually known for the noise function). The net result is that procedurally generated details tend to looks less grainy than true textures as soon as details get smaller than a single pixel, which is s subtle, but noticeable effect. In essence, this is similar to an antialiasing problem and could also be dealt with by generically sampling multiple sub-pixels at the expense of the increased performance cost.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Computational cost:&amp;lt;/b&amp;gt; Especially on older graphics cards, multiple texture lookups combined with evaluating noise and other functions is significantly slower than just texturing the terrain with a single texture. Most optimization strategies used in other 3D games (such as filling the z-buffer early and discarding occluded pixels) do not work well for a flight simulator where most of the terrain is visible at any given time.&lt;br /&gt;
&lt;br /&gt;
Some points have found a solution:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Terrain tile boundaries&amp;lt;/b&amp;gt;: Terrain is loaded in discrete chunks, so-called tiles. For technical reasons, the coordinate system used to address positions changes for each tile. In practice, this unfortunately implies that noise functions are discontinuous across tile boundaries, and this shows in more or less pronounced seams in the computed textures -&amp;gt; however this can be addressed by going from tile-based to FG world coordinates and using 3-d noise. Due to the large distances involved, small-scale noise becomes then numerically unstable, but noise wavelength above 250 m can safely be done in world coordinates, leading to appealing visuals both at large and small distance.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Tiling for non-natural landclasses&amp;lt;/b&amp;gt;: The de-tiling strategies described above are based on mixing texture components using noise functions. This works fine for natural landclasses, but human-influenced landclasses like agriculture or urban terrain are not well described by Perlin noise, and de-tiling crop fields using noise functions does not yield plausible results.This is now solved by domain noise.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS technical notes]]&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.science-and-fiction.org/rendering/noise.html From random number to texture - GLSL noise functions]&lt;br /&gt;
* http://www.upvector.com/?section=Tutorials&amp;amp;subsection=Intro%20to%20Procedural%20Textures&lt;br /&gt;
* http://www.graphics.usc.edu/cgit/publications/papers/p95-rhoades.pdf&lt;br /&gt;
* http://www.vis.uni-stuttgart.de/~dachsbcn/download/ProcReproduction.pdf&lt;br /&gt;
* http://www.unilim.fr/pages_perso/guillaume.gilet/Recherche/pdf/CGI12.pdf&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg39692.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Procedural_texturing&amp;diff=114278</id>
		<title>Procedural texturing</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Procedural_texturing&amp;diff=114278"/>
		<updated>2018-02-04T07:08:06Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Overlay layers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
&lt;br /&gt;
'''Procedural texturing''' is a set of techniques where the color of a pixel is not determined by a texture image but fully or partially by evaluating a mathematical function. This article describes why procedural texturing is useful, what it can and can't do and how it is used and configured in [[FlightGear]].&lt;br /&gt;
&lt;br /&gt;
== The terrain texturing challenge ==&lt;br /&gt;
&lt;br /&gt;
The FlightGear terrain is segmented into different landclasses (Urban, Ocean, Glacier, ShrubCover,...) which describe what the terrain at a location is like. In the default texturing scheme, the file '''materials.xml''' is used to describe (among other things) what texture sheet is mapped onto a given landclass.&lt;br /&gt;
&lt;br /&gt;
A typical terrain texture sheet has 512x512 pixels and is mapped onto a 2000m x 2000m sized area, which means that each pixel covers a 4m x 4m area in unsloped terrain. For the sake of the argument, assume the texture has a size of 300 kB in compressed form which expands to about 1 MB in the GPU memory after mipmapping.&lt;br /&gt;
&lt;br /&gt;
The optimal distance to view the texture is when every texture pixel corresponds to a pixel on the screen, as then the maximum possible detail of the texture is exploited. Assuming a 60 deg field of view looking straight down onto the texture, that distance is about 2500 m.&lt;br /&gt;
&lt;br /&gt;
If the texture is seem from a much larger distance, it does not large enough to cover the terrain, and hence it is automatically repeated. From about 3 times the optimal distance, this repetition creates a visually rather pronounced pattern which is referred to as tiling:&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|center|An example for texture tiling]]&lt;br /&gt;
&lt;br /&gt;
If the texture is seen from a much smaller distance, a single texture pixel covers multiple screen pixels, which makes the terrain look coarse-grained and unrealistic:&lt;br /&gt;
&lt;br /&gt;
[[File:resolution_example.jpg|400px|center|An example for low texture resolution]]&lt;br /&gt;
&lt;br /&gt;
A third problem occurs because the boundaries of the landclasses are vector data, i.e. they appear as unnaturally sharp division lines between different textures.&lt;br /&gt;
&lt;br /&gt;
Thus, the main challenges for realistic terrain texturing can be summarized as the three areas&lt;br /&gt;
&lt;br /&gt;
* tiling&lt;br /&gt;
* resolution&lt;br /&gt;
* boundaries&lt;br /&gt;
&lt;br /&gt;
=== Addressing the challenges ===&lt;br /&gt;
&lt;br /&gt;
Tiling and resolution are correlated problems, i.e. many solution to one tend to make the other worse. For instance, resolution can easily be dealt with by mapping the texture sheet onto a smaller area, say 500m x 500 m, which gives a pixel size of 1m. However, then tiling becomes apparent from just 1500 m distance, i.e. almost inevitably.&lt;br /&gt;
&lt;br /&gt;
Tiling is also reduced if the variation of contrast inside a texture is reduced, i.e. the texture becomes more 'dull' and the pattern repetition is less obvious:&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|An example for texture tiling]]&lt;br /&gt;
[[File:contrast_reduction.jpg|400px|Reduced contrast makes the problem less apparent]]&lt;br /&gt;
&lt;br /&gt;
However, contrasts within a texture are the best way to distract the eye from the sharp landclass boundaries, so if one uses low contrast textures, the landclass boundary problem gets often worse.&lt;br /&gt;
&lt;br /&gt;
Tiling can also be reduced at the expense of texture detail if a single texture sheet is mapped onto a larger area.&lt;br /&gt;
&lt;br /&gt;
To some degree, all problems lessen with increased texture resolution - using 4096x4096 texture sheets allow 0.5m x 0.5m resolution if mapped onto the same areas - but memory consumption quickly becomes as issue as a single texture sheet of that size uses ~64 MB of graphic memory already. &lt;br /&gt;
&lt;br /&gt;
=== Photo texturing ===&lt;br /&gt;
&lt;br /&gt;
The tiling problem can be solved if each 2000m x 2000m area to be textured does not get the same texture sheet. If aerial imagery is used (see [[Photoscenery]]) then also the landclass boundary is solved. However, this inevitably creates a resolution problem. To see this, consider the following numbers: On a clear day, the visibility from airliner cruise altitude can easily be 120 km. This means that 45.000 square kilometers of terrain are visible at any given time. Using 2000mx2000m mapped texture sheets as in the example above, unique terrain texturing then needs 11.000 different texture sheets with a size of 1 MB each in graphic memory, or about 11 GB of graphic memory, quite exceeding the capabilities of modern graphic cards. Assuming that about 1 GB of graphic memory is available for terrain textures (clouds, models, the cockpit,... also need memory), the individual pixel must have a size of 12 m x 12 m or larger, which means that photoscenery can either not be used for large visibility, or has a terrible resolution from close-up, or uses a LOD scheme (the above photoscenery would still use 3 GB of harddisk space though).&lt;br /&gt;
&lt;br /&gt;
Photo-texturing has other disadvantages - for instance the photographs are usually taken in a particular season in certain light, so the scene may easily seem unrealistic or wrong in a different season or at a different time of the day. FlightGear texturing also encodes meta-information (where on a texture to place trees or buildings) - such meta-information can not easily be encoded in photoscenery.&lt;br /&gt;
&lt;br /&gt;
=== Procedural texturing ===&lt;br /&gt;
&lt;br /&gt;
Procedural texturing is a solution to both the tiling and the resolution problem, and partially also for the boundary problem. A mathematical function, unlike a lookup table (which a texture in essence is) does not end at any boundary, i.e. it can simply be used across the whole scene without ever creating a repetition. Using a suitable noise function to mix various textures, a complete de-tiling effect can be achieved (this is really the same scene):&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|An example for texture tiling]]&lt;br /&gt;
[[File:procedural_detiling.jpg|400px|Procedural texturing removes the tiling]]&lt;br /&gt;
&lt;br /&gt;
A function can also be evaluated at any scale resolution. Unlike a texture which needs to be stored regardless if it is used or not, a function only needs to be evaluated for every screen pixel, i.e. the workload and memory requirement do not grow quadratically with the needed resolution but only linear. This scaling allows to dynamically add details to the scene as one gets closer (this is really the same scene):&lt;br /&gt;
&lt;br /&gt;
[[File:resolution_example.jpg|400px|An example for low texture resolution]]&lt;br /&gt;
[[File:procedural_resolution.jpg|400px|Procedural texturing adds details at close range]]&lt;br /&gt;
&lt;br /&gt;
== Building blocks of procedural texturing ==&lt;br /&gt;
&lt;br /&gt;
Mathematical functions can describe quite complex structures, but in order to be rendered in real time, the function has to evaluate fast enough. This means that 'simple' textures like snow, or possibly sand or rock can be completely procedural, while more complex shapes like agriculture which shows fields, crops, access paths and drains can remain a texture with some structure added procedurally. In general, a mixture of textures and functions is used for best effect. &lt;br /&gt;
&lt;br /&gt;
The most important building blocks of procedural texturing are noise functions. A noise function is a function which takes the coordinates of a pixel as input and returns a pseudo-random number between 0 and 1 as output. Noise functions aren't uniquely defined, and there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
=== Perlin noise ===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Perlin_noise '''Perlin noise'''] is noise which exists at a certain scale (say 10 m). It is built by dividing the scene into a 10m x 10 m grid, creating random values at each grid point and interpolating smoothly between the grid points. The function created that way varies typically at a scale of 10 m, but not at much smaller scales and averages to 0.5 at much larger scales. Perlin noise isn't so useful at just a single scale, but noise at several scales added together can achieve a very realistic effect of roughness and structure. Finding the correct noise frequencies and amplitudes for blending Perlin noise to a realistic appearance is an art rather than a computational task.&lt;br /&gt;
&lt;br /&gt;
=== Sparse dot noise ===&lt;br /&gt;
&lt;br /&gt;
For sparse dot noise, the terrain is divided into a grid at certain scale, then random values at the grid edges are used to determine if a dot is placed into the cell, where into the cell it is placed and what radius it has. Based on the distance to the dot, the function returns 0 if the point probed is far from the dot and 1 at the dot position. &lt;br /&gt;
&lt;br /&gt;
From the superposition of several sparse dot distributions, dense dot distributions can be created. Note that a sparse dot distribution does not average to 0.5 but, dependent on the details of the implementation, to a much lower value.&lt;br /&gt;
&lt;br /&gt;
=== Stratified noise ===&lt;br /&gt;
&lt;br /&gt;
Stratified noise uses the terrain mesh altitude information to draw bands of constant altitude which each have a random number associated. The bands are then distorted in width by an altitude-dependent random number and modulated with an (xy)-position dependent random number. Stratified noise is rather useful for some types of rock formations.&lt;br /&gt;
&lt;br /&gt;
=== Domain noise ===&lt;br /&gt;
&lt;br /&gt;
The idea of domain noise is to segment the terrain into discrete patches, each of which has a random number associated. Unlike for Perlin noise, the number is not interpolated, it suddenly jumps at the domain boundary to a different value.&lt;br /&gt;
&lt;br /&gt;
The FG implementation of domain noise uses a regular grid at some wavelength, then distorts the grid points by random numbers and uses [http://en.wikipedia.org/wiki/Voronoi '''Voronoi tiling'''] to determine the domains within the distorted grid. This creates domains with a controllable irregularity which are all about the same size.&lt;br /&gt;
&lt;br /&gt;
Domain noise is very useful for man-made patterns, e.g. managed forest, agriculture or cities.&lt;br /&gt;
&lt;br /&gt;
=== Slope line noise ===&lt;br /&gt;
&lt;br /&gt;
For slope line noise, the terrain is segmented in patches, and based on the normal of the terrain, a line along the direction of steepest descent is drawn on the patch, with precise line position and thickness modulated by random numbers. This type of noise mixed into Perlin noise can give a good impression of snow distributions on steep slope or erosion patterns on terrain.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
To the left is an example for domain noise scaling the size of trees in patches of few hundred meters size, thus giving the impression of the different age of forest patches in a managed forest. On the right is an example of slopeline noise, emphasizing the vertical structure of the granite walls in Yosemite National Park.&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_forest.jpg|400px|Domain noise for forest]] [[File:Southwest08.jpg|375px|Slope line noise for Yosemite granite]]&lt;br /&gt;
&lt;br /&gt;
=== Terrain probing functions ===&lt;br /&gt;
&lt;br /&gt;
The underlying terrain can also be used as input for functions in a different way. Commonly used functions are for instance the altitude of a terrain pixel (for instance to determine the snow line) or its slope (to place rock textures on steep slopes). Since the underlying vector geometry of the terrain mesh leads to very sharp division lines, usually terrain probing functions are mixed with some noise for a more realistic appearance.&lt;br /&gt;
&lt;br /&gt;
=== Pixel color postprocessing ===&lt;br /&gt;
&lt;br /&gt;
Many environmental effects can be simulated at the simple expense of post-processing the color of a terrain pixel. For instance, mixing every pixel with a constant dust color can give the terrain a dusty appearance, mixing the final pixel color with a mossy green can give it an overgrown appearance. This is similar to the way pixel color is adjusted for fog, but unlike fog effects environment pixel color postprocessing does not involve distance computations between eye and pixel, rather the color is adjusted independent of the distance (but possibly dependent on terrain gradient or altitude).&lt;br /&gt;
&lt;br /&gt;
== Procedural terrain texturing in Flightgear ==&lt;br /&gt;
&lt;br /&gt;
As of Flightgear 2.10+, procedural texturing of the terrain is done by a general terrain shader which is configurable from &amp;lt;b&amp;gt;materials.xml&amp;lt;/b&amp;gt;. The creation of separate effects for various terrain types is not required (but still possible if so desired). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Currently the following requires that [[Atmospheric light scattering]] is on!&amp;lt;/b&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Basic texturing scheme ===&lt;br /&gt;
&lt;br /&gt;
The texturing scheme is controlled on a per-landclass basis from &amp;lt;b&amp;gt;materials.xml&amp;lt;/b&amp;gt;. The relevant sections for procedural textruring in each material declaration are &amp;lt;texture-set&amp;gt; and &amp;lt;parameters&amp;gt;. Here the &amp;lt;texture-set&amp;gt; block controls what textures are used whereas the &amp;lt;parameters&amp;gt; block controls how these textures are used. &lt;br /&gt;
&lt;br /&gt;
Another important part are &amp;lt;xsize&amp;gt; and &amp;lt;ysize&amp;gt; (the sections which describes to which size in meters the base texture is mapped). The procedural texturing shader computes the size of all used textures &amp;lt;i&amp;gt;relative&amp;lt;/i&amp;gt; to the base texture size, so if a base texture is declared to have a size of 500 m rather than the default 2000 m, the resolution of the hires overlay or the grain texture will automatically also be 5 times higher then default - which may or may not be desired.&lt;br /&gt;
&lt;br /&gt;
The individual textures which can be used are:&lt;br /&gt;
&lt;br /&gt;
==== Base texture ====&lt;br /&gt;
&lt;br /&gt;
The base texture is used as in the default scheme to give the basic appearance of a landclass. The base texture is assumed to be opaque, and its alpha channel is hence not evaluated to transparent, but rather used to encode where the autumn color effect should be used. An alpha value of 0.5 is appropriate for deciduous forests which should get a strong red-orange appearance in autumn, a value of 0.8-0.9 is more appropriate for grass surfaces.&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|center|Base Texture]]&lt;br /&gt;
&lt;br /&gt;
The base texture can take some additional parameters. The first is intrinsic wetness. If the quality level of the shader supports it, this will make the texture appear wet and add sparkling specular reflections to the terrain even if the surrounding terrain is dry. The dust resistance acts in the opposite way, it is intended for irrigated terrain in desert areas and is a multiplier for the dust effect, i.e. a value of 0.0 will make a landclass completely impervious to dust. Finally, rock strata represents an integer flag whether a stratified pattern will be drawn on vertical surfaces or not.  &lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;intrinsic_wetness&amp;gt;0.0&amp;lt;/intrinsic_wetness&amp;gt;&lt;br /&gt;
  &amp;lt;dust_resistance&amp;gt;1.0&amp;lt;/dust_resistance&amp;gt;&lt;br /&gt;
  &amp;lt;rock_strata&amp;gt;0&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value of intrinsic wetness is zero, the parameter can range from 0 (dry) to 1 (very wet, lots of open water). The defaul value of duse resistance is one, and the parameter can range from 1 (gets dusty like everything else) to 0 (impervious to dust).&lt;br /&gt;
&lt;br /&gt;
==== The overlay texture ====&lt;br /&gt;
&lt;br /&gt;
The overlay texture is a texture at a similar resolution level which is mixed with the base texture to achieve de-tiling or gradient effects. By default, it covers about 50% of the available scene. As for the base texture, the alpha channel of the overlay texture encodes color rotations in autumn.&lt;br /&gt;
&lt;br /&gt;
[[File:overlay1.jpg|400px|center|The overlay Texture]]&lt;br /&gt;
&lt;br /&gt;
The overlay texture can be used in two different modes or a mixture of them. The control parameter is &amp;lt;transition_model&amp;gt; - if this parameter is set to 0, the transition between base and overlay texture is determined by a noise function. If the parameter is set to 1, the slope of the terrain determines the transition and the overlay texture is only used on steep slopes. A setting of 0.5 uses a mixture of noise and slope information to drive the transition.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default texture selected is void.png which corresponds to no overlay texture.&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;transition_model&amp;gt;0.5&amp;lt;/transition_model&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.5, the parameter can range from 0 (random transition) to 1 (gradient-driven transition).&lt;br /&gt;
&lt;br /&gt;
==== The hires texture ====&lt;br /&gt;
&lt;br /&gt;
The hires texture adds patches of a texture at much higher resolution into the mix, which both add to de-tiling and lead to a better experience of the scenery from close-up. The hires textured patches will however inevitably appear featureless from large distance and will show tiling themselves, so the amount of hires texture as well as the hires texture sheet itself must be designed carefully.&lt;br /&gt;
&lt;br /&gt;
The areas covered by the hires texture will (partially to mask tiling of the hires patches) receive a stronger bumpmap and some distortion than the rest of the terrain by the shader.&lt;br /&gt;
&lt;br /&gt;
As for the base texture, the alpha channel of the hires texture encodes color rotations in autumn.&lt;br /&gt;
&lt;br /&gt;
[[File:overlay02.jpg|400px|center|The hires Texture]]&lt;br /&gt;
&lt;br /&gt;
The parameter &amp;lt;hires_overlay_bias&amp;gt; controls the fraction of terrain covered by the hires texture patches - by default about 40% of the scene will be covered. Positive or negative biases can make the fraction arbitrarily small or large.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default texture selected is void.png which corresponds to no hires texture. The hires texture does not require the overlay texture to be declared.&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;hires_overlay_bias&amp;gt;0.0&amp;lt;/hires_overlay_bias&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.0, the parameter can range from -0.5 (strong suppression of the hires overlay texture) to +0.5 (strong enhancement of the hires overlay texture).&lt;br /&gt;
&lt;br /&gt;
==== The gradient texture ====&lt;br /&gt;
&lt;br /&gt;
The gradient texture is exclusively used for steep terrain gradients (significantly steeper than the point at which the overlay texture may be used) to account for the fact that beyond a certain slope, terrain can not have vegetation cover and hence landclass information needs to be corrected if necessary.&lt;br /&gt;
&lt;br /&gt;
The default texture is rock.png which is hence used for all landclasses unless specifically declared otherwise. The default may be inappropriate in some regions (volcanic terrain with different rock hue, tropical terrain in which even steep slopes are covered) - the gradient texture then needs to be declared a different texture for all materials in the area. Declaring void.png will not use a gradient texture.&lt;br /&gt;
&lt;br /&gt;
The gradient texture does not use any parameters.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== The grain texture ====&lt;br /&gt;
&lt;br /&gt;
The grain texture adds a grainy pattern to the terrain at close distances, giving the appearance of better resolution. The grain texture parses the texture alpha channel as transparency (since it just superimposes a pattern), so here the alpha channel can not be used to encode vegetation effects, and the grain texture may not have a strong color.&lt;br /&gt;
&lt;br /&gt;
[[File:grain_texture.jpg|400px|center|The grain overlay texture]]&lt;br /&gt;
&lt;br /&gt;
To allow fine-tuning of the grain effect, the texture can be multiplied with the &amp;lt;grain_strength&amp;gt; parameter which sets the overall alpha of the grain effect - a low value works best on bright base textures whereas dark base textures may require a stronger grain.&lt;br /&gt;
&lt;br /&gt;
The default grain texture is grain_texture.png which adds a vegetation-like grain. This can be replaced with other grain patterns or void.png for no grain where appropriate.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain_strength&amp;gt; 0.5&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.5 and the parameter range is 0 (completely transparent) to 1 (completely opaque).&lt;br /&gt;
&lt;br /&gt;
==== The dot texture ====&lt;br /&gt;
&lt;br /&gt;
The dot overlay uses sparse dot noise to create detail in the scene. Sparse dot noise textured with a rock texture can give the appearance of boulders scattered across the terrain, the same noise textured with a grass texture can be used to create round vegetation patches.&lt;br /&gt;
&lt;br /&gt;
[[File:hires_terrain03.jpg|400px|center|The dot overlay texture creating grass patches]]&lt;br /&gt;
&lt;br /&gt;
Both the dot size and the dot density can be controlled by the user. The range out to which the dots are visible is automatically adjusted based on the dot size scale. By default, the dot texture is set to void.png, which means that no dot texture is used.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;dot_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;dot_density&amp;gt; 1.0&amp;lt;/dot_density&amp;gt;&lt;br /&gt;
  &amp;lt;dot_size&amp;gt; 1.0&amp;lt;/dot_size&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value for &amp;lt;dot_density&amp;gt; is 1.0, the parameter can be set in the range from 0.0 to 1.0 (values above 1.0 do not increase the dot density further). The default value for &amp;lt;dot_size&amp;gt; is also 1.0, which creates dots at size scales varying between 10 cm and few m. The parameter is a multiplier for these default values, i.e. at a value of 10 dots of ~10-20 m size are created.&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
The following declaration&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;texture-set&amp;gt;&lt;br /&gt;
   &amp;lt;texture&amp;gt;Terrain/marsh2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;Terrain/grass_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;Terrain/marsh4a.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
   &amp;lt;grain_strength&amp;gt;0.9&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
   &amp;lt;intrinsic_wetness&amp;gt;0.6&amp;lt;/intrinsic_wetness&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in marshland drawn like this&lt;br /&gt;
&lt;br /&gt;
[[File:marsh_example.jpg|400px|Procedural marshland close-up]]&lt;br /&gt;
[[File:wetness.jpg|400px|Procedural marshland from the distance]]&lt;br /&gt;
&lt;br /&gt;
The following declaration&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;texture&amp;gt;Terrain/shrub-hawaii.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;Terrain/sand_hires_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;Terrain/rock_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;Terrain/rock_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;Terrain/grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
   &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;rock_strata&amp;gt;1&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
   &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in stratified rock structures like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Southwest04.jpg|400px|Procedural rock Grand Canyon]]&lt;br /&gt;
[[File:Southwest09.jpg|400px|Procedural rock Zion National Park]]&lt;br /&gt;
&lt;br /&gt;
=== The agriculture effect ===&lt;br /&gt;
&lt;br /&gt;
The basic texture scheme based on Perlin noise is of limited value for e.g. agricultural terrain which rarely shows the organic shapes generated by Perlin noise. For such terrain, the agriculture effect should be used instead which is based on Perlin noise.&lt;br /&gt;
&lt;br /&gt;
The effect needs to be declared for the landclass as&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;effect&amp;gt;Effects/agriculture&amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(note that since the default rendering scheme has typically the crop effect associated with agriculture, this declaration inherits crop.eff).&lt;br /&gt;
&lt;br /&gt;
By default, large patches of agriculture usually show strong tiling:&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro01.jpg|400px|center|Tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
It is implemented in two modes, overlay and rotation. Since the agriculture effect is optional, its overlay texture is declared separately from the normal declaration above as follows:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the overlay texture is declared void.png (to which the effect defaults), it is not used. The effect takes a number of parameters. For the overlay, the fraction taken by the overlay texture and the scale at which the patches are drawn can be specified through the overlay fraction and the overlay scale, while the shape of the domains can be controlled using a distortion factor.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;overlay_fraction&amp;gt;0.5&amp;lt;/overlay_fraction&amp;gt;&lt;br /&gt;
   &amp;lt;overlay_scale&amp;gt;1000.0&amp;lt;/overlay_scale&amp;gt;&lt;br /&gt;
   &amp;lt;distortion_factor&amp;gt;0.3&amp;lt;/distortion_factor&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This results in the overlay texture superimposed in irregular patches. &lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro03.jpg|400px|center|Overlay de-tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
De-tiling can also be achieved by rotating the texture coordinates inside patches. This is controlled by a rotation flag which can be set to 1 (random rotation) or 2 (rotation by multiples of 90 degrees only) in addition to a rotation scale. In case of very regular textures which should be rotated by multiples of 90 degrees only, uv texture coordinate offsets are provided to align texture and rotated domain.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;rotation_flag&amp;gt;1&amp;lt;/rotation_flag&amp;gt;&lt;br /&gt;
   &amp;lt;rotation_scale&amp;gt;2000.0&amp;lt;/rotation_scale&amp;gt;&lt;br /&gt;
   &amp;lt;uv_xoffset&amp;gt;0.0&amp;lt;/uv_xoffset&amp;gt;&lt;br /&gt;
   &amp;lt;uv_yoffset&amp;gt;0.0&amp;lt;/uv_yoffset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using domain rotation also leads to a reasonable de-tiling while keeping the color impression.&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro02.jpg|400px|center|Overlay de-tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
Both rotation and overlay can be combined. Neither of the effects is compatible with patterns of random trees of buildings created by placement masks, as these are used at tile loading time and can not be changed runtime like shader effects.&lt;br /&gt;
&lt;br /&gt;
=== The rock effect ===&lt;br /&gt;
&lt;br /&gt;
Specifically for rock, a completely procedural scheme to generate various types of rock structures is available. Since this is computationally about on par with the overlay texture schemes for generic terrain, it activates only at highest rendering quality level.&lt;br /&gt;
&lt;br /&gt;
The effect needs to be declared for the landclass as&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;effect&amp;gt;Effects/rock&amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rock is drawn by overlaying several structure layers. The base layer is set by several octaves of Perlin noise superimposed as brightness variation onto a specified texture color. The relevant configuration parameters are e.g.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;1.3&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;base-color&amp;gt; is a rgb triplet with color values ranging from 0 to 1 specifying the primary hue of the rock to be drawn. &amp;lt;ontrast&amp;gt; regulates how strongly the noise modification of rock brightness will appear from 0 (no noise modulation) to 1 (full noise modulation). &amp;lt;grain-fade-power&amp;gt; regulates the balance between large-scale and small-scale noise. Values above 1 will emphasize small-scale structures, values below 1 will emphasize large-scale structures. There is no real limit to the parameter, but presumably values outside [0.5:1.5] won't look compelling.&lt;br /&gt;
&lt;br /&gt;
The effect of the fade power ranging from 0.8 to 1.3 is illustrated by the following series of screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp0.8.jpg|300px|Grain fade power 0.8]]&lt;br /&gt;
[[File:Rock-gfp1.0.jpg|300px|Grain fade power 1.0]]&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|Grain fade power 1.3]]&lt;br /&gt;
&lt;br /&gt;
The effect of the contrast parameter changing from 1.0 to 0.7 looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|Contrast 1.0]]&lt;br /&gt;
[[File:Rock-contrast.jpg|300px|Contrast 0.7]]&lt;br /&gt;
&lt;br /&gt;
Since it is difficult to guess the resulting visual brightness of rock after all noise and overlay patterns have been added, &amp;lt;rock-brightness&amp;gt; is a convenient scale after to multiply pixel color after all layers have been added.&lt;br /&gt;
&lt;br /&gt;
The overlay layer is based on Perlin noise domains and draws with a different color onto the base layer. The relevant parameters are&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;-0.05&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the &amp;lt;overlay-color&amp;gt; is again a rgb triplet and &amp;lt;overlay-alpha&amp;gt; its transparency value. &amp;lt;overlay-bias&amp;gt; should take values between -0.5 and 0.5 and controls the amount of surface to be covered with the overlay color.&lt;br /&gt;
&lt;br /&gt;
As illustrated by the following screenshots, the overlay layer can be used to draw moss and lichen cover as well as mineral crusts on top of the base rock layer:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|No overlay]]&lt;br /&gt;
[[File:Rock-lichen.jpg|300px|Green overlay, small alpha, positive bias]]&lt;br /&gt;
[[File:Rock-crust.jpg|300px|White overlay, large alpha, negative bias]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The crack layer is based on stretched Perlin noise isolines and controlled by the parameters&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;crack-depth&amp;gt; (from 0 to 1) regulates how pronounced the darkening inside the crack region is whereas the &amp;lt;crack-pattern-stretch&amp;gt; (from 1 to roughly 10) controls the elongation of the crack pattern.&lt;br /&gt;
&lt;br /&gt;
For low stretch values, the crack layer can be used to draw bands of different mineral inside the rock, for high stretch values it can simukate a genuine pattern of cracks in the surface, see screenshots below for an illustration:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-crust.jpg|300px|No cracks]]&lt;br /&gt;
[[File:Rock-crack1.jpg|300px|Stretch factor 1]]&lt;br /&gt;
[[File:Rock-crack7.jpg|300px|Stretch factor 7]]&lt;br /&gt;
&lt;br /&gt;
Finally, stratified and slope line noise (see above) are also available as texture brightness modifiers. The parameters are&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/rock_strata&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;slope-contrast&amp;gt; (value between 0 and 1) regulates how pronounced the slope lines are drawn and &amp;lt;rock_strata&amp;gt; (value 0 or 1) indicated whether stratified noise should be used or not. Neither slope noise nor stratified noise affect flat rock surfaces, they only lead to modulation on sufficiently steep rock surfaces.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 1:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter set&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt; &lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;7.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata&amp;gt;0&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in rock drawn like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-example1.jpg|500px|center|Procedural rock, example 1]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following set of parameters&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.3&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata&amp;gt;1&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
leads to stratified rock like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-example2.jpg|500px|center|Procedural rock, example 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The dirt runway effect ===&lt;br /&gt;
&lt;br /&gt;
Using a dedicated ALS effect, it is possible to generate a wide variety of visuals for non-paved runways. The effect is used to texture a runway as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;Effects/dirt-runway&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the textures and parameters to configure it must be specified in the &amp;lt;parameters&amp;gt; section of the landclass used for the runway.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Part of the effect explicitly relies on a particular uv-mapping of the dirt runways. For this reason, the effect may or may not work as intended with scenery other than FG world scenery 2.0 - in particular custom scenery builds may not give the desired visuals if they treat unpaved runways differently.&lt;br /&gt;
&lt;br /&gt;
The effect uses a mixture of three texture layers - a base texture layer (n=16) an overlay texture layer (n=17) and a grain texture layer (supposed to be a largely transparent texture with just a darker overlay pattern on it, n=18).&lt;br /&gt;
&lt;br /&gt;
For each of the textures, a mapping to a physical size of the texture patch can be defined by the set of parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;100.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;100.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(i.e. setting a parameter to 100 means that the texture sheet is supposed to represent a 100 m x 100 m patch of runway). This is different from the way the default renderer treats dirt runways by stretching the assigned texture over the whole runway (i.e. texture magnification depends on runway size). The strength of the grain overlay can be controlled by&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.3&amp;lt;/grain_strength&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
where a value of zero implies no grain texture and a value of 1 the full grain effect as on the texture.&lt;br /&gt;
&lt;br /&gt;
The mixture of base and overlay texture layers is controlled by filtered Perlin noise. The frequencies of the base noise distribution can be controlled by &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the sum of all parameters is supposed to be 1. Strengthening a parameter generates more structure at this scale, for instance in order to generate a small-scale, fine-grained pattern one should set the lower frequencies to larger values, whereas for large continuous patches of texture strength_10m and strength_5m should be largest.&lt;br /&gt;
&lt;br /&gt;
The raw Perlin noise is post-processed by a filter driven by two parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of these, the threshold regulates the relative mixture of the two textures (0.5 roughly corresponds to 50%) and transition how the mixture will be drawn. A small transition value (say 0.1) corresponds to an either/ or scenario in which only one of the textures will be drawn (appropriate for grass patches on dirt), a large transition value smoothly blends the textures (appropriate for different sand textures).&lt;br /&gt;
&lt;br /&gt;
If&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
is set to 1, the noise distribution will tend to favor the base layer in the center of the runway. &amp;lt;b&amp;gt;This requires a specific uv-mapping and will not work for custom-generated runways.&amp;lt;/b&amp;gt; The strength of that bias is set by&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is between 0 (no bias) and 1 (don't draw overlay layer in runway center no matter what).&lt;br /&gt;
&lt;br /&gt;
In addition, the effect uses a normal map (since it is used in a non-standard way, touch at your own risk) - the visual 'bumpiness' of the runway can be adjusted using &lt;br /&gt;
&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using different mixtures of textures and parameters, a wide variety of visuals can be achieved, a few examples in the following.&lt;br /&gt;
&lt;br /&gt;
A lakebed texture overlaid with sand gives proper visuals for e.g. the Rogers Dry Lake runways at Edwards AFB:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Terrain/sand_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand1.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;100.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;100.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.3&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy01.jpg|500px|Dirt runway example 1]]&lt;br /&gt;
&lt;br /&gt;
Using a largely grass-textured surface and allowing some gravel to show in the runway center gives the appearance of a worn grass runway:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Terrain/sand_hires_ochre.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.3&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.0&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.1&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.2&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.15&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.1&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;30.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;50.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.8&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy02.jpg|500px|Dirt runway example 2]]&lt;br /&gt;
&lt;br /&gt;
Using the effect 'as is', i.e. without any additional parameters, reproduces the old appearance of the dirt runway effect in ALS:&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy03.jpg|500px|Dirt runway example 3]]&lt;br /&gt;
&lt;br /&gt;
With the original dirt runway texture mapped to a small size and framed by less structured dirt, also a compelling result can be achieved:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand_hires_ochre.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;25.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.4&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy04.jpg|500px|Dirt runway example 4]]&lt;br /&gt;
&lt;br /&gt;
Using grass as the overlay material blends the runway outline nicely into the airport keep:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.2&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.6&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.2&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.0&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.0&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.1&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.8&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;20.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
       &amp;lt;grain_strength&amp;gt;0.6&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy05.jpg|500px|Dirt runway example 5]]&lt;br /&gt;
&lt;br /&gt;
Finally an example of diffuse sand patches blended into each other by low frequency noise and a large value of the transition in the filter:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.2&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.3&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.2&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.4&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.5&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;20.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.2&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy06.jpg|500px|Dirt runway example 6]]&lt;br /&gt;
&lt;br /&gt;
=== Overlay layers ===&lt;br /&gt;
&lt;br /&gt;
The ALS rendering framework also supports rendering a low layer with a '3D' structure which is created dynamically by a geometry shader - this can be used for undergrowth or rocks - see below for an example of undergrowth in northern boreal forest:&lt;br /&gt;
&lt;br /&gt;
[[File:Overlay01.jpg|500px|center|Overlay layer used as undergrowth]]&lt;br /&gt;
&lt;br /&gt;
The overlay layer is created by extruding a number of 'shells' from the base ground surface (with a LOD system controlling how many shells are extruded) and texturing the part of the shell which intersects with the 3d structure of the object to be rendered. This looks fairly compelling from above, but of course for shallow viewing angles the nature of the illusion is readily apparent, and once the view direction is parallel to the shells, the 3D structure vanishes because one is looking right between shells. It's therefore a good idea to keep the overlay layer low (&amp;lt; 1 m) and supplement it with other elements such as random vegetation.&lt;br /&gt;
&lt;br /&gt;
[[File:Overlay03.jpg|500px|center|Overlay layer used as rock]]&lt;br /&gt;
&lt;br /&gt;
=== Pixel color postprocessing ===&lt;br /&gt;
&lt;br /&gt;
A number of environment effects are implemented under user control in the Environment menu. Let's consider the changes to the base scene:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural01.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Snow ====&lt;br /&gt;
&lt;br /&gt;
Using terrain elevation and gradient information, the base location of a snow layer can be determined. The actual snow cover is a white base color, mixed with Perlin noise and normal-mapped with Perlin noise of multiple frequencies. A bias factor for the mixing allows to simulate snow layer of varying thickness.&lt;br /&gt;
&lt;br /&gt;
A low layer thickness creates patches of snow on the terrain through which the basic terrain textures are visible:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural02.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
A high layer thickness completely covers the terrain in snow. Subtle procedural color variations of the snow and bump-mapping change the base white snow pixel color into a realistic texture:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural03.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
If the snowline is placed higher, snow is only simulated on the mountain tops - note also that steep gradients tend to remain clear of snow:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural04.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Dust ====&lt;br /&gt;
&lt;br /&gt;
The dust effect mixes all pixels of the terrain with a basic dust color. A low dust effect setting gives the terrain a dry and parched appearance, as after a long summer period without rain.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural05.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
A high dust effect setting changes the appearance to desert-like terrain (which is rather unrealistic for this scenery):&lt;br /&gt;
&lt;br /&gt;
[[File:procedural06.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Wetness ====&lt;br /&gt;
&lt;br /&gt;
Wet terrain is rendered overall darker. In flat areas, in addition patches of high specular reflection are added, leading to the appearance of glitterin light reflections on water puddles.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural07.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Vegetation ====&lt;br /&gt;
&lt;br /&gt;
A high setting of the vegetation cover is most appropriate for tropical settings, but it can also be used to show seasonal effects, for instance the desert a few days after rainfall. It covers the whole terrain with mossy overgrowth, which in the case of the Grenoble scenery used here blurs the boundaries of the fields and gives the appearance of abandoned agriculture.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural08.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Autumn colors ====&lt;br /&gt;
&lt;br /&gt;
The autumn color effect is unique in the pixel color postprocessing effects in that it needs modifications to the base texture to work. Since the basic terrain texture is never transparent, the information of where vegetation changes color in autumn and where it remains unchanged is hence encoded in the terrain texture alpha channel. A value of 1 means no change of color, a value of 0.5 is appropriate for high changes to bright red-orange. In order to work with the autumn effect, all textures need to be edited manually to indicate where the effect should be computed.&lt;br /&gt;
&lt;br /&gt;
In early autumn, vegetation just tends to pale a little:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural09.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
Later, fields get bright golden-yellow whereas deciduous forests go to orange-red (mixed forest cover rotates locally where indicated by the alpha channel):&lt;br /&gt;
&lt;br /&gt;
[[File:procedural10.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
Finally, in late autumn all vegetation cover is turned into a dull brown:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural11.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
== Limitations of procedural texturing ==&lt;br /&gt;
&lt;br /&gt;
Despite its obvious benefits, there are some problems which are not easily addressed by procedural terrain texturing.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Landclass boundaries&amp;lt;/b&amp;gt;: Procedural texturing can de-emphasize landclass boundaries. This happens for instance if a landclass uses both overlay and detail texture, and only the base texture is changed in the adjacent landclass. Since the noise is continuous across landclass boundaries, the change in base texture is masked by the continuous overlay components. However, procedural texturing can not remove the landclass seams, as a different texture mix is evaluated for every declared landclass.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Detail averaging:&amp;lt;/b&amp;gt; A problem arises when details are generated which are smaller than a pixel. In this case, the rendering engine does not average over many sub-pixels to determine the final color of the pixel but just takes one (few) samples. This means that a high contrast detailed structure of black and white is not averaged to a grey pixel but, dependent on the viewer position, either results in a black or a white pixel. The net result is a flickering Moire pattern which is visually very unpleasant (the same effect occurs when models get smaller than a pixel). In textures, the problem is solved by mipmapping - every 4 pixels are averaged to a single pixel on a coarse-grained version of the texture at texture loading time, and only the appropriate resolution level of the texture is referenced. To do the same thing in procedural texturing is very expensive (two resolution levels up one ends with 16 times the calculational effort for a pixel), so a viable strategy to remove the flickering patterns involves replacing noise by its &amp;lt;i&amp;gt;global&amp;lt;/i&amp;gt; average (i.e. the 'all pixel' rather than '4 pixel' average, which is usually known for the noise function). The net result is that procedurally generated details tend to looks less grainy than true textures as soon as details get smaller than a single pixel, which is s subtle, but noticeable effect. In essence, this is similar to an antialiasing problem and could also be dealt with by generically sampling multiple sub-pixels at the expense of the increased performance cost.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Computational cost:&amp;lt;/b&amp;gt; Especially on older graphics cards, multiple texture lookups combined with evaluating noise and other functions is significantly slower than just texturing the terrain with a single texture. Most optimization strategies used in other 3D games (such as filling the z-buffer early and discarding occluded pixels) do not work well for a flight simulator where most of the terrain is visible at any given time.&lt;br /&gt;
&lt;br /&gt;
Some points have found a solution:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Terrain tile boundaries&amp;lt;/b&amp;gt;: Terrain is loaded in discrete chunks, so-called tiles. For technical reasons, the coordinate system used to address positions changes for each tile. In practice, this unfortunately implies that noise functions are discontinuous across tile boundaries, and this shows in more or less pronounced seams in the computed textures -&amp;gt; however this can be addressed by going from tile-based to FG world coordinates and using 3-d noise. Due to the large distances involved, small-scale noise becomes then numerically unstable, but noise wavelength above 250 m can safely be done in world coordinates, leading to appealing visuals both at large and small distance.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Tiling for non-natural landclasses&amp;lt;/b&amp;gt;: The de-tiling strategies described above are based on mixing texture components using noise functions. This works fine for natural landclasses, but human-influenced landclasses like agriculture or urban terrain are not well described by Perlin noise, and de-tiling crop fields using noise functions does not yield plausible results.This is now solved by domain noise.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS technical notes]]&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.science-and-fiction.org/rendering/noise.html From random number to texture - GLSL noise functions]&lt;br /&gt;
* http://www.upvector.com/?section=Tutorials&amp;amp;subsection=Intro%20to%20Procedural%20Textures&lt;br /&gt;
* http://www.graphics.usc.edu/cgit/publications/papers/p95-rhoades.pdf&lt;br /&gt;
* http://www.vis.uni-stuttgart.de/~dachsbcn/download/ProcReproduction.pdf&lt;br /&gt;
* http://www.unilim.fr/pages_perso/guillaume.gilet/Recherche/pdf/CGI12.pdf&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg39692.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Overlay03.jpg&amp;diff=114277</id>
		<title>File:Overlay03.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Overlay03.jpg&amp;diff=114277"/>
		<updated>2018-02-04T06:58:40Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=Example of a terrain overlay layer generated by a geometry shader}}&lt;br /&gt;
|date=2018-02-04&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Shaders]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Overlay01.jpg&amp;diff=114276</id>
		<title>File:Overlay01.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Overlay01.jpg&amp;diff=114276"/>
		<updated>2018-02-04T06:58:28Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=Example of a terrain overlay layer generated by a geometry shader}}&lt;br /&gt;
|date=2018-02-04&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Thorsten|Thorsten]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Shaders]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Procedural_texturing&amp;diff=114275</id>
		<title>Procedural texturing</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Procedural_texturing&amp;diff=114275"/>
		<updated>2018-02-04T06:55:24Z</updated>

		<summary type="html">&lt;p&gt;Thorsten: /* Pixel color postprocessing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
&lt;br /&gt;
'''Procedural texturing''' is a set of techniques where the color of a pixel is not determined by a texture image but fully or partially by evaluating a mathematical function. This article describes why procedural texturing is useful, what it can and can't do and how it is used and configured in [[FlightGear]].&lt;br /&gt;
&lt;br /&gt;
== The terrain texturing challenge ==&lt;br /&gt;
&lt;br /&gt;
The FlightGear terrain is segmented into different landclasses (Urban, Ocean, Glacier, ShrubCover,...) which describe what the terrain at a location is like. In the default texturing scheme, the file '''materials.xml''' is used to describe (among other things) what texture sheet is mapped onto a given landclass.&lt;br /&gt;
&lt;br /&gt;
A typical terrain texture sheet has 512x512 pixels and is mapped onto a 2000m x 2000m sized area, which means that each pixel covers a 4m x 4m area in unsloped terrain. For the sake of the argument, assume the texture has a size of 300 kB in compressed form which expands to about 1 MB in the GPU memory after mipmapping.&lt;br /&gt;
&lt;br /&gt;
The optimal distance to view the texture is when every texture pixel corresponds to a pixel on the screen, as then the maximum possible detail of the texture is exploited. Assuming a 60 deg field of view looking straight down onto the texture, that distance is about 2500 m.&lt;br /&gt;
&lt;br /&gt;
If the texture is seem from a much larger distance, it does not large enough to cover the terrain, and hence it is automatically repeated. From about 3 times the optimal distance, this repetition creates a visually rather pronounced pattern which is referred to as tiling:&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|center|An example for texture tiling]]&lt;br /&gt;
&lt;br /&gt;
If the texture is seen from a much smaller distance, a single texture pixel covers multiple screen pixels, which makes the terrain look coarse-grained and unrealistic:&lt;br /&gt;
&lt;br /&gt;
[[File:resolution_example.jpg|400px|center|An example for low texture resolution]]&lt;br /&gt;
&lt;br /&gt;
A third problem occurs because the boundaries of the landclasses are vector data, i.e. they appear as unnaturally sharp division lines between different textures.&lt;br /&gt;
&lt;br /&gt;
Thus, the main challenges for realistic terrain texturing can be summarized as the three areas&lt;br /&gt;
&lt;br /&gt;
* tiling&lt;br /&gt;
* resolution&lt;br /&gt;
* boundaries&lt;br /&gt;
&lt;br /&gt;
=== Addressing the challenges ===&lt;br /&gt;
&lt;br /&gt;
Tiling and resolution are correlated problems, i.e. many solution to one tend to make the other worse. For instance, resolution can easily be dealt with by mapping the texture sheet onto a smaller area, say 500m x 500 m, which gives a pixel size of 1m. However, then tiling becomes apparent from just 1500 m distance, i.e. almost inevitably.&lt;br /&gt;
&lt;br /&gt;
Tiling is also reduced if the variation of contrast inside a texture is reduced, i.e. the texture becomes more 'dull' and the pattern repetition is less obvious:&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|An example for texture tiling]]&lt;br /&gt;
[[File:contrast_reduction.jpg|400px|Reduced contrast makes the problem less apparent]]&lt;br /&gt;
&lt;br /&gt;
However, contrasts within a texture are the best way to distract the eye from the sharp landclass boundaries, so if one uses low contrast textures, the landclass boundary problem gets often worse.&lt;br /&gt;
&lt;br /&gt;
Tiling can also be reduced at the expense of texture detail if a single texture sheet is mapped onto a larger area.&lt;br /&gt;
&lt;br /&gt;
To some degree, all problems lessen with increased texture resolution - using 4096x4096 texture sheets allow 0.5m x 0.5m resolution if mapped onto the same areas - but memory consumption quickly becomes as issue as a single texture sheet of that size uses ~64 MB of graphic memory already. &lt;br /&gt;
&lt;br /&gt;
=== Photo texturing ===&lt;br /&gt;
&lt;br /&gt;
The tiling problem can be solved if each 2000m x 2000m area to be textured does not get the same texture sheet. If aerial imagery is used (see [[Photoscenery]]) then also the landclass boundary is solved. However, this inevitably creates a resolution problem. To see this, consider the following numbers: On a clear day, the visibility from airliner cruise altitude can easily be 120 km. This means that 45.000 square kilometers of terrain are visible at any given time. Using 2000mx2000m mapped texture sheets as in the example above, unique terrain texturing then needs 11.000 different texture sheets with a size of 1 MB each in graphic memory, or about 11 GB of graphic memory, quite exceeding the capabilities of modern graphic cards. Assuming that about 1 GB of graphic memory is available for terrain textures (clouds, models, the cockpit,... also need memory), the individual pixel must have a size of 12 m x 12 m or larger, which means that photoscenery can either not be used for large visibility, or has a terrible resolution from close-up, or uses a LOD scheme (the above photoscenery would still use 3 GB of harddisk space though).&lt;br /&gt;
&lt;br /&gt;
Photo-texturing has other disadvantages - for instance the photographs are usually taken in a particular season in certain light, so the scene may easily seem unrealistic or wrong in a different season or at a different time of the day. FlightGear texturing also encodes meta-information (where on a texture to place trees or buildings) - such meta-information can not easily be encoded in photoscenery.&lt;br /&gt;
&lt;br /&gt;
=== Procedural texturing ===&lt;br /&gt;
&lt;br /&gt;
Procedural texturing is a solution to both the tiling and the resolution problem, and partially also for the boundary problem. A mathematical function, unlike a lookup table (which a texture in essence is) does not end at any boundary, i.e. it can simply be used across the whole scene without ever creating a repetition. Using a suitable noise function to mix various textures, a complete de-tiling effect can be achieved (this is really the same scene):&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|An example for texture tiling]]&lt;br /&gt;
[[File:procedural_detiling.jpg|400px|Procedural texturing removes the tiling]]&lt;br /&gt;
&lt;br /&gt;
A function can also be evaluated at any scale resolution. Unlike a texture which needs to be stored regardless if it is used or not, a function only needs to be evaluated for every screen pixel, i.e. the workload and memory requirement do not grow quadratically with the needed resolution but only linear. This scaling allows to dynamically add details to the scene as one gets closer (this is really the same scene):&lt;br /&gt;
&lt;br /&gt;
[[File:resolution_example.jpg|400px|An example for low texture resolution]]&lt;br /&gt;
[[File:procedural_resolution.jpg|400px|Procedural texturing adds details at close range]]&lt;br /&gt;
&lt;br /&gt;
== Building blocks of procedural texturing ==&lt;br /&gt;
&lt;br /&gt;
Mathematical functions can describe quite complex structures, but in order to be rendered in real time, the function has to evaluate fast enough. This means that 'simple' textures like snow, or possibly sand or rock can be completely procedural, while more complex shapes like agriculture which shows fields, crops, access paths and drains can remain a texture with some structure added procedurally. In general, a mixture of textures and functions is used for best effect. &lt;br /&gt;
&lt;br /&gt;
The most important building blocks of procedural texturing are noise functions. A noise function is a function which takes the coordinates of a pixel as input and returns a pseudo-random number between 0 and 1 as output. Noise functions aren't uniquely defined, and there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
=== Perlin noise ===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Perlin_noise '''Perlin noise'''] is noise which exists at a certain scale (say 10 m). It is built by dividing the scene into a 10m x 10 m grid, creating random values at each grid point and interpolating smoothly between the grid points. The function created that way varies typically at a scale of 10 m, but not at much smaller scales and averages to 0.5 at much larger scales. Perlin noise isn't so useful at just a single scale, but noise at several scales added together can achieve a very realistic effect of roughness and structure. Finding the correct noise frequencies and amplitudes for blending Perlin noise to a realistic appearance is an art rather than a computational task.&lt;br /&gt;
&lt;br /&gt;
=== Sparse dot noise ===&lt;br /&gt;
&lt;br /&gt;
For sparse dot noise, the terrain is divided into a grid at certain scale, then random values at the grid edges are used to determine if a dot is placed into the cell, where into the cell it is placed and what radius it has. Based on the distance to the dot, the function returns 0 if the point probed is far from the dot and 1 at the dot position. &lt;br /&gt;
&lt;br /&gt;
From the superposition of several sparse dot distributions, dense dot distributions can be created. Note that a sparse dot distribution does not average to 0.5 but, dependent on the details of the implementation, to a much lower value.&lt;br /&gt;
&lt;br /&gt;
=== Stratified noise ===&lt;br /&gt;
&lt;br /&gt;
Stratified noise uses the terrain mesh altitude information to draw bands of constant altitude which each have a random number associated. The bands are then distorted in width by an altitude-dependent random number and modulated with an (xy)-position dependent random number. Stratified noise is rather useful for some types of rock formations.&lt;br /&gt;
&lt;br /&gt;
=== Domain noise ===&lt;br /&gt;
&lt;br /&gt;
The idea of domain noise is to segment the terrain into discrete patches, each of which has a random number associated. Unlike for Perlin noise, the number is not interpolated, it suddenly jumps at the domain boundary to a different value.&lt;br /&gt;
&lt;br /&gt;
The FG implementation of domain noise uses a regular grid at some wavelength, then distorts the grid points by random numbers and uses [http://en.wikipedia.org/wiki/Voronoi '''Voronoi tiling'''] to determine the domains within the distorted grid. This creates domains with a controllable irregularity which are all about the same size.&lt;br /&gt;
&lt;br /&gt;
Domain noise is very useful for man-made patterns, e.g. managed forest, agriculture or cities.&lt;br /&gt;
&lt;br /&gt;
=== Slope line noise ===&lt;br /&gt;
&lt;br /&gt;
For slope line noise, the terrain is segmented in patches, and based on the normal of the terrain, a line along the direction of steepest descent is drawn on the patch, with precise line position and thickness modulated by random numbers. This type of noise mixed into Perlin noise can give a good impression of snow distributions on steep slope or erosion patterns on terrain.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
To the left is an example for domain noise scaling the size of trees in patches of few hundred meters size, thus giving the impression of the different age of forest patches in a managed forest. On the right is an example of slopeline noise, emphasizing the vertical structure of the granite walls in Yosemite National Park.&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_forest.jpg|400px|Domain noise for forest]] [[File:Southwest08.jpg|375px|Slope line noise for Yosemite granite]]&lt;br /&gt;
&lt;br /&gt;
=== Terrain probing functions ===&lt;br /&gt;
&lt;br /&gt;
The underlying terrain can also be used as input for functions in a different way. Commonly used functions are for instance the altitude of a terrain pixel (for instance to determine the snow line) or its slope (to place rock textures on steep slopes). Since the underlying vector geometry of the terrain mesh leads to very sharp division lines, usually terrain probing functions are mixed with some noise for a more realistic appearance.&lt;br /&gt;
&lt;br /&gt;
=== Pixel color postprocessing ===&lt;br /&gt;
&lt;br /&gt;
Many environmental effects can be simulated at the simple expense of post-processing the color of a terrain pixel. For instance, mixing every pixel with a constant dust color can give the terrain a dusty appearance, mixing the final pixel color with a mossy green can give it an overgrown appearance. This is similar to the way pixel color is adjusted for fog, but unlike fog effects environment pixel color postprocessing does not involve distance computations between eye and pixel, rather the color is adjusted independent of the distance (but possibly dependent on terrain gradient or altitude).&lt;br /&gt;
&lt;br /&gt;
== Procedural terrain texturing in Flightgear ==&lt;br /&gt;
&lt;br /&gt;
As of Flightgear 2.10+, procedural texturing of the terrain is done by a general terrain shader which is configurable from &amp;lt;b&amp;gt;materials.xml&amp;lt;/b&amp;gt;. The creation of separate effects for various terrain types is not required (but still possible if so desired). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Currently the following requires that [[Atmospheric light scattering]] is on!&amp;lt;/b&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Basic texturing scheme ===&lt;br /&gt;
&lt;br /&gt;
The texturing scheme is controlled on a per-landclass basis from &amp;lt;b&amp;gt;materials.xml&amp;lt;/b&amp;gt;. The relevant sections for procedural textruring in each material declaration are &amp;lt;texture-set&amp;gt; and &amp;lt;parameters&amp;gt;. Here the &amp;lt;texture-set&amp;gt; block controls what textures are used whereas the &amp;lt;parameters&amp;gt; block controls how these textures are used. &lt;br /&gt;
&lt;br /&gt;
Another important part are &amp;lt;xsize&amp;gt; and &amp;lt;ysize&amp;gt; (the sections which describes to which size in meters the base texture is mapped). The procedural texturing shader computes the size of all used textures &amp;lt;i&amp;gt;relative&amp;lt;/i&amp;gt; to the base texture size, so if a base texture is declared to have a size of 500 m rather than the default 2000 m, the resolution of the hires overlay or the grain texture will automatically also be 5 times higher then default - which may or may not be desired.&lt;br /&gt;
&lt;br /&gt;
The individual textures which can be used are:&lt;br /&gt;
&lt;br /&gt;
==== Base texture ====&lt;br /&gt;
&lt;br /&gt;
The base texture is used as in the default scheme to give the basic appearance of a landclass. The base texture is assumed to be opaque, and its alpha channel is hence not evaluated to transparent, but rather used to encode where the autumn color effect should be used. An alpha value of 0.5 is appropriate for deciduous forests which should get a strong red-orange appearance in autumn, a value of 0.8-0.9 is more appropriate for grass surfaces.&lt;br /&gt;
&lt;br /&gt;
[[File:tiling_example.jpg|400px|center|Base Texture]]&lt;br /&gt;
&lt;br /&gt;
The base texture can take some additional parameters. The first is intrinsic wetness. If the quality level of the shader supports it, this will make the texture appear wet and add sparkling specular reflections to the terrain even if the surrounding terrain is dry. The dust resistance acts in the opposite way, it is intended for irrigated terrain in desert areas and is a multiplier for the dust effect, i.e. a value of 0.0 will make a landclass completely impervious to dust. Finally, rock strata represents an integer flag whether a stratified pattern will be drawn on vertical surfaces or not.  &lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;intrinsic_wetness&amp;gt;0.0&amp;lt;/intrinsic_wetness&amp;gt;&lt;br /&gt;
  &amp;lt;dust_resistance&amp;gt;1.0&amp;lt;/dust_resistance&amp;gt;&lt;br /&gt;
  &amp;lt;rock_strata&amp;gt;0&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value of intrinsic wetness is zero, the parameter can range from 0 (dry) to 1 (very wet, lots of open water). The defaul value of duse resistance is one, and the parameter can range from 1 (gets dusty like everything else) to 0 (impervious to dust).&lt;br /&gt;
&lt;br /&gt;
==== The overlay texture ====&lt;br /&gt;
&lt;br /&gt;
The overlay texture is a texture at a similar resolution level which is mixed with the base texture to achieve de-tiling or gradient effects. By default, it covers about 50% of the available scene. As for the base texture, the alpha channel of the overlay texture encodes color rotations in autumn.&lt;br /&gt;
&lt;br /&gt;
[[File:overlay1.jpg|400px|center|The overlay Texture]]&lt;br /&gt;
&lt;br /&gt;
The overlay texture can be used in two different modes or a mixture of them. The control parameter is &amp;lt;transition_model&amp;gt; - if this parameter is set to 0, the transition between base and overlay texture is determined by a noise function. If the parameter is set to 1, the slope of the terrain determines the transition and the overlay texture is only used on steep slopes. A setting of 0.5 uses a mixture of noise and slope information to drive the transition.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default texture selected is void.png which corresponds to no overlay texture.&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;transition_model&amp;gt;0.5&amp;lt;/transition_model&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.5, the parameter can range from 0 (random transition) to 1 (gradient-driven transition).&lt;br /&gt;
&lt;br /&gt;
==== The hires texture ====&lt;br /&gt;
&lt;br /&gt;
The hires texture adds patches of a texture at much higher resolution into the mix, which both add to de-tiling and lead to a better experience of the scenery from close-up. The hires textured patches will however inevitably appear featureless from large distance and will show tiling themselves, so the amount of hires texture as well as the hires texture sheet itself must be designed carefully.&lt;br /&gt;
&lt;br /&gt;
The areas covered by the hires texture will (partially to mask tiling of the hires patches) receive a stronger bumpmap and some distortion than the rest of the terrain by the shader.&lt;br /&gt;
&lt;br /&gt;
As for the base texture, the alpha channel of the hires texture encodes color rotations in autumn.&lt;br /&gt;
&lt;br /&gt;
[[File:overlay02.jpg|400px|center|The hires Texture]]&lt;br /&gt;
&lt;br /&gt;
The parameter &amp;lt;hires_overlay_bias&amp;gt; controls the fraction of terrain covered by the hires texture patches - by default about 40% of the scene will be covered. Positive or negative biases can make the fraction arbitrarily small or large.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default texture selected is void.png which corresponds to no hires texture. The hires texture does not require the overlay texture to be declared.&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;hires_overlay_bias&amp;gt;0.0&amp;lt;/hires_overlay_bias&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.0, the parameter can range from -0.5 (strong suppression of the hires overlay texture) to +0.5 (strong enhancement of the hires overlay texture).&lt;br /&gt;
&lt;br /&gt;
==== The gradient texture ====&lt;br /&gt;
&lt;br /&gt;
The gradient texture is exclusively used for steep terrain gradients (significantly steeper than the point at which the overlay texture may be used) to account for the fact that beyond a certain slope, terrain can not have vegetation cover and hence landclass information needs to be corrected if necessary.&lt;br /&gt;
&lt;br /&gt;
The default texture is rock.png which is hence used for all landclasses unless specifically declared otherwise. The default may be inappropriate in some regions (volcanic terrain with different rock hue, tropical terrain in which even steep slopes are covered) - the gradient texture then needs to be declared a different texture for all materials in the area. Declaring void.png will not use a gradient texture.&lt;br /&gt;
&lt;br /&gt;
The gradient texture does not use any parameters.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== The grain texture ====&lt;br /&gt;
&lt;br /&gt;
The grain texture adds a grainy pattern to the terrain at close distances, giving the appearance of better resolution. The grain texture parses the texture alpha channel as transparency (since it just superimposes a pattern), so here the alpha channel can not be used to encode vegetation effects, and the grain texture may not have a strong color.&lt;br /&gt;
&lt;br /&gt;
[[File:grain_texture.jpg|400px|center|The grain overlay texture]]&lt;br /&gt;
&lt;br /&gt;
To allow fine-tuning of the grain effect, the texture can be multiplied with the &amp;lt;grain_strength&amp;gt; parameter which sets the overall alpha of the grain effect - a low value works best on bright base textures whereas dark base textures may require a stronger grain.&lt;br /&gt;
&lt;br /&gt;
The default grain texture is grain_texture.png which adds a vegetation-like grain. This can be replaced with other grain patterns or void.png for no grain where appropriate.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;grain_strength&amp;gt; 0.5&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value is 0.5 and the parameter range is 0 (completely transparent) to 1 (completely opaque).&lt;br /&gt;
&lt;br /&gt;
==== The dot texture ====&lt;br /&gt;
&lt;br /&gt;
The dot overlay uses sparse dot noise to create detail in the scene. Sparse dot noise textured with a rock texture can give the appearance of boulders scattered across the terrain, the same noise textured with a grass texture can be used to create round vegetation patches.&lt;br /&gt;
&lt;br /&gt;
[[File:hires_terrain03.jpg|400px|center|The dot overlay texture creating grass patches]]&lt;br /&gt;
&lt;br /&gt;
Both the dot size and the dot density can be controlled by the user. The range out to which the dots are visible is automatically adjusted based on the dot size scale. By default, the dot texture is set to void.png, which means that no dot texture is used.&lt;br /&gt;
&lt;br /&gt;
* declaration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;hires_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;gradient_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;dot_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
 &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* parameters:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;parameters&amp;gt;&lt;br /&gt;
  &amp;lt;dot_density&amp;gt; 1.0&amp;lt;/dot_density&amp;gt;&lt;br /&gt;
  &amp;lt;dot_size&amp;gt; 1.0&amp;lt;/dot_size&amp;gt;&lt;br /&gt;
 &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value for &amp;lt;dot_density&amp;gt; is 1.0, the parameter can be set in the range from 0.0 to 1.0 (values above 1.0 do not increase the dot density further). The default value for &amp;lt;dot_size&amp;gt; is also 1.0, which creates dots at size scales varying between 10 cm and few m. The parameter is a multiplier for these default values, i.e. at a value of 10 dots of ~10-20 m size are created.&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
The following declaration&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;texture-set&amp;gt;&lt;br /&gt;
   &amp;lt;texture&amp;gt;Terrain/marsh2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;Terrain/grass_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;Terrain/marsh4a.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
  &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
   &amp;lt;grain_strength&amp;gt;0.9&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
   &amp;lt;intrinsic_wetness&amp;gt;0.6&amp;lt;/intrinsic_wetness&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in marshland drawn like this&lt;br /&gt;
&lt;br /&gt;
[[File:marsh_example.jpg|400px|Procedural marshland close-up]]&lt;br /&gt;
[[File:wetness.jpg|400px|Procedural marshland from the distance]]&lt;br /&gt;
&lt;br /&gt;
The following declaration&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;texture&amp;gt;Terrain/shrub-hawaii.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;11&amp;quot;&amp;gt;Terrain/sand_hires_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;12&amp;quot;&amp;gt;Terrain/rock_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;13&amp;quot;&amp;gt;Terrain/rock_red.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;14&amp;quot;&amp;gt;Terrain/grain_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;15&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
   &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;rock_strata&amp;gt;1&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
   &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in stratified rock structures like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Southwest04.jpg|400px|Procedural rock Grand Canyon]]&lt;br /&gt;
[[File:Southwest09.jpg|400px|Procedural rock Zion National Park]]&lt;br /&gt;
&lt;br /&gt;
=== The agriculture effect ===&lt;br /&gt;
&lt;br /&gt;
The basic texture scheme based on Perlin noise is of limited value for e.g. agricultural terrain which rarely shows the organic shapes generated by Perlin noise. For such terrain, the agriculture effect should be used instead which is based on Perlin noise.&lt;br /&gt;
&lt;br /&gt;
The effect needs to be declared for the landclass as&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;effect&amp;gt;Effects/agriculture&amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(note that since the default rendering scheme has typically the crop effect associated with agriculture, this declaration inherits crop.eff).&lt;br /&gt;
&lt;br /&gt;
By default, large patches of agriculture usually show strong tiling:&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro01.jpg|400px|center|Tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
It is implemented in two modes, overlay and rotation. Since the agriculture effect is optional, its overlay texture is declared separately from the normal declaration above as follows:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;texture&amp;gt;base_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;overlay_texture.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the overlay texture is declared void.png (to which the effect defaults), it is not used. The effect takes a number of parameters. For the overlay, the fraction taken by the overlay texture and the scale at which the patches are drawn can be specified through the overlay fraction and the overlay scale, while the shape of the domains can be controlled using a distortion factor.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;overlay_fraction&amp;gt;0.5&amp;lt;/overlay_fraction&amp;gt;&lt;br /&gt;
   &amp;lt;overlay_scale&amp;gt;1000.0&amp;lt;/overlay_scale&amp;gt;&lt;br /&gt;
   &amp;lt;distortion_factor&amp;gt;0.3&amp;lt;/distortion_factor&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This results in the overlay texture superimposed in irregular patches. &lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro03.jpg|400px|center|Overlay de-tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
De-tiling can also be achieved by rotating the texture coordinates inside patches. This is controlled by a rotation flag which can be set to 1 (random rotation) or 2 (rotation by multiples of 90 degrees only) in addition to a rotation scale. In case of very regular textures which should be rotated by multiples of 90 degrees only, uv texture coordinate offsets are provided to align texture and rotated domain.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;rotation_flag&amp;gt;1&amp;lt;/rotation_flag&amp;gt;&lt;br /&gt;
   &amp;lt;rotation_scale&amp;gt;2000.0&amp;lt;/rotation_scale&amp;gt;&lt;br /&gt;
   &amp;lt;uv_xoffset&amp;gt;0.0&amp;lt;/uv_xoffset&amp;gt;&lt;br /&gt;
   &amp;lt;uv_yoffset&amp;gt;0.0&amp;lt;/uv_yoffset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using domain rotation also leads to a reasonable de-tiling while keeping the color impression.&lt;br /&gt;
&lt;br /&gt;
[[File:Domains_agro02.jpg|400px|center|Overlay de-tiling in agriculture]]&lt;br /&gt;
&lt;br /&gt;
Both rotation and overlay can be combined. Neither of the effects is compatible with patterns of random trees of buildings created by placement masks, as these are used at tile loading time and can not be changed runtime like shader effects.&lt;br /&gt;
&lt;br /&gt;
=== The rock effect ===&lt;br /&gt;
&lt;br /&gt;
Specifically for rock, a completely procedural scheme to generate various types of rock structures is available. Since this is computationally about on par with the overlay texture schemes for generic terrain, it activates only at highest rendering quality level.&lt;br /&gt;
&lt;br /&gt;
The effect needs to be declared for the landclass as&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;effect&amp;gt;Effects/rock&amp;lt;/effect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rock is drawn by overlaying several structure layers. The base layer is set by several octaves of Perlin noise superimposed as brightness variation onto a specified texture color. The relevant configuration parameters are e.g.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;0.7&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;1.3&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;base-color&amp;gt; is a rgb triplet with color values ranging from 0 to 1 specifying the primary hue of the rock to be drawn. &amp;lt;ontrast&amp;gt; regulates how strongly the noise modification of rock brightness will appear from 0 (no noise modulation) to 1 (full noise modulation). &amp;lt;grain-fade-power&amp;gt; regulates the balance between large-scale and small-scale noise. Values above 1 will emphasize small-scale structures, values below 1 will emphasize large-scale structures. There is no real limit to the parameter, but presumably values outside [0.5:1.5] won't look compelling.&lt;br /&gt;
&lt;br /&gt;
The effect of the fade power ranging from 0.8 to 1.3 is illustrated by the following series of screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp0.8.jpg|300px|Grain fade power 0.8]]&lt;br /&gt;
[[File:Rock-gfp1.0.jpg|300px|Grain fade power 1.0]]&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|Grain fade power 1.3]]&lt;br /&gt;
&lt;br /&gt;
The effect of the contrast parameter changing from 1.0 to 0.7 looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|Contrast 1.0]]&lt;br /&gt;
[[File:Rock-contrast.jpg|300px|Contrast 0.7]]&lt;br /&gt;
&lt;br /&gt;
Since it is difficult to guess the resulting visual brightness of rock after all noise and overlay patterns have been added, &amp;lt;rock-brightness&amp;gt; is a convenient scale after to multiply pixel color after all layers have been added.&lt;br /&gt;
&lt;br /&gt;
The overlay layer is based on Perlin noise domains and draws with a different color onto the base layer. The relevant parameters are&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;-0.05&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the &amp;lt;overlay-color&amp;gt; is again a rgb triplet and &amp;lt;overlay-alpha&amp;gt; its transparency value. &amp;lt;overlay-bias&amp;gt; should take values between -0.5 and 0.5 and controls the amount of surface to be covered with the overlay color.&lt;br /&gt;
&lt;br /&gt;
As illustrated by the following screenshots, the overlay layer can be used to draw moss and lichen cover as well as mineral crusts on top of the base rock layer:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-gfp1.3.jpg|300px|No overlay]]&lt;br /&gt;
[[File:Rock-lichen.jpg|300px|Green overlay, small alpha, positive bias]]&lt;br /&gt;
[[File:Rock-crust.jpg|300px|White overlay, large alpha, negative bias]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The crack layer is based on stretched Perlin noise isolines and controlled by the parameters&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.9&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;crack-depth&amp;gt; (from 0 to 1) regulates how pronounced the darkening inside the crack region is whereas the &amp;lt;crack-pattern-stretch&amp;gt; (from 1 to roughly 10) controls the elongation of the crack pattern.&lt;br /&gt;
&lt;br /&gt;
For low stretch values, the crack layer can be used to draw bands of different mineral inside the rock, for high stretch values it can simukate a genuine pattern of cracks in the surface, see screenshots below for an illustration:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-crust.jpg|300px|No cracks]]&lt;br /&gt;
[[File:Rock-crack1.jpg|300px|Stretch factor 1]]&lt;br /&gt;
[[File:Rock-crack7.jpg|300px|Stretch factor 7]]&lt;br /&gt;
&lt;br /&gt;
Finally, stratified and slope line noise (see above) are also available as texture brightness modifiers. The parameters are&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/rock_strata&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;slope-contrast&amp;gt; (value between 0 and 1) regulates how pronounced the slope lines are drawn and &amp;lt;rock_strata&amp;gt; (value 0 or 1) indicated whether stratified noise should be used or not. Neither slope noise nor stratified noise affect flat rock surfaces, they only lead to modulation on sufficiently steep rock surfaces.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 1:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This parameter set&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt; &lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.3&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.6&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;7.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata&amp;gt;0&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
results in rock drawn like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-example1.jpg|500px|center|Procedural rock, example 1]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following set of parameters&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;base-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/base-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-color type=&amp;quot;vec3d&amp;quot;&amp;gt;0.9 0.95 0.94&amp;lt;/overlay-color&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-alpha type=&amp;quot;float&amp;quot;&amp;gt;0.4&amp;lt;/overlay-alpha&amp;gt;&lt;br /&gt;
   &amp;lt;overlay-bias type=&amp;quot;float&amp;quot;&amp;gt;0.0&amp;lt;/overlay-bias&amp;gt;&lt;br /&gt;
   &amp;lt;contrast type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/contrast&amp;gt;&lt;br /&gt;
   &amp;lt;slope-contrast type=&amp;quot;float&amp;quot;&amp;gt;0.2&amp;lt;/slope-contrast&amp;gt;&lt;br /&gt;
   &amp;lt;crack-depth type=&amp;quot;float&amp;quot;&amp;gt;0.5&amp;lt;/crack-depth&amp;gt;&lt;br /&gt;
   &amp;lt;crack-pattern-stretch type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/crack-pattern-stretch&amp;gt;&lt;br /&gt;
   &amp;lt;rock-brightness type=&amp;quot;float&amp;quot;&amp;gt;1.3&amp;lt;/rock-brightness&amp;gt;&lt;br /&gt;
   &amp;lt;grain-fade-power type=&amp;quot;float&amp;quot;&amp;gt;0.8&amp;lt;/grain-fade-power&amp;gt;&lt;br /&gt;
   &amp;lt;rock_strata&amp;gt;1&amp;lt;/rock_strata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
leads to stratified rock like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-example2.jpg|500px|center|Procedural rock, example 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The dirt runway effect ===&lt;br /&gt;
&lt;br /&gt;
Using a dedicated ALS effect, it is possible to generate a wide variety of visuals for non-paved runways. The effect is used to texture a runway as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;effect&amp;gt;Effects/dirt-runway&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the textures and parameters to configure it must be specified in the &amp;lt;parameters&amp;gt; section of the landclass used for the runway.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Important note:&amp;lt;/b&amp;gt; Part of the effect explicitly relies on a particular uv-mapping of the dirt runways. For this reason, the effect may or may not work as intended with scenery other than FG world scenery 2.0 - in particular custom scenery builds may not give the desired visuals if they treat unpaved runways differently.&lt;br /&gt;
&lt;br /&gt;
The effect uses a mixture of three texture layers - a base texture layer (n=16) an overlay texture layer (n=17) and a grain texture layer (supposed to be a largely transparent texture with just a darker overlay pattern on it, n=18).&lt;br /&gt;
&lt;br /&gt;
For each of the textures, a mapping to a physical size of the texture patch can be defined by the set of parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;100.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;100.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(i.e. setting a parameter to 100 means that the texture sheet is supposed to represent a 100 m x 100 m patch of runway). This is different from the way the default renderer treats dirt runways by stretching the assigned texture over the whole runway (i.e. texture magnification depends on runway size). The strength of the grain overlay can be controlled by&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.3&amp;lt;/grain_strength&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
where a value of zero implies no grain texture and a value of 1 the full grain effect as on the texture.&lt;br /&gt;
&lt;br /&gt;
The mixture of base and overlay texture layers is controlled by filtered Perlin noise. The frequencies of the base noise distribution can be controlled by &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the sum of all parameters is supposed to be 1. Strengthening a parameter generates more structure at this scale, for instance in order to generate a small-scale, fine-grained pattern one should set the lower frequencies to larger values, whereas for large continuous patches of texture strength_10m and strength_5m should be largest.&lt;br /&gt;
&lt;br /&gt;
The raw Perlin noise is post-processed by a filter driven by two parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of these, the threshold regulates the relative mixture of the two textures (0.5 roughly corresponds to 50%) and transition how the mixture will be drawn. A small transition value (say 0.1) corresponds to an either/ or scenario in which only one of the textures will be drawn (appropriate for grass patches on dirt), a large transition value smoothly blends the textures (appropriate for different sand textures).&lt;br /&gt;
&lt;br /&gt;
If&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
is set to 1, the noise distribution will tend to favor the base layer in the center of the runway. &amp;lt;b&amp;gt;This requires a specific uv-mapping and will not work for custom-generated runways.&amp;lt;/b&amp;gt; The strength of that bias is set by&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is between 0 (no bias) and 1 (don't draw overlay layer in runway center no matter what).&lt;br /&gt;
&lt;br /&gt;
In addition, the effect uses a normal map (since it is used in a non-standard way, touch at your own risk) - the visual 'bumpiness' of the runway can be adjusted using &lt;br /&gt;
&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using different mixtures of textures and parameters, a wide variety of visuals can be achieved, a few examples in the following.&lt;br /&gt;
&lt;br /&gt;
A lakebed texture overlaid with sand gives proper visuals for e.g. the Rogers Dry Lake runways at Edwards AFB:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Terrain/sand_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand1.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;100.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;100.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.3&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy01.jpg|500px|Dirt runway example 1]]&lt;br /&gt;
&lt;br /&gt;
Using a largely grass-textured surface and allowing some gravel to show in the runway center gives the appearance of a worn grass runway:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Terrain/sand_hires_ochre.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.3&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.0&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.1&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.2&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.15&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.1&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;30.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;50.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.8&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy02.jpg|500px|Dirt runway example 2]]&lt;br /&gt;
&lt;br /&gt;
Using the effect 'as is', i.e. without any additional parameters, reproduces the old appearance of the dirt runway effect in ALS:&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy03.jpg|500px|Dirt runway example 3]]&lt;br /&gt;
&lt;br /&gt;
With the original dirt runway texture mapped to a small size and framed by less structured dirt, also a compelling result can be achieved:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand_hires_ochre.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.4&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.2&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.1&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.2&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.6&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;25.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.4&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy04.jpg|500px|Dirt runway example 4]]&lt;br /&gt;
&lt;br /&gt;
Using grass as the overlay material blends the runway outline nicely into the airport keep:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/airport_grass2.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.2&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.6&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.2&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.0&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.0&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.1&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.8&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;20.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
       &amp;lt;grain_strength&amp;gt;0.6&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy05.jpg|500px|Dirt runway example 5]]&lt;br /&gt;
&lt;br /&gt;
Finally an example of diffuse sand patches blended into each other by low frequency noise and a large value of the transition in the filter:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;texture-set&amp;gt;&lt;br /&gt;
      &amp;lt;texture&amp;gt;Runway/dirt_rwy.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;16&amp;quot;&amp;gt;Runway/lakebed_taxiway.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
      &amp;lt;texture n=&amp;quot;17&amp;quot;&amp;gt;Terrain/sand_hires.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
    &amp;lt;/texture-set&amp;gt;&lt;br /&gt;
    &amp;lt;parameters&amp;gt;&lt;br /&gt;
      &amp;lt;strength_05m&amp;gt;0.0&amp;lt;/strength_05m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_1m&amp;gt;0.2&amp;lt;/strength_1m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_2m&amp;gt;0.3&amp;lt;/strength_2m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_5m&amp;gt;0.3&amp;lt;/strength_5m&amp;gt;&lt;br /&gt;
      &amp;lt;strength_10m&amp;gt;0.2&amp;lt;/strength_10m&amp;gt;&lt;br /&gt;
      &amp;lt;filter_threshold&amp;gt;0.2&amp;lt;/filter_threshold&amp;gt;&lt;br /&gt;
      &amp;lt;filter_transition&amp;gt;0.4&amp;lt;/filter_transition&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center&amp;gt;1&amp;lt;/bias_center&amp;gt;&lt;br /&gt;
      &amp;lt;bias_center_strength&amp;gt;0.5&amp;lt;/bias_center_strength&amp;gt;&lt;br /&gt;
      &amp;lt;relief_strength&amp;gt;0.35&amp;lt;/relief_strength&amp;gt;&lt;br /&gt;
      &amp;lt;size_base&amp;gt;25.0&amp;lt;/size_base&amp;gt;&lt;br /&gt;
      &amp;lt;size_overlay&amp;gt;25.0&amp;lt;/size_overlay&amp;gt;&lt;br /&gt;
      &amp;lt;size_grain&amp;gt;20.0&amp;lt;/size_grain&amp;gt;&lt;br /&gt;
      &amp;lt;grain_strength&amp;gt;0.2&amp;lt;/grain_strength&amp;gt;&lt;br /&gt;
    &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|[[File:Dirt rwy06.jpg|500px|Dirt runway example 6]]&lt;br /&gt;
&lt;br /&gt;
=== Overlay layers ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Pixel color postprocessing ===&lt;br /&gt;
&lt;br /&gt;
A number of environment effects are implemented under user control in the Environment menu. Let's consider the changes to the base scene:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural01.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Snow ====&lt;br /&gt;
&lt;br /&gt;
Using terrain elevation and gradient information, the base location of a snow layer can be determined. The actual snow cover is a white base color, mixed with Perlin noise and normal-mapped with Perlin noise of multiple frequencies. A bias factor for the mixing allows to simulate snow layer of varying thickness.&lt;br /&gt;
&lt;br /&gt;
A low layer thickness creates patches of snow on the terrain through which the basic terrain textures are visible:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural02.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
A high layer thickness completely covers the terrain in snow. Subtle procedural color variations of the snow and bump-mapping change the base white snow pixel color into a realistic texture:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural03.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
If the snowline is placed higher, snow is only simulated on the mountain tops - note also that steep gradients tend to remain clear of snow:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural04.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Dust ====&lt;br /&gt;
&lt;br /&gt;
The dust effect mixes all pixels of the terrain with a basic dust color. A low dust effect setting gives the terrain a dry and parched appearance, as after a long summer period without rain.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural05.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
A high dust effect setting changes the appearance to desert-like terrain (which is rather unrealistic for this scenery):&lt;br /&gt;
&lt;br /&gt;
[[File:procedural06.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Wetness ====&lt;br /&gt;
&lt;br /&gt;
Wet terrain is rendered overall darker. In flat areas, in addition patches of high specular reflection are added, leading to the appearance of glitterin light reflections on water puddles.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural07.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Vegetation ====&lt;br /&gt;
&lt;br /&gt;
A high setting of the vegetation cover is most appropriate for tropical settings, but it can also be used to show seasonal effects, for instance the desert a few days after rainfall. It covers the whole terrain with mossy overgrowth, which in the case of the Grenoble scenery used here blurs the boundaries of the fields and gives the appearance of abandoned agriculture.&lt;br /&gt;
&lt;br /&gt;
[[File:procedural08.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
==== Autumn colors ====&lt;br /&gt;
&lt;br /&gt;
The autumn color effect is unique in the pixel color postprocessing effects in that it needs modifications to the base texture to work. Since the basic terrain texture is never transparent, the information of where vegetation changes color in autumn and where it remains unchanged is hence encoded in the terrain texture alpha channel. A value of 1 means no change of color, a value of 0.5 is appropriate for high changes to bright red-orange. In order to work with the autumn effect, all textures need to be edited manually to indicate where the effect should be computed.&lt;br /&gt;
&lt;br /&gt;
In early autumn, vegetation just tends to pale a little:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural09.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
Later, fields get bright golden-yellow whereas deciduous forests go to orange-red (mixed forest cover rotates locally where indicated by the alpha channel):&lt;br /&gt;
&lt;br /&gt;
[[File:procedural10.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
Finally, in late autumn all vegetation cover is turned into a dull brown:&lt;br /&gt;
&lt;br /&gt;
[[File:procedural11.jpg|500px|center|Base scenery near Grenoble]]&lt;br /&gt;
&lt;br /&gt;
== Limitations of procedural texturing ==&lt;br /&gt;
&lt;br /&gt;
Despite its obvious benefits, there are some problems which are not easily addressed by procedural terrain texturing.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Landclass boundaries&amp;lt;/b&amp;gt;: Procedural texturing can de-emphasize landclass boundaries. This happens for instance if a landclass uses both overlay and detail texture, and only the base texture is changed in the adjacent landclass. Since the noise is continuous across landclass boundaries, the change in base texture is masked by the continuous overlay components. However, procedural texturing can not remove the landclass seams, as a different texture mix is evaluated for every declared landclass.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Detail averaging:&amp;lt;/b&amp;gt; A problem arises when details are generated which are smaller than a pixel. In this case, the rendering engine does not average over many sub-pixels to determine the final color of the pixel but just takes one (few) samples. This means that a high contrast detailed structure of black and white is not averaged to a grey pixel but, dependent on the viewer position, either results in a black or a white pixel. The net result is a flickering Moire pattern which is visually very unpleasant (the same effect occurs when models get smaller than a pixel). In textures, the problem is solved by mipmapping - every 4 pixels are averaged to a single pixel on a coarse-grained version of the texture at texture loading time, and only the appropriate resolution level of the texture is referenced. To do the same thing in procedural texturing is very expensive (two resolution levels up one ends with 16 times the calculational effort for a pixel), so a viable strategy to remove the flickering patterns involves replacing noise by its &amp;lt;i&amp;gt;global&amp;lt;/i&amp;gt; average (i.e. the 'all pixel' rather than '4 pixel' average, which is usually known for the noise function). The net result is that procedurally generated details tend to looks less grainy than true textures as soon as details get smaller than a single pixel, which is s subtle, but noticeable effect. In essence, this is similar to an antialiasing problem and could also be dealt with by generically sampling multiple sub-pixels at the expense of the increased performance cost.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Computational cost:&amp;lt;/b&amp;gt; Especially on older graphics cards, multiple texture lookups combined with evaluating noise and other functions is significantly slower than just texturing the terrain with a single texture. Most optimization strategies used in other 3D games (such as filling the z-buffer early and discarding occluded pixels) do not work well for a flight simulator where most of the terrain is visible at any given time.&lt;br /&gt;
&lt;br /&gt;
Some points have found a solution:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Terrain tile boundaries&amp;lt;/b&amp;gt;: Terrain is loaded in discrete chunks, so-called tiles. For technical reasons, the coordinate system used to address positions changes for each tile. In practice, this unfortunately implies that noise functions are discontinuous across tile boundaries, and this shows in more or less pronounced seams in the computed textures -&amp;gt; however this can be addressed by going from tile-based to FG world coordinates and using 3-d noise. Due to the large distances involved, small-scale noise becomes then numerically unstable, but noise wavelength above 250 m can safely be done in world coordinates, leading to appealing visuals both at large and small distance.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Tiling for non-natural landclasses&amp;lt;/b&amp;gt;: The de-tiling strategies described above are based on mixing texture components using noise functions. This works fine for natural landclasses, but human-influenced landclasses like agriculture or urban terrain are not well described by Perlin noise, and de-tiling crop fields using noise functions does not yield plausible results.This is now solved by domain noise.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
&lt;br /&gt;
* [[Atmospheric light scattering]]&lt;br /&gt;
* [[ALS technical notes]]&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.science-and-fiction.org/rendering/noise.html From random number to texture - GLSL noise functions]&lt;br /&gt;
* http://www.upvector.com/?section=Tutorials&amp;amp;subsection=Intro%20to%20Procedural%20Textures&lt;br /&gt;
* http://www.graphics.usc.edu/cgit/publications/papers/p95-rhoades.pdf&lt;br /&gt;
* http://www.vis.uni-stuttgart.de/~dachsbcn/download/ProcReproduction.pdf&lt;br /&gt;
* http://www.unilim.fr/pages_perso/guillaume.gilet/Recherche/pdf/CGI12.pdf&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg39692.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;/div&gt;</summary>
		<author><name>Thorsten</name></author>
	</entry>
</feed>