1
0
Fork 0

Imrpoved animation, move the effect code the the xml file and share xml animation code between the lit and unlit model

This commit is contained in:
Erik Hofman 2016-06-20 13:06:11 +02:00
parent 4c46266652
commit 7f1174ffe4
6 changed files with 1207 additions and 1287 deletions

View file

@ -1,13 +1,36 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<path>windsock.ac</path>
<effect>
<inherits-from>Effects/model-combined-deferred</inherits-from>
<parameters>
<lightmap-enabled type="int">1</lightmap-enabled>
<lightmap-factor><use>/sim/environment/windsock-light</use></lightmap-factor>
<texture n="3">
<image>Models/Airport/windsock-lightmap.png</image>
</texture>
</parameters>
<object-name>windsock</object-name>
<object-name>pivot_pole</object-name>
<object-name>frame</object-name>
</effect>
<!--
<effect>
<inherits-from>Effects/model-wingflex-organic</inherits-from>
<parameters>
<wingflex-alpha><use>/sim/environment/windsock-pos</use></wingflex-alpha>
</parameters>
<object-name>windsock</object-name>
</effect>
-->
<animation>
<type>rotate</type>
<object-name>windsock</object-name>
<object-name>pivot_pole</object-name>
<object-name>frame</object-name>
<property>/environment/wind-from-heading-deg</property>
<offset-deg>-90</offset-deg>
@ -24,19 +47,49 @@
</center>
</animation>
<effect>
<inherits-from>Models/Airport/windsock</inherits-from>
<object-name>pivot_pole</object-name>
<object-name>frame</object-name>
<object-name>2.5kt</object-name>
<animation>
<type>scale</type>
<object-name>5kt</object-name>
<object-name>7.5kt</object-name>
<object-name>10kt</object-name>
<object-name>12.5kt</object-name>
<object-name>15kt</object-name>
</effect>
<property>/environment/wind-speed-kt</property>
<x-factor>0.0</x-factor>
<y-factor>0.6</y-factor>
<z-factor>0.0</z-factor>
<x-min>1.0</x-min>
<y-min>0.6</y-min>
<z-min>1.0</z-min>
<x-max>1.0</x-max>
<y-max>1.0</y-max>
<z-max>1.0</z-max>
</animation>
<animation>
<type>translate</type>
<object-name>5kt</object-name>
<object-name>7.5kt</object-name>
<object-name>10kt</object-name>
<object-name>12.5kt</object-name>
<object-name>15kt</object-name>
<expression>
<table>
<property>/environment/wind-speed-kt</property>
<entry><ind>1.0</ind><dep>0.762</dep></entry>
<entry><ind>1.25</ind><dep>0.39</dep></entry>
<entry><ind>1.4</ind><dep>0.2</dep></entry>
<entry><ind>1.65</ind><dep>0.0</dep></entry>
<entry><ind>15</ind><dep>0.0</dep></entry>
</table>
</expression>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
</animation>
<!-- TODO: Make the organix wing-flex shader work for the windsock -->
<animation>
<type>rotate</type>
<object-name>5kt</object-name>

View file

