Choreography Basics

In the Animation/Getting Started tutorial, you were introduced to a few of the more common features of the choreography window, such as how to move keyframes, and scale an entire timeline. You were also shown that keyframes you define, whether through the view window or by modifying an attribute on the properties window, end up as a choreograph attached to the object. So far, we have only scratched the surface of what can be done using the choreography tools.

Although it is true that you can keyframe animations to your heart's content using the animation record mode and setting keyframes interactively (through a view or property window), this approach will take you only so far. The choreography system provides a number of tools and methods for creating any type of animation, from simple to very complex (for instance, a combination of simple mouth movements to create individualized facial expressions).

This tutorial introduces you to more of the choreography system's features, such as editing aNimation curves, loading and saving choreographs, and building hierarchical animations. More choreography features are presented in the Choreography Essentials tutorial.

To begin, delete all previous test objects from your current scene, and do the following:

Set up an animation timeline of 120 frames.

Set the view window to a front view.

Create a sphere near the left edge of the view window, roughly centered vertically.

Turn on animation record mode and set the time slider to the last frame (the index of the last frame is 119 or 120 depending on the indexing convention selected from the Animation tab of the Preferences window). Then move the sphere in a straight line across to the right edge of the view window. Use the Shift modifier or the red translation handle for accurate horizontal translation.

Exit the animation record mode.

Open the choreography window, and click on the Properties tab. Double click the mesh1.init0 choreography. Double click the keyfr1 object under the init choreography. Select Translate from the list of animated object attributes.

Whenever you modify an object in the animation recording mode, the animation system saves all your modifications to a set of animation curves, grouped under a choreograph name. These curves determine how the attribute changes during the animation. The choreography window provides a way to edit these animation curves directly.

Let's have a look at the straight line movement animation we just created for the sphere. In the Properties tab, you should see the following:

For object translation, the red line represents the X axis, green the Y axis, and blue the Z axis. Currently, you see an ascending red line because you moved the sphere in the X direction. The green and blue lines have a constant value zero (the green line hides the blue line below it). Study the graph of the animation curves for a moment. The X axis of the graph shows the number of frames of your timeline, and the Y axis shows object position in the current units. Note the positions of the "knots" of the lines (there should be one at each end on both lines).

The curves defining the translation of the sphere

[Note] Note
The curve display graph can be zoomed and panned by dragging with the right mouse button while holding down the Shift or Ctrl key, respectively. From the popup menu of the curve graph, you can hide any of the red, green and blue curves in order to make editing of a single curve easier.

Now compare what you see in the animation curves graph to the information shown on the Time Lines tab.

A time line showing keyframes for the sphere

Now return to the Properties tab. Try moving the knots on both the X and Y animation curves, and observe the results. As suggestions, do the following:

  1. Move the end knot of the red curve to a value of 80 (this changes the value shown in the X field below the graph). Keep the value of the Y field the same. Move the time slider manually to view the animation. Also look at what has changed on the Time Lines tab.

  2. Return the end knot of the red curve to its original location, and move the beginning knot to an X value of 40. Run the animation, and then check the Time Lines tab.

  3. Move the beginning knot of the red curve to a Y value of 0.3. Note that you can enter values directly in the X and Y fields, and press the Enter key to set the new value. Run the animation, and then check the Time Lines tab.

  4. Set the beginning knot of the red curve back to its original position. Now move the end knot of the green curve to a Y value of 0.4, and observe the animation and the changes in the Time Lines tab.

All the manipulations we have done so far are rather basic; however, maybe you can now envision the type of control you have available for creating animations. Moving on to more interesting things, let's assume you want another keyframe for the movement of the sphere along the X axis. You could go back to the view window and use the animation record mode, but this is not necessary. Try the following:

Make sure the knots of both the red and green curves are set back to their original positions. Now place the cursor over the red X curve at the point where it intersects the line representing frame 60, and left click once. A new knot is inserted. Best of all, this new knot is a keyframe. Verify this by viewing the Time Lines tab. Now you can move this new knot, changing the shape of the X curve, and thus, the movement of the sphere along the X axis. Move the new knot to a value of 0.6 for the Y field, and run the animation.

What has happened? The sphere still moves in a straight line, but you have modified how it does so. Now the sphere moves most of the distance across the screen by frame 60, and then takes another 60 frames to travel the remaining distance. The result is as if the sphere has encountered some sort of force field or other type of external resistance. (This isn't really the case, but by adding other elements to the scene you could certainly make your viewers believe the sphere is meeting some type of resistance, and isn't that the point?)

Next, let's modify the movement of the sphere along all three axes. Adjust the translation curves to look like the following:

These are the settings:

  • X (red) curve is left as it was from the last adjustment. Knot 1: 'X=0, Y=0.0'; Knot 2: 'X=60, Y=0.6'; Knot 3: 'X=119, Y=0.7'

  • Y (green) curve settings. Knot 1: 'X=0, Y=0.0'; Knot 2: 'X=119, Y=0.1'

  • Z (blue) curve settings. Knot 1: 'X=0, Y=0.0'; Knot 2: 'X=119, Y=0.4'

