<- return to parismav.com

Divers Animation Tools for Maya

Paris Mavroidis, Nov. 2007
Questions or Comments? email paris (a) parismav * com

The Divers Animation Tools are a collection of MEL scripts that allow animators to intuitively choreograph the movements and spatial relationships of many charaters or objects at once. The tools provide a quick way to apply animation clips to multiple characters, while controlling how these clips are offset and scaled for each successive iteration of the clip. They also let the user attach multiple objects or characters to multiple motion paths at once, while controlling the variations in speed and tilt each successive object exhibits while travelling down its respective path. These scripts are most useful for animations in which many characters' identical or similar movements need to be staggered or offset in an organized and logical fashion to create mass choreographed motion.

Downloads

MEL scripts (zip, 60 KB)

Credits/Notes

-The Divers Animation Tools were developed by Paris Mavroidis at the Digital Arts Research Lab at Pratt Institute

Documentation

Installation
Overview
Applying Clips to Characters
Creating Motion Paths
Attaching Characters to Motion Paths

Installation

1) Unzip "diversAnimationToolsV1.0.zip" file.
2) Move "divers.mel" and the "divers" folder to a maya script path (such as "C:/Documents and Settings/User/My Documents/maya/scripts").
3) Run Maya and type "divers" into the command line.
4) Specify the script path from Step 2 and click on "Accept".

Overview

You can access all the different tools in the collection from the main window:



The suggested workflow for using the tools is shown in the following illustration:



1. Apply Clips to Characters



This tool allows you to apply animation clips from a source character to many target characters at once. The same clips can be made to vary from character to character in terms of when they start and end, the variance in their speed over time and the scale by which they affect movement.

In order for this tool to work, the target characters must have the same attributes as the source character, so that they can all share the same clip library. Once the parameters have been set, the appropriate target characters are selected by the user in the appropriate order before the clips are applied.

The interface consists of separate "tracks" that will all be evaluated in the order that they appear. Their order can be changed using the Move buttons, a new track can be created using the Add buttons and tracks can also be Removed and Reset. Checking the Ignore box turns the track off at evaluation time.

In the CLIP/POSE column, the clip or pose that should be applied can be specified in the appropriate drop-down menu. The menus will show all clips and poses available in the current scene. The starting at and every boxes control which characters in the group will be affected by this track. For all characters to be affected, keep these boxes at 1 and 1. For every other character to be affected starting with the first one set them at 1 and 2 etc. The loop clip box specifies how the clip will behave in the case that the time range it's supposed to inhabit exceeds its original length. If the loop clip box is unchecked, the clip will be stretched (slowed down) as much as is necessary to fill the alloted time. If the box is checked, then the clip will be repeated for as many times as is necessary to maintain its original length as closely as possible while still filling the alloted time. The clip type box specifies how the keys in the clip will affect the values of the attributes (absolute, relative, rotations absolute, default absolute).

The START column specifies when the chosen clip will begin for each character. The frame button determines that a value on the graph refers to a specific frame, while the last used offset choice makes a value on the graph represent the offset from the frame on which the last clip affecting a character ends. Thus, if a previous clip affecting the character ends at frame 50 and the offset for this clip is set at 20, it will begin at frame 70. Points on the graph can be added, deleted and moved around, and the interpolation between points can be controlled using the buttons below (stepped, linear, plateau, spline). The position of a value on the graph along the x-axis dictates which character in the group of target characters the value applies to (the left-most value of the graph applies to the first character chosen in the group of target characters, the right-most value applies to the last and so on). The editable number boxes to the right of the graph determine the scale of the graph (the bottom value is the minimum and the top value is the maximum), while the \/ buttons reset the graph to a straight line, either at the bottom or middle of the graph.

The END column works in the same way as the START column, but specifies when the chosen clip will end for each character. The frame button makes values on the graph represent specific frames, while the clip scale choice makes a value on the graph represent how much the clip should be scaled in length (a value of 1.0 means the clip will be kept its original length).

