1. Let's start from scratch and create a new Kinemac file with the command File:New.




  1. Go to the Sprites window and move the time marker to the frame zero.





  1. Create a new cube selecting the menu item Object:3D:Cube. You will see a white square on the Stage window and a Sprite labeled Cube on the Sprites window. The sprite starts at the time point zero and it's 800 ticks long (duration - 60 ticks correspond to 1 second).




Even if you now play the animation, the cube will not move because it has not key frames. So now we will create the key frames describing the animation of the cube.

 

Define the key frame 1

We create the first key frame on the first frame of the sprite (since the sprite begins at the frame 0, we create the key frame on the frame 0) and define the x, y, and z positions and the x, y and z rotations.

• Move the time marker to the frame 0, as shown by the picture aside.







• Go to the Inspector:Geometry panel and click on the key frame button Position. This button creates all the 3 positions x y z key frames. Usually, you will need to animate the object along the 3 axis x y z so it’s very common to turn on all the 3 positions x y z. key frames But if you really need to move the object along one axes only, e.g. the X axis, you just need to create the position X key frame only, so in that case, click on the key frame position X individual button.

Define the key frame 2

We create the second key frame on the frame 100 and define the x, y, and z positions and the x, y and z rotations.

Move the time marker to the frame 100, as shown by the picture aside.






Press Command-k to quickly create the 3 positions x y z key frames and the 3 rotations x y z key frames. On the Stage window, click on the Cube and drag it to the top-right corner. Release the mouse button. Now click on the Cube without holding down any key, then, holding down the mouse button, hold down the Control key, then drag the mouse to rotate the Cube. Please note, first click on the Cube, then add the Control key to rotate an object on the Stage. You can set the position and the rotation of the Cube by entering a value on the x y z Positions and Rotations fields on the Inspector:Geometry panel or by dragging the wheels under each field.


You can now quickly jump from one key frame to the next one by pressing the TAB key and verify the position and rotation of the Cube on the frame 0 and the frame 100. Press Shift-TAB to go to the previous key frame


  1. Now go to the frame Zero (Command-Left-Arrow) and play the animation (Space Bar). You will see the the Cube moving from the top-left corner to the top-right corner while rotating. You can extend the animation by adding further key frames to the sprite Cube.

Modify the animation

You can modify the animation changing the positions and rotations of the cube on a given key frame. Firstly you have to move the time marker to a key frame point, then move and rotate your object to the new position either on the Stage and on the Inspector panel.


Please note that you have to BE SURE that the time marker is really placed on a key frame before you modify the positions and the rotations of the cube. Instead of manually placing the time marker on a key frame point, we always suggest to "jump" from a key frame to the next key frame pressing the TAB key. Press SHIFT-TAB to go to the previous key frame. If you modify the position or the rotation of the cube when the time marker is not on a key frame point, you will be modifying its position and rotation along the whole duration of the sprite.

Change the time point of a key frame

You can vary the position of a key frame along the ruler view of the Sprites window by dragging the key frame icon to the left or to the right side. This way you will modify the animation of that sprite. For example, if your object has 2 key frames, one at the frame 0 and one at the frame 120, if you move the key frame from the frame 120 to the frame 60, you’ll move the positions and rotations associated to that key frame to the frame 60. Therefore the animation between the frame zero and the frame 60 will run two times faster. The object will do that animation in one seconds (60 frames) instead of two seconds (120 frames).


 

Remove a key frame

When you see an orange key frame icon 
 on the Inspector panel (that key frame exists at that time point), you can click on the key frame icon and
  1. Hold down the Option key to remove that key frame.

  2. Hold down the Option & Command keys to remove all the keyframes of that parameter.

  3. Hold down the Control & Option & Command keys to remove all the keyframes of all the parameters.




On the Sprite window, you can remove all the key frames from a given time point simply dragging the key frame icon  out of the ruler view holding down the Command key.


 

What's behind the Key Frames

We suggest to open the Bezier window (double click on the sprite "Cube" or, with the sprite selected, press Command-3) and see what happens when you modify the positions and the rotation of the cube. Try these tasks when the Bezier window is open:


  1. Set the time marker to the time point 100 (on the key frame), then on the Stage window, translate and rotate the cube. You will see in the Bezier Window that the key frame points of each curve will move up and down, changing the value of the positions and rotation of the cube in that time point.

  2. Set the time marker to the time point 250 (where there is not any keyframe), then on the Stage window, translate the cube. You will see in the Bezier window that the whole curves describing the translations (red, green and blue) will translate up and down, changing the value of the positions of the cube along the whole duration of the sprite cube.

  3. On the Sprite window or in the Bezier window, drag horizontally a key frame icon on the ruler view.

Animation

Think about your animation like a series of still images, projected one by one, at 60 frame per second (FPS) speed. On each frame, the object is placed on a different position. For example at the frame 1 the object stands on the X coordinate 10, then at the frame 2 on the X coordinate 20, at the frame 3 on the X coordinate 30, and so forth. When you play the animation you will see your object moving along the X axis from the point 10 to the point 30. This could be quickly done when the frames are so few, but it becomes long and boring for e.g. 1000 frames. Moreover, it comes so evident that at the frame 15 the object will be at the X coordinate 15. So the computer can save your time creating all the frames in between the first frame and the last frame. Thus all you need is to define the position of the object at the first frame, and the position of the object at the last frame. These 2 frames are called key frames. Basically, and in simple words, you will create a new key frame whenever your object changes direction and/or speed.

KINEMACkinemac.html

• Click on the key frame button Rotation. This button creates all the 3 rotations x y z key frames.
After the click on the Position and the Rotation buttons, you will see, that the gray icons in the Inspector panel will turn to the on state (orange-white). This means that at the frame zero the sprite Cube has 6 key frames (3 positions x y z, and 3 rotations x y z).






On the ruler view of the Sprite window you will see a key frame icon 
at the frame zero, as shown by the picture aside. Please note, the Sprite window tells you that the selected sprite has some key frame (at least one) on a given frame, but it doesn't tell you which parameter has a key frame (e.g. it could be the rotation Y or the position Z or both). To know which parameters have a key frame at a given frame you have to look at the Inspector:Geometry panel.



After, and never before, you created the 6 key frames, you can place and rotate the cube at your wish. On the Stage window, click on the Cube and drag it to the top-left corner. Release the mouse button. Now click on the Cube without holding down any key, then, holding down the mouse button, hold down the Control key, then drag the mouse to rotate the Cube. Please note, first click on the Cube, then add the Control key to rotate an object on the Stage. You can set the position and the rotation of the Cube by entering a value on the x y z Positions and Rotations fields on the Inspector:Geometry panel or by dragging the wheels under each field.