CVS: data/AI/Aircraft/balloon balloon2.xml, 1.1, 1.2 balloon3.xml, 1.1, 1.2 balloon4.xml, 1.1, 1.2 balloon5.xml, 1.1, 1.2 balloon.nas.xml, 1.1, 1.2 flightgear.xml, 1.1, 1.2 iva.xml, 1.1, 1.2 miss-velma.xml, 1.1, 1.2

Torsten Dreyer <[email protected]> Sun, 2 May 2010 16:47:43 -0500
Newsgroups gmane.games.flightgear.cvc
Message-ID <[email protected]>
Update of /var/cvs/FlightGear-0.9/data/AI/Aircraft/balloon
In directory baron.flightgear.org:/tmp/cvs-serv29272

Modified Files:
	balloon2.xml balloon3.xml balloon4.xml balloon5.xml 
	balloon.nas.xml flightgear.xml iva.xml miss-velma.xml 
Log Message:
- reduced vertex, poly and object count of the balloons
- added some simle flame on/off logic
- let the balloons glow in the dark if the flame is on

Index: balloon2.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/AI/Aircraft/balloon/balloon2.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- balloon2.xml	7 Apr 2010 14:15:24 -0000	1.1
+++ balloon2.xml	2 May 2010 21:47:40 -0000	1.2
@@ -6,4 +6,52 @@
   <path>Models/balloon2.ac</path>
   <texture-path></texture-path>
   <nasal include="balloon.nas.xml"/>
+
+  <animation>
+    <type>select</type>
+    <object-name>cone7_flame</object-name>
+    <condition>
+    <property>engines/engine[0]/running</property>
+    </condition>
+  </animation>
+
+  <animation>
+    <type>dist-scale</type>
+    <object-name>cone7_flame</object-name>
+    <center>
+      <z-m>8.3</z-m>
+    </center>
+    <interpolation>
+      <entry>
+        <ind>0</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>50</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>1500</ind>
+        <dep>10</dep>
+      </entry>
+    </interpolation>
+  </animation>
+
+  <animation>
+    <type>material</type>
+    <object-name>hull</object-name>
+    <condition>
+      <greater-than>
+        <property>/sim/time/sun-angle-rad</property>
+        <value>1.57</value>
+      </greater-than>
+    </condition>
+    <emission>
+      <red>0.2</red>
+      <green>0.18</green>
+      <blue>0.15</blue>
+      <factor-prop>engines/engine[0]/running</factor-prop>
+    </emission>
+  </animation>
+
 </PropertyList>

Index: balloon3.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/AI/Aircraft/balloon/balloon3.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- balloon3.xml	7 Apr 2010 14:15:24 -0000	1.1
+++ balloon3.xml	2 May 2010 21:47:40 -0000	1.2
@@ -6,4 +6,52 @@
   <path>Models/balloon3.ac</path>
   <texture-path></texture-path>
   <nasal include="balloon.nas.xml"/>
+
+  <animation>
+    <type>select</type>
+    <object-name>cone7_flame</object-name>
+    <condition>
+    <property>engines/engine[0]/running</property>
+    </condition>
+  </animation>
+
+  <animation>
+    <type>dist-scale</type>
+    <object-name>cone7_flame</object-name>
+    <center>
+      <z-m>8.3</z-m>
+    </center>
+    <interpolation>
+      <entry>
+        <ind>0</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>50</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>1500</ind>
+        <dep>10</dep>
+      </entry>
+    </interpolation>
+  </animation>
+
+  <animation>
+    <type>material</type>
+    <object-name>hull</object-name>
+    <condition>
+      <greater-than>
+        <property>/sim/time/sun-angle-rad</property>
+        <value>1.57</value>
+      </greater-than>
+    </condition>
+    <emission>
+      <red>0.2</red>
+      <green>0.18</green>
+      <blue>0.15</blue>
+      <factor-prop>engines/engine[0]/running</factor-prop>
+    </emission>
+  </animation>
+
 </PropertyList>

Index: balloon4.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/AI/Aircraft/balloon/balloon4.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- balloon4.xml	7 Apr 2010 14:15:24 -0000	1.1
+++ balloon4.xml	2 May 2010 21:47:40 -0000	1.2
@@ -6,4 +6,52 @@
   <path>Models/balloon4.ac</path>
   <texture-path></texture-path>
   <nasal include="balloon.nas.xml"/>
