فهرست منبع

Lightpack upgrade

Lightpack upgrade
Avionyx 1 سال پیش
والد
کامیت
37ba096ae1

+ 82 - 2
Models/Lights/Beacon.xml

@@ -4,18 +4,98 @@
 
   <model>
     <name>BeaconFlare</name>
-    <path>Aircraft/Mako/Models/Lights/Flares/Beacon-flare.xml</path>
+    <path>Flares/Beacon-flare.xml</path>
   </model>
 
   <model>
     <name>BeaconRemb</name>
-    <path>Aircraft/Mako/Models/Lights/Rembrandt/Beacon-remb.xml</path>
+    <path>Rembrandt/Beacon-remb.xml</path>
   </model>
   
+  
+    <!-- COMPOSITOR REPLACEMENT CODE -->
+  <light>
+  <name>BeaconComp</name>
+  <type>point</type>
+ <position>
+      <x>0.0</x>
+      <y>0.0</y>
+      <z>0.0</z>
+    </position>
+    <direction>
+      <x>0.0</x>
+      <y>0.0</y>
+      <z>1.0</z>
+    </direction>
+    <ambient>
+      <r>0.03</r>
+      <g>0.01</g>
+      <b>0.01</b>
+      <a>1.0</a>
+    </ambient>
+    <diffuse>
+      <r>0.80</r>
+      <g>0.10</g>
+      <b>0.10</b>
+      <a>1.0</a>
+    </diffuse>
+    <specular>
+      <r>1.00</r>
+      <g>0.20</g>
+      <b>0.20</b>
+      <a>1.0</a>
+    </specular>
+    <dim-factor>
+      <expression>
+        <product>
+          <value>-1</value>
+          <sum>
+            <product>
+              <max>
+                <pow>
+                  <cos><property>/sim/time/sun-angle-rad</property></cos>
+                  <value>0.3</value>
+                </pow>
+                <value>0</value>
+              </max>
+              <value>0.6</value>
+            </product>
+            <value>-1</value>
+          </sum>
+        </product>
+      </expression>
+    </dim-factor>
+    <attenuation>
+      <c>1.0</c>
+      <l>0.05</l>
+      <q>0.1</q>
+    </attenuation>
+  <spot-exponent>5</spot-exponent>
+  <spot-cutoff>90</spot-cutoff>
+  <range-m>350</range-m>
+  
+</light>
+
+<animation>
+  <type>select</type>
+  <object-name>BeaconComp</object-name>
+		
+  <condition>
+  
+   <equals>
+    <property>sim/current-view/internal</property>
+    <value>false</value>
+   </equals>
+  
+  </condition>
+ </animation>
+
+
   <animation>
     <type>select</type>
     <object-name>BeaconFlare</object-name>
     <object-name>BeaconRemb</object-name>
+	<object-name>BeaconComp</object-name>
     <condition>
       <and>
         <property>lightpack/beacon-state/state</property>

+ 65 - 3
Models/Lights/GreenLight.xml

@@ -4,12 +4,12 @@
 
   <model>
     <name>GreenLightFlare</name>
-    <path>Aircraft/Mako/Models/Lights/Flares/GreenLight-flare.xml</path>
+    <path>Flares/GreenLight-flare.xml</path>
   </model>
 
-  <model>
+<model>
     <name>GreenLightRemb</name>
-    <path>Aircraft/Mako/Models/Lights/Rembrandt/GreenLight-remb.xml</path>
+    <path>Rembrandt/GreenLight-remb.xml</path>
   </model>
 
   <animation>
@@ -23,5 +23,67 @@
       </and>
     </condition>
   </animation>
+  
+  <!-- Coompositor lights -->
+  
+  <light>
+  <name>green1</name>
+  <type>spot</type>
+  <direction>
+      <x>0.0</x>
+      <y>0.0</y>
+      <z>1.0</z>
+    </direction>
+    <ambient>
+      <r>0.03</r>
+      <g>1</g>
+      <b>0.03</b>
+      <a>1.0</a>
+    </ambient>
+    <diffuse>
+      <r>0.20</r>
+      <g>0.80</g>
+      <b>0.20</b>
+      <a>1.0</a>
+    </diffuse>
+    <specular>
+      <r>0.30</r>
+      <g>1.00</g>
+      <b>0.30</b>
+      <a>1.0</a>
+    </specular>
+    <dim-factor>
+      <expression>
+        <product>
+          <property>lightpack/nav-lights-intensity</property>
+          <value>-0.35</value>
+          <sum>
+            <product>
+              <max>
+                <pow>
+                  <cos><property>/sim/time/sun-angle-rad</property></cos>
+                  <value>0.3</value>
+                </pow>
+                <value>0</value>
+              </max>
+              <value>1.2</value>
+            </product>
+            <value>-1</value>
+          </sum>
+        </product>
+      </expression>
+    </dim-factor>
+   <attenuation>
+      <c>1.0</c>
+      <l>0.05</l>
+      <q>0.01</q>
+    </attenuation>
+  <spot-exponent>5</spot-exponent>
+  <spot-cutoff>60</spot-cutoff>
+  <range-m>50</range-m>
+ 
+ 
+</light>
+  
 
 </PropertyList>

