97
edits
(Add note about added axis-object support for slider and locked-track animations on Git next.) |
(Some small corrections, added documentation about commit 51149bf: Support expressions in material animations) |
||
Line 582: | Line 582: | ||
=== Translate === | === Translate === | ||
This animation moves an object along an axis (not to be confused with the <code>textranslate</code> animation which only moves the texture on the UV map, not the geometry). The example below will move an object in the Y direction: | |||
{| class="wikitable" border="0" cellspacing="0" | {| class="wikitable" border="0" cellspacing="0" | ||
Line 621: | Line 621: | ||
</interpolation> | </interpolation> | ||
</source> | </source> | ||
The first figure (<ind> refers to the value of the property associated with the object and the second figure ( | The first figure (<code><ind></code>) refers to the value of the property associated with the object and the second figure (<code><dep></code>) refers to the amount that the object moves in metres. For example, in this case, the object moves 18cm when the value reads 0.66 and 27cm when the value is 1. | ||
'''IF used WTIHOUT property''' : The object is placed at some (Value of Offset) meters away from its original position, along the virtual axis formed by said original position and the point with coordinates x/y/z defined in the <axis> tag. | '''IF used WTIHOUT property''' : The object is placed at some (Value of Offset) meters away from its original position, along the virtual axis formed by said original position and the point with coordinates x/y/z defined in the <axis> tag. | ||
Line 632: | Line 632: | ||
== Material animation == | == Material animation == | ||
Animate the material properties of an object, such as it's texture, shininess or color. | |||
<source> | <source lang="xml"> | ||
<animation> | <animation> | ||
<type>material</type> | <type>material</type> | ||
<object-name>Object</object-name> | <object-name>Object</object-name> | ||
<property-base>sim/model/c172p/material</property-base> | <property-base>sim/model/c172p/material</property-base> | ||
... | ... | ||
lines as mentioned below | lines as mentioned below | ||
Line 647: | Line 646: | ||
'''Optional:''' | '''Optional:''' | ||
* '''property-base:''' | * '''property-base:''' All other properties of this animation will be relative to this property node. | ||
'''Notes:''' | '''Notes:''' | ||
* Numbers are clamped to 0.0-1.0, except | * Numbers are clamped to 0.0 - 1.0, except <code>shininess</code>, which is clamped to 0 - 128. | ||
* By appending <tt>-prop</tt> each of the material properties can read its value from another property. | * By appending <tt>-prop</tt> each of the material properties can read its value from another property. | ||
* '''New since SimGear commit <code>51149bf</code>''': For each of the color components (<code>ambient</code>, <code>diffuse</code>, <code>emission</code> and <code>specular</code>), the <code>red</code>, <code>green</code>, <code>blue</code>, <code>factor</code> and <code>offset</code> tags can each contain an [[Expressions|expression]] instead of a value. | |||
=== Ambient === | === Ambient === | ||
Line 684: | Line 683: | ||
Emission colors are multiplied by the factor-prop value. 1 is maximum color intensity, while 0 is the minimum. Colors are calculated according to the [http://en.wikipedia.org/wiki/RGB_color_model RGB color model]. | Emission colors are multiplied by the factor-prop value. 1 is maximum color intensity, while 0 is the minimum. Colors are calculated according to the [http://en.wikipedia.org/wiki/RGB_color_model RGB color model]. | ||
=== Specular === | === Specular === | ||
Line 698: | Line 691: | ||
<blue>0.0</blue> | <blue>0.0</blue> | ||
</specular> | </specular> | ||
</source> | </source> | ||
Line 716: | Line 700: | ||
<offset>1</offset> | <offset>1</offset> | ||
</transparency> | </transparency> | ||
</source> | |||
=== Shininess === | |||
Shininess is clamped to 0-128. | |||
<source> | |||
<shininess>105</shininess> | |||
</source> | </source> | ||
Line 721: | Line 711: | ||
<source> | <source> | ||
<threshold>0.001</threshold> | <threshold>0.001</threshold> | ||
</source> | |||
=== Texture === | |||
Used for the [[Livery over MP]] system. | |||
<source> | |||
<property-base>sim/model/livery</property-base> | |||
<texture-prop>engine</texture-prop> | |||
<texture>KLM.png</texture> | |||
</source> | </source> | ||
== Texture Animations == | == Texture Animations == | ||
Applying different matrix transformations to the textures of an object. | Applying different matrix transformations to the textures of an object. | ||
edits