ALS technical notes: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 67: Line 67:
[[File:Als secondary light fog.jpg|400px|ALS generic lights illuminating dense fog]]
[[File:Als secondary light fog.jpg|400px|ALS generic lights illuminating dense fog]]


== ALS flashlight ==


This effect is meant to imitate a hand held flashlight for use in getting instruments in the cockpit turned on in dark conditions.
It is almost identical in nature to ALS searchlight only it is applied using interior-model.eff.
It has two user defined light color filters that can be applied and also a user defined light radius setting.
[[File:ALS flashlight.jpg|600px|ALS flashlight effect]]
To implement this effect use
<syntaxhighlight lang="xml"><inherits-from>Effects/model-interior</inherits-from></syntaxhighlight>
A full definition looks like this
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
  <name>c172-interior</name>
  <inherits-from>Effects/model-interior</inherits-from>
  <parameters>
<light-filter-one type="vec3d">0.5 0.5 0.5</light-filter-one>
<light-filter-two type="vec3d">0.9 0.2 0.2</light-filter-two>
<light-radius type="float">13</light-radius>
  </parameters>
</PropertyList>
</syntaxhighlight>
In the example above light-filter-one is soft white light and light-filter-two is a soft red light.
After defining as above you can turn it on using the following property
/sim/rendering/als-secondary-lights/use-flashlight = 1 is light-filter-one
/sim/rendering/als-secondary-lights/use-flashlight = 2 is light-filter-two


== The grain texture and the rain effect ==
== The grain texture and the rain effect ==
Line 655: Line 625:


<b>Important note:</b> 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.
<b>Important note:</b> 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.
=== ALS flashlight ===
This effect is meant to imitate a hand held flashlight for use in getting instruments in the cockpit turned on in dark conditions.
It is almost identical in nature to ALS searchlight only it is applied using interior-model.eff.
It has two user defined light color filters that can be applied and also a user defined light radius setting.
[[File:ALS flashlight.jpg|600px|ALS flashlight effect]]
To implement this effect use
<syntaxhighlight lang="xml"><inherits-from>Effects/model-interior</inherits-from></syntaxhighlight>
A full definition looks like this
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
  <name>c172-interior</name>
  <inherits-from>Effects/model-interior</inherits-from>
  <parameters>
<light-filter-one type="vec3d">0.5 0.5 0.5</light-filter-one>
<light-filter-two type="vec3d">0.9 0.2 0.2</light-filter-two>
<light-radius type="float">13</light-radius>
  </parameters>
</PropertyList>
</syntaxhighlight>
In the example above light-filter-one is soft white light and light-filter-two is a soft red light.
After defining as above you can turn it on using the following property
/sim/rendering/als-secondary-lights/use-flashlight = 1 is light-filter-one
/sim/rendering/als-secondary-lights/use-flashlight = 2 is light-filter-two


=== Implicit lightmap ===
=== Implicit lightmap ===
1,360

edits

Navigation menu