Modifications to all three translation curves

Now play the animation. First view from a front view. Then rerun it and view it from a top view. Now the sphere moves along all three axes. As you should now start to realize, this form of editing, when applied to other parameters such as Rotation, Scale, Skew, Color, Transparency, etc., gives you very precise control over your animations.

Let's do one more adjustment before closing this discussion, which is, let's make the sphere move along a circular path in the XY plane, using the starting and ending positions that we have defining along the X axis.

To do this, set the end point of the blue curve back to a Y value of 0.0, and set the X curve back to its original state. To do this, select the knot at frame 60 that you added to the red curve (left click the knot to select it). Right click and select Delete Points from the popup menu. Now we have no Z motion, and the X motion is set to what it was originally.

Now we need to do two things: make the X movement return to its starting point at frame 119, and adjust the movement of the sphere in Y so that the sphere goes to the bottom and the top of the screen when the sphere is at the middle of the screen in its movement along X.

To modify the sphere's movement in X:

1. Add a knot to the red curve at frame 60. Move this knot to a Y value of 0.7

2. Move the end knot of the red curve at frame 119 to a Y value of 0.0

3. Right click over the curve graph and select 'Types/Polyline' from the popup menu. If you now play the animation, the sphere moves back and forth across the screen.

To modify the sphere's movement in Y (the green curve):

5. Move the end knot of the green curve to a value of 0.2 so you can more easily see the curve. Add new knots to the curve at frames 30, 60, and 90.

6. Set the Y value of the knot at frame 30 to -0.5.

7. Now set the knot at frame 60 to 0.0, the knot at frame 90 to 0.5, and the knot at frame 119 to 0.0

8. Play the animation.

Note that the sphere does not really move along a smooth circular path. This is because we earlier set the animation curve type to Polyline. Right click over the curve graph again and select Type/Nurbs from the popup. Add two new points to the red curve and bend it to a bell shape as shown in the figure below. Now play the animation. The sphere moves along a (roughly) circular path, returning to its starting position.

The final translation curves

[Note] Note
The animation system uses special PNurbs curves by default. These curves attempt to pass through the key points as smoothly as possible. If you need to combine smooth, round bends and sharp edges in a same curve, use the Bezier option available in the curve editor's popup menu.

[Note] Note
Animated transformations are defined in object's space. The red X curve does not show you movement in 'world' space but with respect to its own native orientation. The red axis of the object handles shows you this direction. Therefore, you can edit animation components of an object independently of the motions of its parent levels. For example, a butterfly moves its wings up and down. When you insert the butterfly to a moving space ship, up direction may become unclear - however, editing the wing motion remains quite as easy.

This section has only scratched the surface of what you can do by editing animation curves. As always, the best course of action is to experiment. Save the project you just completed because we'll use it in the next section.

Adding animated attributes to a choreograph

In the previous section, we used the Properties tab to modify an animation that was initially defined interactively. If we now want to add rotation or scaling effects, for instance, is it necessary to do this first by using the animation recording mode? The answer is No. In fact, you do not even have to set up an initial animation in animation recording mode at all (more about this in the next section).

Using the animation we created in the previous section, let's animate the color attribute of the sphere so it changes color as it moves. First, go to the Time Lines tab and select the choreograph 'keyfr1' - we will define the color animation using an existing keyframer object. Then switch to the Animateable Attributes tab, Scroll down the list of attributes, highlight Color, and then click the Animated checkbox. An asterisk to the left of an attribute name indicates that it is animated (even if the animation settings do nothing).

Select the Color attribute from the list and click the Animated checkbox

Go to the Properties tab and click the new Color attribute in the choreography list to select it. Right click over the graph window and select Create Predefined Curve/Constant curve from the popup. Three animation curves are created for the Color attribute: red, green, and blue lines. These lines will be set one on top another initially. At this point, the vertical scale of the curve editor may be too small (0 - 0.5). Select Set Minimum and Maximum Values from the popup menu, change Max Y to 1.0 and click OK.

Move the knots of the red, green, and blue curves so that you have something similar to that shown in the following illustration.

Curves defining object color

Note that for the green color component, two knots were added around frame 60 (the curve type is the default of PNurbs) to achieve straight line segments. However, since all the other color curves are straight lines, you could achieve the same effect by adding only one knot to the green curve at frame 60, and changing the line type to Polyline.

Play the animation. You now have a sphere that changes color as it moves, and you were able to add this effect solely in the choreography editor.

Creating a choreograph for an object

As mentioned in the previous section, it is not necessary to use the animation recording mode to create an initial choreograph for an object. Realsoft 3D's choreography editor can be used exclusively to construct your animations.

To demonstrate this, first delete the sphere from your current scene to get a clean start. We will use the same frame count as in the previous example, 120 frames.