The TIME WARP column can be used to control the variance of speed exhibited by the clip. The x axis of the graph represents time, while the y axis of the graph represents the progress of the clip from beginning to end. Thus, a straight line from the bottom left to the top right represents the way a clip would be evaluated by default. To vary this, the two graphs can be altered, their interpolations set using the st, li, pl, sp buttons and the appropriate mode set. The "a" mode applies the first graph as the time warp for every character (the second graph is ignored). The "a->b" mode uses the first graph for the first character and gradually transforms from the first graph to the second for each successive character in the group. The "a->b->a" mode starts with the first graph for the first character, gradually transforms to the second and then back to the first for the final character. The "off" mode ignores the graphs and doesn't apply a time warp to any of the characters.

The WEIGHT column can be used to vary the weight that the clip has on the attributes of each character (a key with a value of 4.0 and a weight of 2.0 will evaluate as 8.0) The x-axis represents time and the y-axis reprents weight. Thus, a weight graph that maintains a value of 1.0 throughout will evaluate the normal way a clip would. The graphs can be changed, their interpolations set using the st, li, pl, spbuttons and the appropriate mode be set. The four different modes work the same way as in the TIME WARP section. The range of the graph is +- 10.0 with the default graph maintaining a value of 1.0.

To save the current setup into an xml file, click on the Save button. Previously saved files can be loaded using the Open button. Refresh Window can be used to update the clip and pose lists if any have been added since the last time the window was opened. The APPLY CLIPS button will open a prompt asking the user to select the characters to apply the clips to in the desired order and then press Continue. If a character consists of multiple objects or controls, select only one of these controls per character, provided that the selected control contains at least one attribute that belongs to the appropriate character set. If the Clear Previous Clips box is checked, previous clips that affected the characters will be erased.

2. Create Motion Paths



This tool is used to create motion paths from either a nurbs surface or a series of curves which specify the formation of the characters in space at a given point in time.

One way to use this tool is to start with a series of curves such as this:

Specify how many paths to create in the number of paths box and choose u or v in the path direction menu. Select the curves in the appropriate order and click on the button labeled Loft curves, create paths from resulting nurbs surface. The resulting motion paths will look like this:

If the original curves are changed, the motion paths will also update. Three display layers are also created, containing the source curves, a resulting lofted nurbs surface and the motion paths, respectively. A nurbs surface can also be used as a source for the motion paths, in which case the same procedure is used, except the Create motion paths from nurbs surface button should be pressed instead.

3. Attach Characters to Motion Paths



This tool is for attaching multiple objects or characters to multiple motion paths simultaneously.

The Motion Paths Options section allows you to set the different options associated with motion paths. See the Maya documentation on motion paths for more information on these options.

The START FRAME and MOVE LENGTH sections allow you to specify when each object starts moving along its respective motion path and how long it takes it to reach the end of the path. The y-scale for each graph can be set on the number boxes to the right and the interpolation between points can be set using the buttons below. Which values apply to which objects in the group is determined by how far along the x-axis a given value appears. The left-most value applies to the first object in the group, the right-most value applies to the last object, and so on. The time unit in both graphs is frames.

The U VALUE section controls the variance in speed of the objects as they move along their respective paths. The x-axis of the graphs represents time, while the y-axis represents how far along the motion path the object has travelled. Selecting mode "a" will apply the values from the first graph to every object. The "a->b" mode will use the first graph to the first object in the group and for every successive object will blend towards the second graph. The "a->b->a" mode starts with the first graph for the first object, gradually blends into the second and then back to the first for the final object. Selecting "off" will ignore this section and will apply the default curve for the speed of every object.

The FRONT TWIST, UP TWIST, and SIDE TWIST sections work the same way as the U VALUE section, but control how each object twists along the three different rotation axes while on the motion path. These three controls also allow you to set the y-scale scale for their graphs in the editable min and max number boxes.

The Reset button will set all the values in the window to defaults, while Remove All Existing Motion Path Connections will detach all objects in the scene from any motion paths they're attached to.

Once the parameters have all been set, click on the ATTACH TO MOTION PATHS button. You'll be asked to select the objects you want to attach and click on "OK", followed by the motion paths to attach them to.