Import Anim

Purpose

To import animation from an ASCII file in Animation SDL format to animate objects in your model.

How to Use

  1. Pick an object to assign the animation in the SDL file to. Note: You can retrieve the animation in an SDL file onto any type of animatable item. The list of currently active items are searched for one of the same type as the first item in the HIERARCHY section of the Animation SDL file.

  2. Select File Import Anim. The Alias File Requestor is displayed.

  3. Type the name of the animation SDL file, or click the Show List button to display the File Lister and click on the file you want to retrieve.

  4. After you select the animation SDL file, click the Read Anim button. The animation curves from the DEFINITION section are read into Alias, and the animation channels from the HIERARCHY section, which use the curves from the DEFINITION section, are assigned to the picked object.

    Tips:

Import Anim Options

Match Method

Determines how to match up the objects in the SDL file with those in the picked hierarchy.

Hierarchy

All objects in the retrieved animation are matched to their corresponding objects in the picked hierarchy, based on their position within the hierarchy.

Name

DAG node objects in the SDL file are matched to those DAG node objects in the picked hierarchy that have the same name. Non-DAG objects are still matched according to hierarchy.

Retrieve Method

Determines how the picked objects are affected by the animation being read in from the SDL file:

Replace Part

Replaces a portion of the existing animation, if any, on the affected parameters. The portion replaced begins at the point specified by the Placement option, and extends for the number of frames implied by the selection in the Frame Range option.

Replace All

Replaces all of the existing animation on the affected parameters, regardless of frame number.

Insert

Inserts animation from the SDL file into the existing animation, at the point specified by the Placement option, without removing any of the existing animation.

Parameters

Indicates which parameters should be retrieved from the SDL file:

All

All parameters in the file will be retrieved.

Global

Retrieves only those parameters that are selected in the Global section of the Animation Param control... window.

Local

Retrieves only those parameters that are selected in the Local section of the Animation Param control... window for the currently picked object(s).

Note: If the SDL file contains no animation for a parameter in the frame range being retrieved, that parameter will not be affected, regardless of the setting of the Parameters option.

Frame Range

Specifies which frames are to be retrieved from the SDL file:

Option Window

Pops up Start and End sliders that can be used to explicitly specify the range of frames to retrieve from the SDL file.

All

Selects all animation in the file. This is the same as selecting Option Window and setting Start and End to be the times of the earliest and latest keyframes, respectively, of any of the affected parameters in the file.

If the start or end of the frame range does not fall precisely on a keyframe for any of the affected parameters, then a keyframe will be inserted at that point.

If the animation on an affected parameter does not span the full range selected, then it may be extended to the edges of the range using linear tangents. This is only done if the Replace Part or Insert operations have been selected and the retrieved animation must join up with existing animation.

Placement

Specifies where the animation from the SDL file should be placed:

Before

This option is only available when using the Insert retrieval method. It causes the SDL animation to be inserted before the first keyframe of animation on the currently picked object(s). (See Example.)

After

This option is only available when using the Insert retrieval method. It causes the SDL animation to be inserted after the last keyframe of animation on the currently picked object(s). (See Example.)

From File

Causes all of the keyframes from the SDL animation to be placed at the same times as they occupy in the SDL file.

Option Window

Pops up the Start Time slider which may be used to specify the time at which the first keyframe from the SDL file should be placed.

Spacing

Allows you to specify a time gap to be left between the start and end of an inserted segment of animation, and between subsequent copies of an inserted or replaced segment of animation. If the spacing is set to 0, it is possible (even likely) that the keyframes at either end of the inserted animation will fall on the same time as one of the keyframes in the existing animation. Since only one keyframe is allowed at any given time, the time of the leftmost of the two keyframes is set back by 0.01 frames to distinguish it from the other and the two are joined with linear tangents. By explicitly setting Spacing to a value greater than 0, you can avoid this default behavior and better fine-tune the transition between the existing and inserted animations.

Copies

Specifies the number of copies of the retrieved animation to place into the existing animation. The first keyframe of each copy immediately follows the last keyframe of the previous one after a gap specified by the Spacing option.

Overwrite Names

If this option is selected, the names of the affected existing animation curves will be overwritten by the names of the curves retrieved from the SDL file. If the new name conflicts with that of some other curve in the existing animation, then a default curve name will be created.

If Overwrite Names is not selected, then the names of the existing animation curves will be retained. Note that it is not always be possible to retain curve names, specifically in the case where multiple-instance actions are involved.

If a curve's existing name cannot be retained, then it will be given a new, default name.