+ 86 - 6
Models/Lights/LandingLight.xml

@@ -4,24 +4,104 @@
 
   <model>
     <name>LandingLightFlash</name>
-    <path>Aircraft/Mako/Models/Lights/Flares/LandingLight-flash.xml</path>
+    <path>Flares/LandingLight-flash.xml</path>
   </model>
 
   <model>
     <name>LandingLightRemb</name>
-    <path>Aircraft/Mako/Models/Lights/Rembrandt/LandingLight-remb.xml</path>
+    <path>Rembrandt/LandingLight-remb.xml</path>
   </model>
   
-  <model>
+  <!--><model>
     <name>LandingLightCone</name>
-    <path>Aircraft/Mako/Models/Lights/LightCone/LandingLight-cone.xml</path>
-  </model> <!-- uncomment for fake non-rembrandt cones -->
+    <path>LightCone/LandingLight-cone.xml</path>
+  </model><--> <!-- uncomment for fake non-rembrandt cones -->
+  
+  <!-- COMPOSITOR REPLACEMENT CODE -->
+  <light>
+  <name>LandingLightComp</name>
+  <type>spot</type>
+ <position>
+      <x>0.0</x>
+      <y>0.0</y>
+      <z>0.0</z>
+    </position>
+    <direction>
+      <x>-1.0</x>
+      <y>0.0</y>
+      <z>0.0</z>
+    </direction>
+    <ambient>
+      <r>0.03</r>
+      <g>0.03</g>
+      <b>0.03</b>
+      <a>1.0</a>
+    </ambient>
+    <diffuse>
+      <r>0.80</r>
+      <g>0.80</g>
+      <b>0.70</b>
+      <a>1.0</a>
+    </diffuse>
+    <specular>
+      <r>1.00</r>
+      <g>0.75</g>
+      <b>0.75</b>
+      <a>1.0</a>
+    </specular>
+    <dim-factor>
+      <expression>
+        <product>
+          <value>-1</value>
+          <sum>
+            <product>
+              <max>
+                <pow>
+                  <cos><property>/sim/time/sun-angle-rad</property></cos>
+                  <value>0.3</value>
+                </pow>
+                <value>0</value>
+              </max>
+              <value>1.0</value>
+            </product>
+            <value>-1</value>
+          </sum>
+          <property>lightpack/landing-lights-intensity</property>
+        </product>
+      </expression>
+    </dim-factor>
+    <attenuation>
+      <c>0.08</c>
+      <l>0.002</l>
+      <q>0.0001</q>
+    </attenuation>
+  <spot-exponent>5</spot-exponent>
+  <spot-cutoff>30</spot-cutoff>
+  <range-m>350</range-m>
+  
+</light>
+
+<!--<animation>
+    <type>select</type>
+    <object-name>LandingLightComp</object-name>      
+    <condition>
+     
+        <equals>
+          <property>gear/gear/position-norm</property>
+          <value>1</value>
+        </equals>
+       
+    </condition>
+  </animation>	
+-->
+ <!--   -->
 
   <animation>
     <type>select</type>
     <object-name>LandingLightFlash</object-name>
     <object-name>LandingLightRemb</object-name>
-    <object-name>LandingLightCone</object-name> <!-- uncomment for fake non-rembrandt cones -->
+	<object-name>LandingLightComp</object-name>
+<!--   <object-name>LandingLightCone</object-name>  uncomment for fake non-rembrandt cones -->
     <condition>
       <and>
         <property>lightpack/landing-lights-intensity</property>

+ 72 - 2
Models/Lights/ProbeLight.xml

@@ -4,18 +4,88 @@
 
   <model>
     <name>ProbeLightFlash</name>
