Motion
Motion is used to animate an object space coordonnates (Pivot). The Pivot defines the object position and rotation (in spherical coords).
Motions can be conbinated in two ways:
- In space: A motion contains a child motion. The child motion is calculated locally in the pivot of the parent motion.
- In time: A motion follows another motion.
See details Motion Combinaison
Space combinaison: circular combined with a segment motion produces an helice motion
Time combinaison: a circular follows a segement motion
Motion Definition
The space coordonnates (coord attribute) the Motion can animate are:
- Position only: coord="pos"
- Rotation only: coord="rot"
- Position & Rotation: coord="pos-rot"
- Position & Target (camera): coord="pos-target"
Motion can be used in a 2d or a 3d space.
The space coordonnates affect:
- 3d process (Max, Maya): the scene objects
- Compositing process (Nuke): the node knobs translate & rotation (ex: Transform Node, Card Node, etc.)
- Montage process: a layer position & rotation (ex: Image Layer, Shape Layer, etc.)
A Motion can be defined by:
- A temporal function. See details Temporal Function
- A curvilinear function combinated with a Velocity. A Velocity is a temporal function. See details Temporal & Curvilinear Function
- A Path combinated with a Velocity. A Path is a curvilinear function. See details Temporal & Curvilinear Function
Avantage of temporal and curvilinear function conbination (case 2 & 3) is that the user can easly split the space and the time behavior of the motion.
See details "Path"
See details "Velocity"
Temporal Function
example: data use
<Object create="object" name="teapot">
<Param name="class">teapot</Param>
<Motion name="m1" coord="pos-rot" type="data" frames="1-100">
<Param name="creationId">data1</Param>
<Param name="pos">x;y;z</Param>
<Param name="rot">rx;ry;rz</Param>
</Motion>
</Object>
This Motion is defined by:
- The <Motion>...</Motion> tag
- The name attribute: the motion name
- The coord attribute: the coord of the object to be affected (pos, rot, etc.)
- The type attribute: the motion function type
- The frames attribute: the frame sequence. See details Render Frames
- The Param list: the params used to define the function, according to the type
See Motion Function List: "Function"
Curvilinear Function & Velocity
example: rotation
<Object create="object" name="teapot">
<Param name="class">teapot</Param>
<Motion property="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="square" frames="1-100" />
</Motion>
</Object>
This Motion is defined like the Temporal Function Motion, plus a <Velocity>...</Velocity> sub tag to define the Velocity.
See Motion Function List: "Function"
See Velocity List: "Velocity"
Also, Velocities can be combined in time
example: a square velocity follows a linear velocity
<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="linear" frames="1-50">
<Param name="begin">0</Param>
<Param name="end">1</Param>
</Velocity>
<Velocity name="v1" type="square" frames="51-100">
<Param name="begin">1</Param>
<Param name="end">0</Param>
</Velocity>
</Motion>
</Object>
example: a segment path combined with a square velocity
<Object create="object" name="teapot">
<Param name="class">teapot</Param>
<Motion name="m2" coord="pos" frames="1-100/6">
<Path type="AtoB">1
<Param name="begin">0;100;0</Param>
<Param name="end">0;150;0</Param>
</Path>
<Velocity name="v1" type="square" frames="1-100" />
</Motion>
</Object>
This Motion is defined by:
- The <Motion>...</Motion> tag
- The name attribute: the motion name
- The coord attribute: the coord of the object to be affected (pos, rot, etc.)
- The frames attribute: the frame sequence. See details Render Frames
- The <Path>...</Path> sub tag: this tag defines the Path. See details "Path"
- The <Velocity>...</Velocity> sub tags: this tags define the Velocity (or a Velocity combinaison). See details "Velocity"
example: a segment path combined with a square velocity following a linear velocity
<Object create="object" name="teapot">
<Param name="class">teapot</Param>
<Motion name="m2" coord="pos" frames="1-100/6">
<Path type="AtoB">1
<Param name="begin">0;100;0</Param>
<Param name="end">0;150;0</Param>
</Path>
<Velocity name="v1" type="linear" frames="1-50">
<Param name="begin">0</Param>
<Param name="end">1</Param>
</Velocity>
<Velocity name="v1" type="square" frames="51-100">
<Param name="begin">1</Param>
<Param name="end">0</Param>
</Velocity>
</Motion>
</Object>
See details "Path"
See details "Velocity"
Motion Combination
Motions can be conbinated in two ways: space and time.
Space Combinaison
A Motion contains a child Motion. The child Motion is calculated locally in the pivot of the parent motion.
example: circular combined with a segment motion produces an helice motion
<Object name="pivot">
<Motion coord="pos-rot" frames="0-100/11">
<Path type="circle">
<Param name="center">0;0;0</Param>
<Param name="axe">0;0;1</Param>
<Param name="radius">200</Param>
<Param name="begin">0</Param>
<Param name="end">180</Param>
</Path>
<Motion frames="0-100/11">
<Path type="AtoB">
<Param name="begin">0;0;0</Param>
<Param name="end">0;0;100</Param>
</Path>
</Motion>
</Motion>
</Object>
example: a circular follows a segement motion
<Object name="pivot">
<Motion coord="pos" frames="0-50/11">
<Path type="AtoB">
<Param name="begin">0;0;0</Param>
<Param name="end">0;-200;0</Param>
</Path>
</Motion>
<Motion coord="pos-rot" frames="51-100/11">
<Path type="circle">
<Param name="center">0;0;0</Param>
<Param name="axe">0;0;1</Param>
<Param name="radius">200</Param>
<Param name="begin">180</Param>
<Param name="end">270</Param>
</Path>
</Motion>
</Object>