Temporal Function

 For a Temporal Function, the result depends on a frame variable. The result format will a Float (1d), a Point (2d), a Vector (3d).
The Temporal Function is used for:
  • Param animation (FuncParam)
  • Velocity definition
Velocity is used by Motion. See details "Overview"  "Velocity"
example: animate a squash deformer param
<Object create="object" name="sphere">
     <Param name="class">sphere</Param>
     <Param name="radius">2</Param>
     <Param name="squash">deformer</Param>
     <FuncParam name="squash.factor" type="square" frames="0-100">
         <Param name="begin">-0.3</Param>
         <Param name="end">1</Param>
         <Param name="mirror">true</Param>
         <Param name="repeat">2</Param>
     </FuncParam>
</Object>
example: a velocity used by a rotation motion
<Object create="object" name="teapot">
     <Param name="class">teapot</Param>
     <Motion coord="rot" type="rotate" frames="1-100/11">
             <Param name="begin">0;0;0</Param>
             <Param name="end">0;0;180</Param>
             <Velocity name="v1" type="sinus" frames="1-100">
                     <Param name="repeat">2</Param>
                     <Param name="mirror">true</Param>
             </Velocity>
     </Motion>
</Object>
Function Attributes

 Attribute name  | String  | mandatory

 The name attribute is used:
  • FuncParam: the object property (ex: pos, scale, squash.factor, etc.). The property format must be a Float, a Point, a Vector.
  • Velocity: the Velocity name.

 Attribute frames  | RenderFrames  | mandatory

 The frames attribute is used to define the frame sequence, a couple of begin and end frame: <begin>-<end>
Example: 1-250 251 frames will be calculated
Optionnaly, a frames count can be set: <begin>-<end>/<count>
Example: 1-250/6 only 6 frames will be calculated: 1, 50, 100, 150, 200, 250

 Attribute type  | String  | mandatory

 The name attribute is used:
  • Linear
  • Square
  • Sinus
  • Noise
  • Spline
linear type
<FuncParam name="scale" type="linear" frames="1-100"/>
result
square type
<FuncParam name="scale" type="square" frames="1-100"/>
result
sinus type
<FuncParam name="scale" type="sinus" frames="1-100"/>
result
spline type
<FuncParam name="scale" type="spline" frames="1-100">
     <Point name="0" in="1;0.0" out="5;2.0">1;0.0</Point>
     <Point name="1" in="98;0.75" out="100;1.0">100;1.0</Point>
</FuncParam>
This function type requires bezier points.
Function Params
 These params can be combined.

 Param begin  | Float   Point  Vector  |  optional

 The begin param can be used to set the result at the begin frame. The value format must be a Float, a Point or a Vector
example
<FuncParam name="begin" type="sinus" frames="1-100">
     <Param name="begin">-0.5</Param>
     <Param name="end">1.5</Param>
</FuncParam>
result

 Param end  | Float   Point  Vector  |  optional

 The end param can be used to set the result at the end frame. The value format must be a Float, a Point or a Vector

 Param mirror  | Boolean  |  optional

 The mirror param can be used to mirror the result:
example
<FuncParam name="scale" type="sinus" frames="1-100">
     <Param name="mirror">true</Param>
</FuncParam>
result
 Combined with the repeat param:
example
<FuncParam name="scale" type="sinus" frames="1-100">
     <Param name="mirror">true</Param>
     <Param name="repeat">2</Param>
</FuncParam>
result

 Param start  | Float  |  optional

 The start param can be used to offset in time the function start. Value: 0 to 1 (0 by default)
example
<FuncParam name="scale" type="sinus" frames="1-100">
     <Param name="start">0.2</Param>
     <Param name="stop">0.8</Param>
     <Param name="mirror">true</Param>
</FuncParam>
result
 Combined with the repeat and mirror param:
example
<FuncParam name="scale" type="sinus" frames="1-100">
     <Param name="start">0.2</Param>
     <Param name="stop">0.8</Param>
     <Param name="mirror">true</Param>
     <Param name="repeat">2</Param>
</FuncParam>
result

 Param offset  | Float  |  optional

 The offset param can be used to offset the result.
example
<FuncParam name="scale" type="sinus" frames="1-100">
     <Param name="offset">-0.5</Param>
</FuncParam>
result

 Param scale  | Float  |  optional

 The offset param can be used to scale the result.
example
<FuncParam name="scale" type="sinus" frames="1-100">
     <Param name="offset">1</Param>
     <Param name="scale">-1</Param>
</FuncParam>
result
Functions Combinaison
 The temporal functions can be combined: add or scale.