-    <path>Aircraft/Mako/Models/Lights/Flares/ProbeLight-flash.xml</path>
+    <path>Flares/ProbeLight-flash.xml</path>
   </model>
 
   <model>
     <name>ProbeLightRemb</name>
-    <path>Aircraft/Mako/Models/Lights/Rembrandt/ProbeLight-remb.xml</path>
+    <path>Rembrandt/ProbeLight-remb.xml</path>
   </model>
   
+   <!-- COMPOSITOR REPLACEMENT CODE -->
+  <light>
+  <name>ProbeLightComp</name>
+  <type>spot</type>
+ <position>
+      <x>0.0</x>
+      <y>0.0</y>
+      <z>0.0</z>
+    </position>
+    <direction>
+      <x>-1.0</x>
+      <y>0.0</y>
+      <z>0.0</z>
+    </direction>
+    <ambient>
+      <r>0.03</r>
+      <g>0.03</g>
+      <b>0.03</b>
+      <a>1.0</a>
+    </ambient>
+    <diffuse>
+      <r>0.80</r>
+      <g>0.80</g>
+      <b>0.70</b>
+      <a>1.0</a>
+    </diffuse>
+    <specular>
+      <r>1.00</r>
+      <g>0.75</g>
+      <b>0.75</b>
+      <a>1.0</a>
+    </specular>
+    <dim-factor>
+      <expression>
+        <product>
+          <value>-1</value>
+          <sum>
+            <product>
+              <max>
+                <pow>
+                  <cos><property>/sim/time/sun-angle-rad</property></cos>
+                  <value>0.3</value>
+                </pow>
+                <value>0</value>
+              </max>
+              <value>1.0</value>
+            </product>
+            <value>-1</value>
+          </sum>
+          <property>lightpack/probe-light-intensity</property>
+        </product>
+      </expression>
+    </dim-factor>
+    <attenuation>
+      <c>0.1</c>
+      <l>0.002</l>
+      <q>0.008</q>
+    </attenuation>
+  <spot-exponent>5</spot-exponent>
+  <spot-cutoff>70</spot-cutoff>
+  <range-m>130</range-m>
+  
+</light>
+  
+  
+  
+  
+  
+  
   <animation>
     <type>select</type>
     <object-name>ProbeLightFlash</object-name>
     <object-name>ProbeLightRemb</object-name>
+	<object-name>ProbeLightComp</object-name>
     <condition>
       <and>
         <property>lightpack/probe-light-intensity</property>

+ 70 - 3
Models/Lights/RedLight.xml

@@ -4,12 +4,12 @@
 
   <model>
     <name>RedLightFlare</name>
-    <path>Aircraft/Mako/Models/Lights/Flares/RedLight-flare.xml</path>
+    <path>Flares/RedLight-flare.xml</path>
   </model>
 
-  <model>
+<model>
     <name>RedLightRemb</name>
-    <path>Aircraft/Mako/Models/Lights/Rembrandt/RedLight-remb.xml</path>
+    <path>Rembrandt/RedLight-remb.xml</path>
   </model>
 
   <animation>
@@ -23,5 +23,72 @@
       </and>
     </condition>
   </animation>
+  
+  
+   <!-- Coompositor lights -->
+  
+  <light>
+  <name>red1</name>
+  <type>spot</type>
+  <position>
+    <x-m>0.0</x-m>
+    <y-m>0.0</y-m>
+    <z-m>0</z-m>
+  </position>
+  <direction>
+      <x>0.0</x>
+      <y>0.0</y>
+      <z>1.0</z>
+    </direction>
+   <ambient>
+    <r>1</r>
+    <g>0.03</g>
+    <b>0.03</b>
+    <a>1</a>
+  </ambient>
+  <diffuse>
+    <r>0.95</r>
+    <g>0.9</g>
+    <b>0.9</b>
+    <a>1</a>
+  </diffuse>
+  <specular>
+    <r>0.95</r>
+    <g>0.9</g>
+    <b>0.9</b>
+    <a>1</a>
+  </specular>
+    <dim-factor>
+      <expression>
+        <product>
+          <property>lightpack/nav-lights-intensity</property>
+          <value>-0.35</value>
+          <sum>
+            <product>
+              <max>
+                <pow>
+                  <cos><property>/sim/time/sun-angle-rad</property></cos>
+                  <value>0.3</value>
+                </pow>
+                <value>0</value>
+              </max>
+              <value>1.2</value>
+            </product>
+            <value>-1</value>
+          </sum>
+        </product>
+      </expression>
+    </dim-factor>
+    <attenuation>
+      <c>1.0</c>
+      <l>0.05</l>
+      <q>0.01</q>
+    </attenuation>
+  <spot-exponent>5</spot-exponent>
+  <spot-cutoff>60</spot-cutoff>
+  <range-m>50</range-m>
+ 
+ 
+</light>
 
 </PropertyList>