Create a NURBS sphere at the left side of the view window. Select the sphere in the select window, and then right click to display the popup menu. Near the bottom of this menu is the Make Choreographable option. Select this menu, then display the choreography window, and go to the Time Lines tab. There is now an entry called 'meshn.init0'. If you double-click this choreograph, no sub items are displayed because it currently does not have any animated properties.

A new choreograph

Let's make this sphere expand and contract as it moves back and forth across the view window. First we define the motion to make the sphere move across the view and back to its starting position:

  1. On the Time Lines tab, highlight the meshn.init choreograph. Move the end of the time line to frame 119.

  2. Select New/Keyframer from the popup menu. Double click meshn.init to open its sub structure.

  3. Click the keyfr1 choreograph to select it.

  4. On the Animateable Attributes tab, select Translate from the list of attributes, and set the Animated checkbox.

  5. Open the keyfr1 choreograph with a double click and select the new Translate attribute under it.

  6. On the Properties tab, select Create Predefined Curve/Constant curve from the popup of the curve graph.

  7. Select Type/Polyline from the popup.

Let's change the editing area of the curve graph. Right click over the graph and select Set Minimum and Maximum Values. Set the fields as follows: Min X = 0; Max X = 119; Min Y = -0.8; Max Y = 0.8. Click the OK button. Uncheck Green and Blue curves from the popup menu; only the red curve remains visible. Click on this line at frame 75 to add a new knot, and move it upwards to a Y value of 0.8 (you may need to adjust the Y value to match the scale of your view window. The main point is to have the sphere move from one edge of the view to the other and then back).

Now let's animate the sphere's scale. Find the Scale attribute in the Animateable Attributes tab, select it and check Animated. Return to the Properties tab and select Create Predefined Curve/45 deg curve from the popup. Select Type/Polyline from the popup. Add points to the X and Y scale curves so that they look as follows:

Now play with the time slider to see how the scale curves affect the shape of the object. The Scale curves, as well as Translation curves, define a change from the initial state. This means that when a scale curve reaches the Y value 1, the total scale value is 1+1=2 (the initial default scale is one), doubling the size of the object in the respective dimension.

Animate the Scale property

Loading and saving choreographs

So, you have created a nice animation that moves an object and causes it to "pulse", increasing and decreasing in size. What if you wanted other objects to do the same thing, or wanted to save this motion into a library of animation effects? Well, choreographs can be saved to a file. This allows you to create choreography libraries.

To save animation data of an object to a file, such as scaling and motion of the sphere created earlier, select the top level chorograph of the sphere (mesh.init0) and choose Save from the pop-up menu. Save it as 'Pulse'.

Now create another object, for example an analytic cube. On the select window, choose the popup menu Make Choreographable. On the choreography window, select the init choreography of the cube. Then select Load from the popup menu. From the file loading dialog, select the 'Pulse' choreograph you just saved, then play the animation. The cube moves and pulses in exactly the same way as the sphere did.

Rules for Attaching Choreographs to Objects

In general, any choreograph can be attached to any type of object even if the new target object does not have a common set or subset of object attributes. When a choreograph is attached to a new target object, all features that the target object does not support are removed. For example, an analytic sphere object defines a Center attribute, but a NURBS curve does not have a Center attribute. A choreograph created for an analytic sphere that only contains animation of the Center attribute would produce no effect if assigned to a NURBS curve.

Deleting animation effects

If you are working with animating an object, and decide that a particular choreograph is not what you want, you can easily delete it from the object. If a choreograph has been saved as a file previously, deleting it from an object does not delete the choreograph file, just its attachment to a particular object.

Using our example from the previous sections, if you want to delete the 'Pulse' choreograph from the cube object, do the following:

  1. Go, for example, to the Time Lines tab of the choreography window and select the keyfr1 under the mesh.init0 choreograph.

  2. Select Delete from the pop-up menu.

You can also remove animation effects from a certain attribute. For example, maybe you want the Pulse choreograph just for the scaling that causes the pulsing behavior, and not the movement. To remove the defined animation effects from the Translate attribute:

  1. In the choreography window, click the Translate attribute under the keyfr1 choreography to select it.

  2. Select Delete from the popup menu.

You can also remove all choreographs from an object. To do this, select the topmost 'init' choreograph and apply Delete from the popup menu. Alternatively, you can activate the object from the select window and choose Delete Choreographs from the popup menu of the select window.

Exchanging choreographs

In the tutorials above, a choreography was assigned from a NURBS mesh to a cube by saving and reloading it. You can also assign a choreography to a new object using drag & drop.

For example:

1. Create a cube. Turn animation recording on, go to the last frame, then rotate and move the cube. Turn animation recording off.

2. Create a sphere. Select Make Choreographable from the popup menu of the select window.

3. Multi select the sphere and the cube or their parent level (because chorerography window may have the Only Selected Objects option enabled).

4. Open the choreography window. Open the Cube.init0 choreography by a double click. Drag the keyfr1 choreography under it over the sphere.init0 choreograph and drop it there. This attaches the dragged choreography to the sphere.

If you now play the animation, both objects will follow the same choreography.