ALS technical notes: Difference between revisions

Jump to navigation Jump to search
Line 1,595: Line 1,595:
:''(To percieve the effect well, you probably have to darken your room and switch to fullscreen)''
:''(To percieve the effect well, you probably have to darken your room and switch to fullscreen)''
[[File:Cessna 182 with procedural lights.jpg|800px]]
[[File:Cessna 182 with procedural lights.jpg|800px]]
===Move dynamically the procedural light===
The position of a procedural light is declared in the '''<model>''' section, within the '''<PropertyList>''' XML code, for example:
<syntaxhighlight lang="xml">
  <model>
      <name>procedural-light-gear-white-left</name>
      <path>Effects/lights/procedural_light_gear_white.xml</path>
      <offsets>
          <x-m> -3.08</x-m>
          <y-m> -0.21 </y-m>
          <z-m> -1.18 </z-m>
      </offsets>
  </model>
</syntaxhighlight>
The '''<model>''' statement is itself an object, it can be inserted directly as an object of an animation, for excample, some line after is it possible to insert this code:
<syntaxhighlight lang="xml">
    <animation>
        <type>rotate</type>
        <object-name>GearFrontalDoor</object-name>
        <object-name>procedural-light-gear-white-left</object-name>
        <property>gear/gear/position-norm</property>
        <axis>
            <x1-m>  -3.00240</x1-m>
            <y1-m>  1.0</y1-m>
            <z1-m>  -1.02906</z1-m>
            <x2-m>  -3.00240</x2-m>
            <y2-m>  -1.0</y2-m>
            <z2-m>  -1.0290</z2-m>
        </axis>
        <interpolation>
            <entry><ind>0.0</ind><dep>90</dep></entry>
            <entry><ind>0.25</ind><dep>90</dep></entry>
            <entry><ind>0.50</ind><dep>60</dep></entry>
            <entry><ind>0.75</ind><dep>30</dep></entry>
            <entry><ind>1.0</ind><dep>0</dep></entry>
        </interpolation>
    </animation>
</syntaxhighlight>
The declaration therefore defines a ''procedural light'' object:
<syntaxhighlight lang="xml">
<object-name>procedural-light-gear-white-left</object-name>
</syntaxhighlight>


== ALS fuselage shadow effect ==
== ALS fuselage shadow effect ==
408

edits

Navigation menu