Josh Babcock wrote :
> Can anyone explain to me how the flash animation works? It seems to be
> undocumented and I think it is what I need. I am trying to animate some
> landing light halos, and I want to make them get dim as the view gets
> off-axis.
>   

The flash animation can be found in the beacon model.

 <animation>
  <type>flash</type>
  <object-name>GreenFlash.1</object-name>
  <center>
   <x-m>0</x-m>
   <y-m>-0.35</y-m>
   <z-m>16.8</z-m>
  </center>
  <axis>
   <x>0</x>
   <y>-1</y>
   <z>0.1</z>
  </axis>
  <power>100</power>
<!-- not specified - default values
  <factor>1</factor>
  <offset>0</offset>
  <two-sides type="bool">false</two-sides>
  <min>0</min>
  <max>1</max>
-->
 </animation>



It computes a scale factor applied to the object from the cosine of the
angle between the axis provided in the animation and the view vector. :

scale = factor * pow( cosine, power ) + offset

scale is then clamped between min and max.

and this scale factor is applied to the object, from the center
specified. It works best if scale is less than 1. Otherwise, there will
be clipping issues.

if two-sides is false, nothing is drawn if the cosine is negative.

Of course, this animation can be combined with another. In the case of
the beacon, there is a rotation just before that create the current effect.



-Fred




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to