A02   MAKING A START

The Cycle.   Something really simple to get started

A simple cycle

This exercise requires you to produce a simple cycle using a rotating cylinder.   If you are familiar with Maya and have animated in this or other packages then follow
the instructions.   When you have finished then skip to the section named "The Cycle Solution".   For those of you that have not animated before then keep reading this.   The goal of this exercise is to produce a perfectly repeating rotating cylinder.   This entails starting the cylinder at zero Y rotation and turning it through 360 degrees over a four second period.   It should only need two keys, one at the front and one at the end and if the animation curve is linear it should produce a perfect repeating cycle.   The cylinder should rotate evenly as the playback keeps repeating.   Have a go and see if your results match those below.
For this exercise, please use 25 fps.

THE BRIEF
The Cycle:

Technical Elements Covered: Key Framing for Cycles, and Animation Curves

Scene file NOT provided.   Sequence Duration 4 seconds

Create a polygonal cylinder (Axis on Y) with Radius = 1; Height = 0.5; Subdivisions Axis = 24; Subdivisions Height = 1; Subdivisions Caps = 0;
Select one face from the side of the cylinder and extrude to Local Translate Z = 1.0;
Key the cylinder so that it rotates smoothly a whole turn of the Y axis, for exactly 4 seconds without stopping, slowing down or speeding up;
Set your time line to play back the four second cycle repeatedly.



The Camera:

This may be a simple test but use your creative eye to set the camera to a well balanced CU (Close Up) three quarter view of the cylinder without clipping the sides of the frame when it rotates.


The Cycle Solution:
Your time line should be set to play repeatedly between frames 1 to 100.   The Y rotation animation curve should have just two keys.   The last key should be set to a value of 360 at frame 100. Your first key frame however, is likely to be set to a value of zero at frame 1.   If this is the case then it is not correct.   This will cause the rotating cylinder to display the 360 degree position at frame 100 and the zero degree position at frame 1 in succession.   This effectively is the same as displaying frame 100 twice which will cause a glitch in your motion.  The proper implementation of this first key is to set the value to zero at frame zero.   This means that the value of zero at frame 0 is never displayed but when the cycle repeats after frame 100 then frame 1 displays the first increment of the rotation.   Get this concept right and you will not get muddled up when conceiving other more complex cycles, like a walk.


The Graph Editor Window below shows how your animation curve should look with the first key high-lighted.   With a single key high-lighted, the postition in the time line and the value are shown, and can be edited, in the Stats window.   The tangents of both keys should be set to linear.
Keys correctly set


The following examples are not so good.
Among other faults, this curve has too many keys, we only need two for this job.
Keys correctly set


Among other faults, this curve's keys have flat tangents so the cylinder will keep
slowing down and speeding up.
Keys correctly set


This curve's initial key is set on the wrong frame (frame 1, when it should be frame 0).
Keys correctly set


The Traditional Animation Key Frame Inheritance.
I used to refer to setting a key in Maya as setting a "key frame".   This is fine because setting a key is committing a value (a key) to a certain frame along the time line, but strictly speaking the term "key frame" should not be used in this context.   The correct use is defined by Williams in the "Animator's Survival Kit" as those frames that define the action.   The example he uses, I quote as follows: "A man walks over to a board, picks up a piece of chalk from the floor and writes something on the board".   According to Williams, this should generate three key frames which are "walks over", "picks up" and "writes something". Once these are established then the traditional 2D animator would generate the "extremes" and then finish the job by generating the in-betweens.   Luckily, we only need to define Key Frames and Extremes ("key poses") by "setting a key".   The in-betweens are generated automatically by interpolation.   Setting keys to the correct value and position along the time line from the channel box, however, is not sufficient in itself to produce the exact motion you require.   The keys will need some manipulation from the "Graph Editor".

The interpolation of thev animation curve as it approaches the key and then departs from it, can be controlled and shaped by the tangent properties of that key.   This basically changes the approach and departure angles of the animation curve known as the "in" and "out" tangents.   The choice of tangent types gives different characteristics to the shape of your animation curve and can be selected from the graph editor menu bar / Tangents.   The choices are Spline, linear, clamped, stepped, stepped next, flat, fixed, plateau.   I advise you to look at the online Maya help documentation for a complete description of these tangent types.
The ones that I use most are Spline, linear, stepped, stepped next and flat.

Spline produces a flowing, hose pipe nature to the curve.   Spline keys are good for gentle flowing motion.   A bird gaining and losing height while flying into the wind.   A car rocking on its suspension as it drives down a bumpy road.
Example of Splined Keys


Linear keys produce straight line motion which is quite rare in the real world.   A constantly revolving wheel is one example of linear motion.   A fast moving ball changing direction as it ricochets off the floor is another.   A robot with limbs powered by motors or hydraulics could be another.
Example of Linear Keys


Stepped and stepped next are good as a temporary treatment for your main key poses because the interpolation is switched off.   Stepped and stepped next is also good for cutting between camera angles.
Example of Stepped Keys


Flat is good as a general purpose cushion.   Gentle or quick accelerations and de-accelerations are achieved by using flat tangents.   A bus setting off down the road or coming to a stand still as it draws up to a bus stop would typically require a flat key.   Most things in the natural world will accelerate from a standing position or de-accelerate to a standstill.
Example of Flat Keys


Breaking Tangents.

With the exception of linear and stepped keys, the input and output angles of the curve (the approach and departure angles) are normally locked so that the curve passes through the key in a coherent manner.   This relationship can be unlocked so that the input and output can be adjusted to different tangent angles.   The exercise "Ball A" is an example of how breaking the tangents of a key is vital to the quality of your animation.
Example of Broken Tangents


The properties of the Animation Curve.
The curve itself has properties in the form of Pre and Post Infinity treatments.
Pre Infinity treatment is a description of what values are generated for all the frames of that channel before the first key of the animation curve.   You could be forgiven for thinking that it would be a constant value of the first key.   It can be of course, but there are other options.
Post Infinity treatment is a description of what values are generated for all the frames of that channel after the last key of the animation curve.
To view these treatments, go to the Graph Editor menu bar / View /
SET Infinity
.
The treatments are Cycle, Cycle with Offset, Oscillate, Linear, Constant.
Experiment with these to find out what they do.   These are available from the Graph Editor menu bar / Curves /
Pre Infinity
or Post Infinity

Viewing Infinity

This site and all the learning materials are the copyright of Henry Lutman.   The sole purpose of the site and downloads are to aid the teaching of 3D Computer Animation and related topics.   Please do not reproduce any of the content of this site, or any of the downloads for purposes other than to use as a guide to learning, without the written permission of Henry Lutman.
Web Site Author: Henry Lutman.     Web Site Editor: Martin Capey
Lutman Animation Copyright Henry Lutman