+
+  <animation>
+    <type>select</type>
+    <object-name>cone7_flame</object-name>
+    <condition>
+    <property>engines/engine[0]/running</property>
+    </condition>
+  </animation>
+
+  <animation>
+    <type>dist-scale</type>
+    <object-name>cone7_flame</object-name>
+    <center>
+      <z-m>8.3</z-m>
+    </center>
+    <interpolation>
+      <entry>
+        <ind>0</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>50</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>1500</ind>
+        <dep>10</dep>
+      </entry>
+    </interpolation>
+  </animation>
+
+  <animation>
+    <type>material</type>
+    <object-name>hull</object-name>
+    <condition>
+      <greater-than>
+        <property>/sim/time/sun-angle-rad</property>
+        <value>1.57</value>
+      </greater-than>
+    </condition>
+    <emission>
+      <red>0.2</red>
+      <green>0.18</green>
+      <blue>0.15</blue>
+      <factor-prop>engines/engine[0]/running</factor-prop>
+    </emission>
+  </animation>
+
 </PropertyList>

Index: balloon5.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/AI/Aircraft/balloon/balloon5.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- balloon5.xml	7 Apr 2010 14:15:24 -0000	1.1
+++ balloon5.xml	2 May 2010 21:47:40 -0000	1.2
@@ -6,4 +6,52 @@
   <path>Models/balloon5.ac</path>
   <texture-path></texture-path>
   <nasal include="balloon.nas.xml"/>
+
+  <animation>
+    <type>select</type>
+    <object-name>cone7_flame</object-name>
+    <condition>
+    <property>engines/engine[0]/running</property>
+    </condition>
+  </animation>
+
+  <animation>
+    <type>dist-scale</type>
+    <object-name>cone7_flame</object-name>
+    <center>
+      <z-m>8.3</z-m>
+    </center>
+    <interpolation>
+      <entry>
+        <ind>0</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>50</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>1500</ind>
+        <dep>10</dep>
+      </entry>
+    </interpolation>
+  </animation>
+
+  <animation>
+    <type>material</type>
+    <object-name>hull</object-name>
+    <condition>
+      <greater-than>
+        <property>/sim/time/sun-angle-rad</property>
+        <value>1.57</value>
+      </greater-than>
+    </condition>
+    <emission>
+      <red>0.2</red>
+      <green>0.18</green>
+      <blue>0.15</blue>
+      <factor-prop>engines/engine[0]/running</factor-prop>
+    </emission>
+  </animation>
+
 </PropertyList>

Index: balloon.nas.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/AI/Aircraft/balloon/balloon.nas.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- balloon.nas.xml	7 Apr 2010 14:15:24 -0000	1.1
+++ balloon.nas.xml	2 May 2010 21:47:40 -0000	1.2
@@ -16,6 +16,10 @@
   var winds = props.globals.getNode("environment/wind-speed-kt",1);   
   var speed = self.getNode("controls/flight/target-spd",1);
   var head = self.getNode("controls/flight/target-hdg",1);
