1
0
Fork 0

Add lights to UFO.

This commit is contained in:
Henning Stahlke 2021-01-31 14:03:21 +01:00
parent d528531fba
commit 0b62b8b03e
4 changed files with 247 additions and 3 deletions

View file

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<params>
<power-source>/controls/lighting/nav-light</power-source>
<name>UfoLight</name>
<r>0.5</r>
<g>0.5</g>
<b>0.5</b>
<x-m/>
<y-m/>
<z-m/>
<heading-deg/>
</params>
<!-- search lights -->
<animation>
<type>select</type>
<object-name alias="/params/name"/>
<condition>
<property alias="/params/power-source"/>
</condition>
</animation>
<light>
<name alias="/params/name"/>
<type>point</type>
<position>
<x alias="/params/x-m"/>
<y alias="/params/y-m"/>
<z alias="/params/z-m"/>
</position>
<ambient>
<r alias="/params/r"/>
<g alias="/params/g"/>
<b alias="/params/b"/>
<a>1.0</a>
</ambient>
<diffuse>
<r>1.0</r>
<g>0.9</g>
<b>0.7</b>
<a>1.0</a>
</diffuse>
<specular>
<r>0.99</r>
<g>0.9</g>
<b>0.7</b>
<a>1.0</a>
</specular>
<debug-color>
<r>0.5</r>
<g>0.5</g>
<b>0</b>
<a>1.0</a>
</debug-color>
<attenuation>
<c>1.0</c>
<l>0.35</l>
<q>0.44</q>
</attenuation>
<range-m>13</range-m>
</light>
</PropertyList>

View file

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<params>
<power-source>/controls/lighting/taxi-light</power-source>
<name>UfoLight</name>
<r>0.5</r>
<g>0.5</g>
<b>0.5</b>
<x-m/>
<y-m/>
<z-m/>
<heading-deg/>
</params>
<!-- search lights -->
<animation>
<type>select</type>
<object-name alias="/params/name"/>
<condition>
<property alias="/params/power-source"/>
</condition>
</animation>
<light>
<name alias="/params/name"/>
<type>spot</type>
<position>
<x alias="/params/x-m"/>
<y alias="/params/y-m"/>
<z alias="/params/z-m"/>
</position>
<direction>
<pitch-deg>62.1</pitch-deg>
<roll-deg>0</roll-deg>
<heading-deg alias="/params/heading-deg"/>
</direction>
<ambient>
<r alias="/params/r"/>
<g alias="/params/g"/>
<b alias="/params/b"/>
<a>1.0</a>
</ambient>
<diffuse>
<r>1.0</r>
<g>0.9</g>
<b>0.7</b>
<a>1.0</a>
</diffuse>
<specular>
<r>0.99</r>
<g>0.9</g>
<b>0.7</b>
<a>1.0</a>
</specular>
<debug-color>
<r>0.5</r>
<g>0</g>
<b>1</b>
<a>1.0</a>
</debug-color>
<attenuation>
<c>1.0</c>
<l>0.09</l>
<q>0.0032</q>
</attenuation>
<spot-exponent>1</spot-exponent>
<spot-cutoff>20.5</spot-cutoff>
<range-m>50</range-m>
</light>
</PropertyList>

View file

@ -57,6 +57,115 @@
<y>0</y>
<z>1</z>
</axis>
</animation>
</animation>
<model>
<name>Port nav</name>
<path>ufo-pointlight.xml</path>
<overlay>
<params>
<name>Ufo port nav light</name>
<power-source>/controls/lighting/nav-lights</power-source>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>0</z-m>
<heading-deg>0</heading-deg>
<r>0.95</r>
<g>0.5</g>
<b>0.5</b>
<a>1.0</a>
</params>
</overlay>
<offsets>
<x-m>0.0</x-m>
<y-m>-3.3</y-m>
<z-m>-0.45</z-m>
</offsets>
</model>
<model>
<name>Starboard nav</name>
<path>ufo-pointlight.xml</path>
<overlay>
<params>
<name>Ufo starboard nav light</name>
<power-source>/controls/lighting/nav-lights</power-source>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>0</z-m>
<r>0.5</r>
<g>0.95</g>
<b>0.5</b>
<a>1.0</a>
<heading-deg>0</heading-deg>
</params>
</overlay>
<offsets>
<x-m>0</x-m>
<y-m>3.3</y-m>
<z-m>-0.45</z-m>
</offsets>
</model>
<model>
<name>Port light</name>
<path>ufo-spotlight.xml</path>
<overlay>
<params>
<name>Ufo port light</name>
<power-source>/controls/lighting/landing-lights</power-source>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>0</z-m>
<heading-deg>22</heading-deg>
<r>0.95</r>
<g>0.5</g>
<b>0.5</b>
<a>1.0</a>
</params>
</overlay>
<offsets>
<x-m>-0.50</x-m>
<y-m>-2.5</y-m>
<z-m>-0.45</z-m>
</offsets>
</model>
<model>
<name>Starboard light</name>
<path>ufo-spotlight.xml</path>
<overlay>
<params>
<name>Ufo starboard light</name>
<power-source>/controls/lighting/landing-lights</power-source>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>0</z-m>
<r>0.5</r>
<g>0.95</g>
<b>0.5</b>
<a>1.0</a>
<heading-deg>-22</heading-deg>
</params>
</overlay>
<offsets>
<x-m>-0.50</x-m>
<y-m>2.5</y-m>
<z-m>-0.45</z-m>
</offsets>
</model>
<model>
<name>Nose light</name>
<path>ufo-spotlight.xml</path>
<overlay>
<params>
<name>Ufo nose light</name>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>0</z-m>
<heading-deg>0</heading-deg>
</params>
</overlay>
<offsets>
<x-m>-2.8</x-m>
<y-m>0</y-m>
<z-m>-0.45</z-m>
</offsets>
</model>
</PropertyList>

View file

@ -249,7 +249,13 @@
<line>makes slider effects coarser/finer.</line>
</help>
</sim>
<controls>
<lighting>
<landing-lights>0</landing-lights>
<taxi-light>0</taxi-light>
<nav-lights>0</nav-lights>
</lighting>
</controls>
<input>
<keyboard>
<key n="8">