@ -1,137 +1,10 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<path>windsock.ac</path>
<animation>
<type>rotate</type>
<object-name>windsock</object-name>
<object-name>frame</object-name>
<property>/environment/wind-from-heading-deg</property>
<offset-deg>-90</offset-deg>
<factor>-1</factor>
<axis>
<x>0.0</x>
<y>0.0</y>
<z>1.0</z>
</axis>
<center>
<x-m>0.0</x-m>
<y-m>0.0</y-m>
<z-m>0.0</z-m>
</center>
</animation>
<animation>
<type>rotate</type>
<object-name>5kt</object-name>
<object-name>7.5kt</object-name>
<object-name>10kt</object-name>
<object-name>12.5kt</object-name>
<object-name>15kt</object-name>
<property>/environment/wind-speed-kt</property>
<factor>-6</factor>
<offset-deg>30.0</offset-deg>
<min-deg>0</min-deg>
<max-deg>32</max-deg>
<axis>
<x>-1.0</x>
<y>0.0</y>
<z>0.0</z>
</axis>
<center>
<x-m>0.0</x-m>
<y-m>1.17</y-m>
<z-m>6.07</z-m>
</center>
</animation>
<animation>
<type>rotate</type>
<object-name>7.5kt</object-name>
<object-name>10kt</object-name>
<object-name>12.5kt</object-name>
<object-name>15kt</object-name>
<property>/environment/wind-speed-kt</property>
<factor>-6</factor>
<offset-deg>45.0</offset-deg>
<min-deg>0</min-deg>
<max-deg>28</max-deg>
<axis>
<x>-1.0</x>
<y>0.0</y>
<z>0.0</z>
</axis>
<center>
<x-m>0.0</x-m>
<y-m>1.70</y-m>
<z-m>6.02</z-m>
</center>
</animation>
<animation>
<type>rotate</type>
<object-name>10kt</object-name>
<object-name>12.5kt</object-name>
<object-name>15kt</object-name>
<property>/environment/wind-speed-kt</property>
<factor>-6</factor>
<offset-deg>60.0</offset-deg>
<min-deg>0</min-deg>
<max-deg>25</max-deg>
<axis>
<x>-1.0</x>
<y>0.0</y>
<z>0.0</z>
</axis>
<center>
<x-m>0.0</x-m>
<y-m>2.22</y-m>
<z-m>5.97</z-m>
</center>
</animation>
<animation>
<type>rotate</type>
<object-name>12.5kt</object-name>
<object-name>15kt</object-name>
<property>/environment/wind-speed-kt</property>
<factor>-6</factor>
<offset-deg>75.0</offset-deg>
<min-deg>0</min-deg>
<max-deg>10</max-deg>
<axis>
<x>-1.0</x>
<y>0.0</y>
<z>0.0</z>
</axis>
<center>
<x-m>0.0</x-m>
<y-m>2.75</y-m>
<z-m>5.92</z-m>
</center>
</animation>
<animation>
<type>rotate</type>
<object-name>15kt</object-name>
<property>/environment/wind-speed-kt</property>
<factor>-6</factor>
<offset-deg>90.0</offset-deg>
<min-deg>0</min-deg>
<max-deg>5</max-deg>
<axis>
<x>-1.0</x>
<y>0.0</y>
<z>0.0</z>
</axis>
<center>
<x-m>0.0</x-m>
<y-m>3.28</y-m>
<z-m>5.87</z-m>
</center>
</animation>
<model>
<path>windsock.xml</path>
</model>
<animation>
<type>material</type>

File diff suppressed because it is too large Load diff

View file

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>windsock</name>
<inherits-from>Effects/model-wingflex-organic</inherits-from>
<parameters>
<!--
<wingflex-alpha><use>/environment/windsock-pos</use></wingflex-alpha>
<wingflex-trailing-alpha><use>/environment/windsock-pos</use></wingflex-trailing-alpha>
<wingsweep-factor><use>/environment/windsock-pos</use></wingsweep-factor>
-->
<lightmap-enabled type="int">1</lightmap-enabled>
<texture n="3">
<image>Models/Airport/windsock-lightmap.png</image>
</texture>
</parameters>
<technique n="5">
<pass>
<lighting>true</lighting>
<material>
<active><use>material/active</use></active>
<ambient><use>material/ambient</use></ambient>
<diffuse><use>material/diffuse</use></diffuse>
<specular><use>material/specular</use></specular>
<emissive><use>material/emissive</use></emissive>
<shininess><use>material/shininess</use></shininess>
<color-mode><use>material/color-mode</use></color-mode>
</material>
<blend>
<active><use>blend/active</use></active>
<source><use>blend/source</use></source>
<destination><use>blend/destination</use></destination>
</blend>
<shade-model><use>shade-model</use></shade-model>
<cull-face><use>cull-face</use></cull-face>
<texture-unit>
<unit>0</unit>
<type>2d</type>
<image>
<use>texture[0]/image</use>
</image>
<wrap-s>clamp</wrap-s>
<wrap-t>clamp</wrap-t>
</texture-unit>
<alpha-to-coverage>true</alpha-to-coverage>
</pass>
</technique>
</PropertyList>

View file

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
@ -23,6 +23,49 @@
</center>
</animation>
<animation>
<type>scale</type>
<object-name>5kt</object-name>
<object-name>7.5kt</object-name>
<object-name>10kt</object-name>
<object-name>12.5kt</object-name>
<object-name>15kt</object-name>
<property>/environment/wind-speed-kt</property>
<x-factor>0.0</x-factor>
<y-factor>0.6</y-factor>
<z-factor>0.0</z-factor>
<x-min>1.0</x-min>
<y-min>0.6</y-min>
<z-min>1.0</z-min>
<x-max>1.0</x-max>
<y-max>1.0</y-max>
<z-max>1.0</z-max>
</animation>
<animation>
<type>translate</type>
<object-name>5kt</object-name>
<object-name>7.5kt</object-name>
<object-name>10kt</object-name>
<object-name>12.5kt</object-name>
<object-name>15kt</object-name>
<expression>
<table>
<property>/environment/wind-speed-kt</property>
<entry><ind>1.0</ind><dep>0.762</dep></entry>
<entry><ind>1.25</ind><dep>0.39</dep></entry>
<entry><ind>1.4</ind><dep>0.2</dep></entry>
<entry><ind>1.65</ind><dep>0.0</dep></entry>
<entry><ind>15</ind><dep>0.0</dep></entry>
</table>
</expression>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>5kt</object-name>

View file

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>