| Animation Part 1 (Continued) [BACK] |
| Now we'll set up the animation so the handle
moves at the same speed. At the the same time we're going to see
how the frames and keys relate to each other.
One obvious way would be to have the handles move to the first position, back to start, then to the second position: all 45 degrees per frame. This would require a key at every frame and, since it's obvious, you wouldn't learn anything. Lets try something else. First go to Time Configuration and set Start at 3, End at 7. With the Frame Marker all the way to the left, it should read 3/7. Select Lefthandle. You'll see the key marker is still at 3 all the way to the left. Add a rotation Key for LeftHandle and Righthandle at 4, and 6. Do NOT put a key at 5. At 4, set both subs animation to 45 and -45 the same as on the previous page. Skip 5. At 6 set both subs to -90 and 90 same as the previous page. At 7, where you haven't added keys yet, select "All Subs to Start". A key as added for both subs and their animation is set by OOFEditor. Put your Frame marker to 5 and your Animation Bar should look like mine below. There should be NO KEY at 5. Put the Frame Marker to 3, set the Loop button and play the animation. |
![]() |
| Now the speed of the handles never changes. It may be easier
to see if you turn off Trajectory for now. You can download the finished
oof here.
This example shows us 2 things:
|
| Here's how #1 benefits us: Say you have a Robot. You want
it's head to turn 180 degrees. While the head is turning you want
it's arm to reach out, grab something, and pull back. It will take
place over 3 frames (0-3). Because animation gets calc'd from key
to key all we do for the head is put a key at 0 and 3, set 3 to rotate
180 degrees. Then go back add keys at 0, 1, 2, and 3 for the arm
and set the movement at each. If animation was calc's at each frame
we'd need a key at frames 1, 2, and 3 that rotated the head 60 degrees
at each.
This is also why we need a key at the very beginning of a motion; so that it knows when to start moving. We also need to use a key to keep a sub from moving. I don't mean you need keys at every sub so they don't move. What I mean is you need a key to tell it where to start moving again. (A little confusing). Here's an example. We'll use the Animation Bar below as a reference. |
![]() |
| From 3 to 4 we want our robot to turn his head 30 degrees. From
4 - 5 and 5 - 6 we want him to hold his head still. From 6 to 7,
we want him to rotate his head 120 degrees. To accomplish this. We
put a Rotational key at 6 and leave the ANGLE at 0. We put a key
at 7, set the ANGLE at 120. When the animation gets to 4 it looks
ahead to see what it has to accomplish. It finds the key at 6 tell
it to rotate 0 degrees, thus it doesn't move for 2 frames. When it
gets to 6 it looks ahead and finds 7 which tells it it most accomplish
120 degrees of rotation and has 1 frame to do it. Without the key at 6,
the 120 degree rotation would have started back at 4 and would have been
spread out over 3 frames.
Note! This is also why you MUST have a key that does nothing. Without a starting point nothing is executed. |
| Now for Item #2: Animation and animation loops can start and
end at any available frame.
This means a robot can have a large repertoire of behaviors. Without this you would need a different .oof for each behavior. Open up Old Scratch's oof (scratch.oof) and run his animation a few times. You'll notice that every now and then he returns to his Start position. Scratch has several behaviors that are executed at different times. To see how they are used, use gamTool to open his .gam page. Look for Generic Object: Old Scratch. Once they are open the AI Settings branch and go down to Movement. Go to Movement(0), Animaation(0) and you'll see that Animation(0) runs from frame 0 to 11 over 4 seconds. Now look at the oof. scratch performs a behavior starting at 0 and goes back to his start position at 11. Back in the .gam, look at Movement(1), Animation (0)- an animation runs from 11 to 17. Movement(1), Animation(1) runs from 17 to 21. Go to the oof and you can see the correlation. Of course, unless your a heavy-duty MODer you can't just add movements to the table and expect them to be executed. You can, however choose an existing robot that does things when you would want yours to and replace it's oof with yours (be sure to adjust the start and stop frames accordingly). You can also script for different behaviors to be performed through DALLAS. You could have a robot come thrashing at you if you don't have a key or bow at you feet if you do. |
| Sure, this page was a lot of boring info but, hopefully, the information will help you plan your animation and take advantage of some of the basic concepts. |
| [ BACK To OOFEditor HOME PAGE] |