Howto:Illuminate faces: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 5: Line 5:
Now comes a very important part: the objects. Here we need to place the objects that should react on the animation. If we have a building with a antenne on top of it and we only want the antenne to illuminate we need to make that a seperate object. So every part that you wants to be illuminated should be seperated. You could do that in Blender, SketchUp or any other software you're using. Last part is the emisson part. The emission will tell FlightGear in what color the object should be illuminated. Using the tree colours (red, green and blue) you could make any color you want. If we did everthing as described above with a red light we will get something like:
Now comes a very important part: the objects. Here we need to place the objects that should react on the animation. If we have a building with a antenne on top of it and we only want the antenne to illuminate we need to make that a seperate object. So every part that you wants to be illuminated should be seperated. You could do that in Blender, SketchUp or any other software you're using. Last part is the emisson part. The emission will tell FlightGear in what color the object should be illuminated. Using the tree colours (red, green and blue) you could make any color you want. If we did everthing as described above with a red light we will get something like:
  <animation>
  <animation>
<type>material</type>  
  <type>material</type>  
<object-name>Light1</object-name>
  <object-name>Light1</object-name>
<object-name>Light2</object-name>
  <object-name>Light2</object-name>
<emission>
  <emission>
<red>1</red>
  <red>1</red>
<green>0</green>
  <green>0</green>
<blue>0</blue>
  <blue>0</blue>
</emission>
  </emission>
  </animation>
  </animation>


Line 58: Line 58:
'''To turn lights on if the sky is dark:'''
'''To turn lights on if the sky is dark:'''
  <animation>
  <animation>
<type>material</type>  
  <type>material</type>  
<object-name>Light</object-name>
  <object-name>Light</object-name>
<condition>
  <condition>
<greater-than>
  <greater-than>
<property>/sim/time/sun-angle-rad</property>
    <property>/sim/time/sun-angle-rad</property>
<value>1.57</value>
    <value>1.57</value>
</greater-than>
  </greater-than>
</condition>
  </condition>
<emission>
  <emission>
<red>1</red>
  <red>1</red>
<green>0</green>
  <green>0</green>
<blue>0</blue>
  <blue>0</blue>
</emission>
  </emission>
  </animation>
  </animation>


'''And to turn the lights off during day:'''
'''And to turn the lights off during day:'''
  <animation>
  <animation>
<type>material</type>  
  <type>material</type>  
<object-name>Light</object-name>
  <object-name>Light</object-name>
<condition>
  <condition>
<less-than-equals>
  <less-than-equals>
<property>/sim/time/sun-angle-rad</property>
    <property>/sim/time/sun-angle-rad</property>
<value>1.57</value>
    <value>1.57</value>
</less-than-equals>
  </less-than-equals>
</condition>
  </condition>
<emission>
  <emission>
<red>0</red>
  <red>0</red>
<green>0</green>
  <green>0</green>
<blue>0</blue>
  <blue>0</blue>
</emission>
  </emission>
  </animation>
  </animation>


Line 94: Line 94:


  <animation>
  <animation>
<type>material</type>
  <type>material</type>
<object-name>Light</object-name>
  <object-name>Light</object-name>
<condition>
  <condition>
<equals>
  <equals>
<property>/sim/time/utc/second</property>
    <property>/sim/time/utc/second</property>
<value>0</value>
    <value>0</value>
</equals>
  </equals>
</condition>
  </condition>
<emission>
  <emission>
<red>1</red>
  <red>1</red>
<green>0</green>
  <green>0</green>
<blue>0</blue>
  <blue>0</blue>
</emission>
  </emission>
  </animation>
  </animation>


  <animation>
  <animation>
<type>material</type>
  <type>material</type>
<object-name>Light</object-name>
  <object-name>Light</object-name>
<condition>
  <condition>
<equals>
  <equals>
<property>/sim/time/utc/second</property>
    <property>/sim/time/utc/second</property>
<value>20</value>
    <value>20</value>
</equals>
  </equals>
</condition>
  </condition>
<emission>
  <emission>
<red>0</red>
  <red>0</red>
<green>1</green>
  <green>1</green>
<blue>0</blue>
  <blue>0</blue>
</emission>
  </emission>
  </animation>
  </animation>


  <animation>
  <animation>
<type>material</type>
  <type>material</type>
<object-name>Light</object-name>
  <object-name>Light</object-name>
<condition>
  <condition>
<equals>
  <equals>
<property>/sim/time/utc/second</property>
    <property>/sim/time/utc/second</property>
<value>40</value>
    <value>40</value>
</equals>
  </equals>
</condition>
  </condition>
<emission>
  <emission>
<red>0</red>
  <red>0</red>
<green>0</green>
  <green>0</green>
<blue>1</blue>
  <blue>1</blue>
</emission>
  </emission>
  </animation>
  </animation>


Line 147: Line 147:


  <animation>
  <animation>
<type>material</type>  
  <type>material</type>  
<object-name>Light</object-name>
  <object-name>Light</object-name>
<condition>
  <condition>
<greater-than>
  <greater-than>
<property>/sim/time/sun-angle-rad</property>
    <property>/sim/time/sun-angle-rad</property>
<value>1.57</value>
    <value>1.57</value>
</greater-than>
  </greater-than>
</condition>
  </condition>
<emission>
  <emission>
<red>1</red>
  <red>1</red>
<green>1</green>
  <green>1</green>
<blue>1</blue>
  <blue>1</blue>
</emission>
  </emission>
<texture>Light_lit.rgb</texture>
  <texture>Light_lit.png</texture>
  </animation>
  </animation>


  <animation>
  <animation>
<type>material</type>  
  <type>material</type>  
<object-name>Light</object-name>
  <object-name>Light</object-name>
<condition>
  <condition>
<less-than-equals>
  <less-than-equals>
<property>/sim/time/sun-angle-rad</property>
    <property>/sim/time/sun-angle-rad</property>
<value>1.57</value>
    <value>1.57</value>
</less-than-equals>
  </less-than-equals>
</condition>
  </condition>
<emission>
  <emission>
<red>1</red>
  <red>1</red>
<green>1</green>
  <green>1</green>
<blue>1</blue>
  <blue>1</blue>
</emission>
  </emission>
<texture>Light.rgb</texture>
  <texture>Light.png</texture>
  </animation>
  </animation>


Navigation menu