Tutorial 5: Motion Flow Editing
The Motion Flow Graph stores clips. To create a script, you select clips from the Motion Flow Graph.
Continue from the previous lesson or load MoFlow_tut01.max. Files are in the cstudio\tutorials\tutorial_5 directory.
Creating a script
On the Motion Flow Script rollout, click Define Script.
On the Motion Flow Graph, click the Axekick icon first, and then the Backkick icon.
The clip names appear in the list on the Motion Flow Script rollout. The name Script1 displays in the text field above the list. In the Motion Flow Graph, a red transition line joins the two clips, showing that they are included in the current script. By default, Biped uses "Minimum Motion Loss" to find a likely starting frame in the source and destination clips. You have created a script called Script1.
Close the Motion Flow Graph window and click Play.
Use Arc Rotate Selected to rotate the Perspective view for a better look at the motion.
As the animation plays, a three-star icon next to the clip names (in the Motion Flow Script list) changes to show which clip is playing. The numbers on the right are the frame numbers where the animation starts.
The default Minimum Motion Loss search method did not choose ideal starting frames in this case: the biped spins unnaturally. You'll first edit the transition manually then you'll try an optimized transiton.
Note: Optimized transitions use minimum foot sliding.
Using The Transition Editor
When you edit transitions manually, you can discard unwanted motion and set the duration of the transition. You can also change the direction of the destination clip in the Transition Editor.
Click Axekick in the Motion Flow Script list.
Controls on the Motion Flow Script rollout are now active.
Click Edit Transition.
The Transition Editor dialog displays; the source and destination clip names appear in the title of the dialog. Position the dialog so the Perspective Viewport is visible.
Click Go to Start Frame near the upper right of the dialog.
The time slider is positioned at the first frame of the transition. By default, the duration of the transition is 25 frames. This is displayed in the Length field on the upper left of the Transition Editor.
Red and yellow stick figures (Ghosts) in the viewports help to establish a starting frame for both clips. Both stick figures display during the period of transition. Red represents the destination clip motion. The biped interpolates between the yellow and red stick figures over the course of the transition.
In the dialog, set Angle to -50.
The destination clip reorients.
Set the Destination Clip Start Frame to 0.
You can choose the destination starting frame by viewing all of the clips motion.
Scrub the time slider back and forth over the transition.
You'll look for areas in the source and destination clips where foot and body movement will work. Frame 80 looks like a reasonable starting frame for the source clip, the character's right foot is in the air. Body weight is shifting to the right foot.
Set the Source Clip Start Frame to 80.
Move the Frame spinner in the Destination Clip Ghost area and watch the red stick figure representing the destination clip. At frame 20, the character is starting to push backward with his right foot. The character's weight will be on the right foot in both clips if this frame is used as the Destination Start Frame.
Click Set Start Frame in the Destination Ghost area. The Frame value (20) is copied to the Destination Set Start Frame field; Biped recalculates and positions the destination clip.
Set Length to 6 frames.
Play the animation.
The weight shifts to the right foot in both clips during the transition. The transition looks natural. Next you'll try an optimized transition.
Tip: Turn on the Plug in Keyboard Shortcut toggle next to the 3DS MAX prompt line and Press ALT+R to change the Active Time to the animation length.
On the transition editor dialog click Optimize Transition in the upper right hand corner.
On the Transition Optimization dialog turn on Search Near Existing Transition. Click OK.
Play the animation. The automatic optimized transition looks good also. Optimized transitions are a time saver if there are many clips and transitions that need to be processed.
Tip: You can select multiple transitions in the Motion Flow Graph window and use Optimize Selected Transitions in the Motion Flow Graph toolbar to optimize all the transitions at once. Optimized transitons can take time to compute but are high quality.
Making the animation available outside Motion Flow mode
To make the animation available in your scene outside Motion Flow mode, use the Create Unified Motion command.
On the Motion Flow Script rollout click Create Unified Motion.
Exit Motion Flow Mode.
The motion is available as a freeform animation in your scene.
Load MoFlow_tut02.max to see the animation. Note that a unified motion does not contain footsteps.
Lesson 3: Looping Animation in Motion Flow Mode