The Overwrite Names option is only available on a Replace All operation. Replace Part and Insert always try to retain existing curve names.

Handling Transitions Between Retrieved And Existing Animation

Since the Replace All operation removes all existing animation from the affected parameters, you don't have to worry about transitions between existing and retrieved animation. However, transitions do become an issue for Replace Part, which only does a partial replacement, and Insert.

When the end of one segment of animation must be joined to the start of another, and there is a gap between them, the inbound tangent of the last keyframe on the left segment and the outbound tangent on the first keyframe of the right segment are both fixed to preserve the shapes of the segments. The gap is then bridged with linear tangents on the outbound side of the left segment and the inbound side of the right segment.

If there is no gap between the two segments, the last keyframe of the left segment and the first keyframe of the right segment both lie at the same time. Since a parameter cannot have more than one keyframe at a given time, the left keyframe is moved back by 0.01 frames and the two are joined by linear tangents.

Expressions, Motion Paths and Timewarps

During the Replace Part and Insert operations, if a parameter is animated by an expression, motion path, or timewarp, either in the file or in the existing animation, then it is not retrieved. When this happens, a prompt appears, giving the option to either cancel the retrieval or go ahead with it but without affecting those parameters. Only the Replace All operation retrieves these kinds of animation.

When performing a Replace All operation, Copies is ignored for expressions and motion paths, as it is basically meaningless.

Multiple copies of timewarps may be retrieved during Replace All, but be careful. You may get unexpected results, since the linear tangent transition between the end of one copy and the start of the next may not be what is desired.

References To Parameter Curves And Objects In Expressions

When using Replace All, you can retrieve expressions that reference parameter curves in the SDL file. If Overwrite Names is off, or if there is a conflict between existing and retrieved curves, it is possible that the names of some of those curves will change during retrieval. When this happens, the expression is considered invalid and is ignored during retrieval.

Similarly, a retrieved expression may reference an object from the SDL file whose name is different from that in the existing animation. If the expression contains a relative reference to an object in the retrieved hierarchy, it refers to the corresponding object in the existing animation, regardless of any difference in the names of the objects. If the object reference is absolute, the expression remains unchanged and refers to the object in the existing animation having the same name. If there is no such object, the expression will be considered invalid and will be ignored during retrieval.

Multiple-Instance Actions

It is possible for two or more parameters to share the same action, meaning that they share the same parameter curve. When this happens it may not be possible for curve names to be preserved. For example, if two parameters that share a curve named A are being replaced with animation in which the two parameters have completely different curves, then it is not possible to preserve the curve name because that would imply having two completely different parameter curves named A, which is not allowed

Whenever this situation occurs, you are informed that some curve names may not preserved, and have the option to cancel the retrieval. If you choose to continue, some of the parameters will be assigned curves with new names.

Example

This example shows what happens when frames 4 through 12 of an Animation SDL file are retrieved and inserted into an existing animation starting at frame 7. For purposes of clarity, only one parameter is shown, but the same process would be followed for each retrieved parameter.

  1. For this operation, the option box should be set as follows:

    The insertion process then proceeds in the following manner: (As a visual aid, retrieved animation is shown in blue and existing animation in red. Were you to actually view them in the Action Window, the retrieved and existing animation for a given parameter would be displayed in the same color.)

  2. Begin with the animation in the SDL file, which looks like this:

  3. Keyframes are inserted at the start and end points of the range being retrieved. Since the end of the range is beyond the end of the curve, the curve is extended with a linear tangent. The inbound tangent at the final keyframe is set to Fixed before the extension, so that its value and the shape of the curve are preserved.

  4. The segments of the curve outside of the range are deleted. The outbound tangent at the start of the range and the inbound tangent at the end of the range are set to Fixed so that their values and the shape of the curve will be preserved after the deletions.

  5. Next, the existing animation is prepared for the insertion. Initially, it looks like this.

  6. A keyframe is set at the insertion point (frame 7). This keyframe is assigned Fixed tangent values such that the shape of the curve is not altered.

  7. The curve is split into two parts at the insertion point. The rightmost segment of the curve is shifted forward in time by an amount equal to the range of animation being inserted (8 frames) plus the spacing to be left around the inserted segment (2 frames at each end, giving a total gap of 12 frames).

  8. The retrieved animation is inserted into the existing animation at frame 9, which is the starting frame (7) plus spacing (2 frames).

  9. Finally, the three separate segments are joined using linear tangents.

    Notes:





aliasdocs@aw.sgi.com
Copyright © 1997, Alias|Wavefront, a Silicon Graphics Company. All rights reserved.