+ 70 - 2
Models/Lights/Strobe.xml

@@ -4,18 +4,86 @@
 
   <model>
     <name>BeaconFlare</name>
-    <path>Aircraft/Mako/Models/Lights/Flares/Strobe-flare.xml</path>
+    <path>Flares/Strobe-flare.xml</path>
   </model>
 
   <model>
     <name>BeaconRemb</name>
-    <path>Aircraft/Mako/Models/Lights/Rembrandt/Strobe-remb.xml</path>
+    <path>Rembrandt/Strobe-remb.xml</path>
   </model>
   
+  
+  <!-- COMPOSITOR REPLACEMENT CODE -->
+  <light>
+  <name>StrobeComp</name>
+  <type>spot</type>
+  <position>
+      <x>0.0</x>
+      <y>0.0</y>
+      <z>0.0</z>
+    </position>
+    <direction>
+      <x>0.0</x>
+      <y>0.0</y>
+      <z>1.0</z>
+    </direction>
+    <ambient>
+      <r>0.08</r>
+      <g>0.08</g>
+      <b>0.08</b>
+      <a>1.0</a>
+    </ambient>
+    <diffuse>
+      <r>0.80</r>
+      <g>0.80</g>
+      <b>0.80</b>
+      <a>1.0</a>
+    </diffuse>
+    <specular>
+      <r>1.00</r>
+      <g>1.00</g>
+      <b>1.10</b>
+      <a>1.0</a>
+    </specular>
+    <dim-factor>
+      <expression>
+        <product>
+          <value>-1</value>
+          <sum>
+            <product>
+              <max>
+                <pow>
+                  <cos><property>/sim/time/sun-angle-rad</property></cos>
+                  <value>0.3</value>
+                </pow>
+                <value>0</value>
+              </max>
+              <value>0.6</value>
+            </product>
+            <value>-1</value>
+          </sum>
+        </product>
+      </expression>
+    </dim-factor>
+    <attenuation>
+      <c>1.0</c>
+      <l>0.05</l>
+      <q>0.1</q>
+    </attenuation>
+  <spot-exponent>5</spot-exponent>
+  <spot-cutoff>60</spot-cutoff>
+  <range-m>350</range-m>
+  
+</light>
+  
+  
+  
+  
   <animation>
     <type>select</type>
     <object-name>BeaconFlare</object-name>
     <object-name>BeaconRemb</object-name>
+	 <object-name>StrobeComp</object-name>
     <condition>
       <and>
         <property>lightpack/strobe-state/state</property>

+ 75 - 6
Models/Lights/TaxiLight.xml

@@ -4,24 +4,93 @@
 
   <model>
     <name>TaxiLightFlash</name>
-    <path>Aircraft/Mako/Models/Lights/Flares/TaxiLight-flash.xml</path>
+    <path>Flares/TaxiLight-flash.xml</path>
   </model>
 
   <model>
     <name>TaxiLightRemb</name>
-    <path>Aircraft/Mako/Models/Lights/Rembrandt/TaxiLight-remb.xml</path>
+    <path>Rembrandt/TaxiLight-remb.xml</path>
   </model>
 
-  <model>
+  <!--><model>
     <name>TaxiLightCone</name>