+  var running = self.getNode("engines/engine[0]/running",1);
+  running.setBoolValue(0); # start with engine (flame) off
+  var flame_on_time = 10.0 + 10.0*rand();
+  var flame_off_time = 30.0 + 10.0*rand();
 
   var position = geo.aircraft_position();
   position.apply_course_distance( 
@@ -30,16 +34,25 @@
   self.getNode("position/altitude-ft", 1 ).setValue( position.alt() );
 
   var loopid = 0;
+
+  var flameLoop = func(id) {
+    id == loopid or return;
+    var b = running.getValue();
+    running.setBoolValue( b == 0 );
+    settimer( func { flameLoop(id) }, b ? flame_off_time : flame_on_time );
+  }
+
   var loop = func(id) {
     id == loopid or return;
     speed.setValue(winds.getValue());
     head.setValue(geo.normdeg(windh.getValue() + 180.0));
-    settimer(func { loop(id) }, 0);
+    settimer(func { loop(id) }, 10.0 );
   }
 
   settimer( func {
+    flameLoop(loopid);
     self.getNode("controls/flight/target-alt", 1 ).setValue( position.alt() + 1500 + 1000*rand());
-    settimer(func { loop(loopid) }, 0,5);
+    settimer(func { loop(loopid) }, 0.5);
   }, 5.0 + 20.0*rand() );
   ]]></load>
   <unload><![CDATA[

Index: flightgear.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/AI/Aircraft/balloon/flightgear.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- flightgear.xml	7 Apr 2010 14:15:24 -0000	1.1
+++ flightgear.xml	2 May 2010 21:47:40 -0000	1.2
@@ -5,4 +5,52 @@
   <path>Models/balloon1t.ac</path>
   <texture-path>Textures/flightgear</texture-path>
   <nasal include="balloon.nas.xml"/>
+
+  <animation>
+    <type>select</type>
+    <object-name>cone7_flame</object-name>
+    <condition>
+    <property>engines/engine[0]/running</property>
+    </condition>
+  </animation>
+
+  <animation>
+    <type>dist-scale</type>
+    <object-name>cone7_flame</object-name>
+    <center>
+      <z-m>8.3</z-m>
+    </center>
+    <interpolation>
+      <entry>
+        <ind>0</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>50</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>1500</ind>
+        <dep>10</dep>
+      </entry>
+    </interpolation>
+  </animation>
+
+  <animation>
+    <type>material</type>
+    <object-name>hull</object-name>
+    <condition>
+      <greater-than>
+        <property>/sim/time/sun-angle-rad</property>
+        <value>1.57</value>
+      </greater-than>
+    </condition>
+    <emission>
+      <red>0.2</red>
+      <green>0.18</green>
+      <blue>0.15</blue>
+      <factor-prop>engines/engine[0]/running</factor-prop>
+    </emission>
+  </animation>
+
 </PropertyList>

Index: iva.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/AI/Aircraft/balloon/iva.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- iva.xml	7 Apr 2010 14:15:24 -0000	1.1
+++ iva.xml	2 May 2010 21:47:40 -0000	1.2
@@ -6,4 +6,52 @@
   <path>Models/balloon6t.ac</path>
   <texture-path>Textures/iva</texture-path>
   <nasal include="balloon.nas.xml"/>
+
+  <animation>
+    <type>select</type>
+    <object-name>cone7_flame</object-name>
+    <condition>
+    <property>engines/engine[0]/running</property>
+    </condition>
+  </animation>
+
+  <animation>
+    <type>dist-scale</type>
+    <object-name>cone7_flame</object-name>
+    <center>
+      <z-m>8.3</z-m>
+    </center>
+    <interpolation>
+      <entry>
+        <ind>0</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>50</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>1500</ind>
+        <dep>10</dep>
+      </entry>
+    </interpolation>
+  </animation>
+
+  <animation>
+    <type>material</type>
+    <object-name>hull</object-name>
+    <condition>
+      <greater-than>
+        <property>/sim/time/sun-angle-rad</property>
+        <value>1.57</value>
+      </greater-than>
+    </condition>
+    <emission>
+      <red>0.2</red>
+      <green>0.18</green>
+      <blue>0.15</blue>
+      <factor-prop>engines/engine[0]/running</factor-prop>
+    </emission>
+  </animation>
+
 </PropertyList>

Index: miss-velma.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/AI/Aircraft/balloon/miss-velma.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- miss-velma.xml	7 Apr 2010 14:15:24 -0000	1.1
+++ miss-velma.xml	2 May 2010 21:47:40 -0000	1.2
@@ -6,4 +6,52 @@
   <path>Models/balloon1t.ac</path>
   <texture-path>Textures/miss-velma</texture-path>
   <nasal include="balloon.nas.xml"/>
+
+  <animation>
+    <type>select</type>
+    <object-name>cone7_flame</object-name>
+    <condition>
+    <property>engines/engine[0]/running</property>
+    </condition>
+  </animation>
+
+  <animation>
+    <type>dist-scale</type>
+    <object-name>cone7_flame</object-name>
+    <center>
+      <z-m>8.3</z-m>
+    </center>
+    <interpolation>
+      <entry>
+        <ind>0</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>50</ind>
+        <dep>1.0</dep>
+      </entry>
+      <entry>
+        <ind>1500</ind>
+        <dep>10</dep>
+      </entry>
+    </interpolation>
+  </animation>
+
+  <animation>
+    <type>material</type>
+    <object-name>hull</object-name>
+    <condition>
+      <greater-than>
+        <property>/sim/time/sun-angle-rad</property>
+        <value>1.57</value>
+      </greater-than>
+    </condition>
+    <emission>
+      <red>0.2</red>
+      <green>0.18</green>
+      <blue>0.15</blue>
+      <factor-prop>engines/engine[0]/running</factor-prop>
+    </emission>
+  </animation>
+
 </PropertyList>


------------------------------------------------------------------------------