ALS technical notes: Difference between revisions

Jump to navigation Jump to search
Line 1,473: Line 1,473:
Make your own derived effect inheriting from Effects/procedural-light.eff and assign it in the xml wrapper of the light.
Make your own derived effect inheriting from Effects/procedural-light.eff and assign it in the xml wrapper of the light.


* the base light color can be set via
====The base light color set====
 
The base light color can be set via:


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
Line 1,483: Line 1,485:
These take the normal set of values ranging from 0 to 1.  
These take the normal set of values ranging from 0 to 1.  


* how the light appears at full intensity in the center can be set via
====Light full intensity in the center====
 
Now the light appears at full intensity in the center can be set via:


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
Line 1,495: Line 1,499:
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.
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.


* to runtime change the light intensity, assign
====Runtime change the light intensity====
 
To runtime change the light intensity, assign


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
Line 1,509: Line 1,515:
</syntaxhighlight>
</syntaxhighlight>


====Set directional lights====


* 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:
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:


<syntaxhighlight lang="xml">     
<syntaxhighlight lang="xml">     
Line 1,523: Line 1,530:
<b>Do not use a rotation animation to change the light direction - it won't work.</b> Make the pointing vector properties and change them to your needs.
<b>Do not use a rotation animation to change the light direction - it won't work.</b> Make the pointing vector properties and change them to your needs.


* fading of a directional light away from the pointing axis is controlled by passing angles (or rather sines of angles).
====Fading of a directional light====
 
The fading of a directional light away from the pointing axis is controlled by passing angles (or rather sines of angles).


<syntaxhighlight lang="xml">     
<syntaxhighlight lang="xml">     
Line 1,551: Line 1,560:
</syntaxhighlight>
</syntaxhighlight>


* to get an automatic strobe effect you can set
====Strobe effect====
 
For get an automatic strobe effect you can set:


<syntaxhighlight lang="xml">     
<syntaxhighlight lang="xml">     
408

edits

Navigation menu