-    <path>Aircraft/Mako/Models/Lights/LightCone/TaxiLight-cone.xml</path>
-  </model><!-- uncomment for fake non-rembrandt cones -->
+    <path>LightCone/TaxiLight-cone.xml</path>
+  </model><--> <!-- uncomment for fake non-rembrandt cones -->
+  
+  
+   <!-- COMPOSITOR REPLACEMENT CODE -->
+  <light>
+  <name>TaxiLightComp</name>
+  <type>spot</type>
+    <position>
+      <x>0.0</x>
+      <y>0.0</y>
+      <z>0.0</z>
+    </position>
+    <direction>
+      <x>-1.0</x>
+      <y>0.0</y>
+      <z>0.0</z>
+    </direction>
+    <ambient>
+      <r>0.03</r>
+      <g>0.03</g>
+      <b>0.03</b>
+      <a>1.0</a>
+    </ambient>
+    <diffuse>
+      <r>0.80</r>
+      <g>0.80</g>
+      <b>0.70</b>
+      <a>1.0</a>
+    </diffuse>
+    <specular>
+      <r>1.00</r>
+      <g>0.75</g>
+      <b>0.75</b>
+      <a>1.0</a>
+    </specular>
+    <dim-factor>
+      <expression>
+        <product>
+          <value>-1</value>
+          <sum>
+            <product>
+              <max>
+                <pow>
+                  <cos><property>/sim/time/sun-angle-rad</property></cos>
+                  <value>0.3</value>
+                </pow>
+                <value>0</value>
+              </max>
+              <value>1.0</value>
+            </product>
+            <value>-1</value>
+          </sum>
+          <property>lightpack/taxi-light-intensity</property>
+        </product>
+      </expression>
+    </dim-factor>
+    <attenuation>
+      <c>0.005</c>
+      <l>0.002</l>
+      <q>0.002</q>
+    </attenuation>
+  <spot-exponent>5</spot-exponent>
+  <spot-cutoff>45</spot-cutoff>
+  <range-m>250</range-m>
+  
+</light>
+  
+  
+  
   
   <animation>
     <type>select</type>
     <object-name>TaxiLightFlash</object-name>
     <object-name>TaxiLightRemb</object-name>
-    <object-name>TaxiLightCone</object-name> <!-- uncomment for fake non-rembrandt cones -->
+	<object-name>TaxiLightComp</object-name>
+    <!--><object-name>TaxiLightCone</object-name><--> <!-- uncomment for fake non-rembrandt cones -->
     <condition>
       <and>
         <property>lightpack/taxi-light-intensity</property>

+ 69 - 2
Models/Lights/WhiteLight.xml

@@ -4,18 +4,85 @@
 
   <model>
     <name>WhiteLightFlare</name>
-    <path>Aircraft/Mako/Models/Lights/Flares/WhiteLight-flare.xml</path>
+    <path>Flares/WhiteLight-flare.xml</path>
   </model>
 
   <model>
     <name>WhiteLightRemb</name>
-    <path>Aircraft/Mako/Models/Lights/Rembrandt/WhiteLight-remb.xml</path>
+    <path>Rembrandt/WhiteLight-remb.xml</path>
   </model>
   
+  <!-- COMPOSITOR REPLACEMENT CODE -->
+  <light>
+  <name>WhiteLightComp</name>
+  <type>spot</type>
+  <position>
+      <x>0.0</x>
+      <y>0.0</y>
+      <z>0.0</z>
+    </position>
+    <direction>
+      <x>0.0</x>
+      <y>0.0</y>
+      <z>1.0</z>
+    </direction>
+    <ambient>
+      <r>0.08</r>
+      <g>0.08</g>
+      <b>0.08</b>
+      <a>1.0</a>
+    </ambient>
+    <diffuse>
+      <r>0.80</r>
+      <g>0.80</g>
+      <b>0.80</b>
+      <a>1.0</a>
+    </diffuse>
+    <specular>
+      <r>1.00</r>
+      <g>1.00</g>
+      <b>1.10</b>
+      <a>1.0</a>
+    </specular>
+    <dim-factor>
+      <expression>
+        <product>
+          <value>-1</value>
+          <sum>
+            <product>
+              <max>
+                <pow>
+                  <cos><property>/sim/time/sun-angle-rad</property></cos>
+                  <value>0.3</value>
+                </pow>
+                <value>0</value>
+              </max>
+              <value>0.6</value>
+            </product>
+            <value>-1</value>
+          </sum>
+          <property>lightpack/white-light-intensity</property>
+        </product>
+      </expression>
+    </dim-factor>
+    <attenuation>
+      <c>1.0</c>
+      <l>0.05</l>
+      <q>0.1</q>
+    </attenuation>
+  <spot-exponent>5</spot-exponent>
+  <spot-cutoff>60</spot-cutoff>
+  <range-m>350</range-m>
+  
+</light>
+  
+  
+  
   <animation>
     <type>select</type>
     <object-name>WhiteLightFlare</object-name>
     <object-name>WhiteLightRemb</object-name>
+	<object-name>WhiteLightComp</object-name>
     <condition>
       <and>
         <property>lightpack/white-light-intensity</property>