Now that simpleBox is animated and the DTS hierarchy is setup, the shape needs to be prepared for exporting animations.
There are two methods for doing this:
The first method is to create multiple sequence nodes in the Maya scene file, name each sequence accordingly, and set the start and end frames to match the frames during which each animation occurs. Then, the entire scene can be exported as a single DTS file. This method is fairly simple, but it does not allow for customization of export options for each individual sequence.
The second method is to save each of the animations as individual Maya scene files. Each Maya file with animation will have a single sequence node corresponding with the desired animation. The Maya file with the base shape will contain all of the meshes and nodes but will not have any sequence nodes. Each file will be exported individually: the base shape will be exported as a DTS file, and the animations will each be exported as DSQ files. All of the files will then be merged together in the engine using a .CS script file.
This method is obviously more complex, but it does allow for a greater degree of customization. For example, you could create a character's upper body motions (e.g. aim, look, shoot, etc.) and lower body motions (e.g. walk, run, sidestep, etc.) as separate Maya scene files. Then you could use a configuration (.CFG) file to specify exactly which nodes export for each DSQ file. These DSQs can then be played back on separate threads in the engine and combined to create a wide variety of movement combinations. You can read more on configuration files, threads, and sequences in the Maya2DTS General Reference.
This tutorial will use the second method. You will create and export separate DTS and DSQ files, create a .CS script, and then view the animations in the ShowTool. Configuration files will not be used for this tutorial. Consult the Maya2DTS General Reference for more information.
Because simplyBox is already animated, continue working with mySimpleBox.mb from the previous section.
1. Examine the animations closely and take note of the frames on which each motion begins and ends.
Animation startFrame endFrame bend side to side 0 60 jump forward 61 80 look right to left 91 120 jump up 130 150 bend front and back 150 170 fall backwards 175 210
Because all of the animations were created in the same file, there are some "transition" frames that may look odd. Those frames can be ignored.
2. Create a sequence node named Sequence_bendSide.
3. Set startFrame to 0 and endFrame to 60.
4. Save the Maya scene file as mySimpleBox_bendSide.mb.
Since the sequence node has already been created, and there should be only one sequence node per animation file, simply rename the existing sequence node and adjust the start and end frames.
5. Rename Sequence_bendSide to Sequence_jumpForward.
6. Change startFrame to 61 and endFrame to 80.
7. Save the Maya scene file as mySimpleBox_jumpForward.mb.
8. Repeat the previous steps for the remaining animations. You may use the following settings:
Maya file name Sequence name startFrame endFrame mySimpleBox_bendSide.mb Sequence_bendSide 0 60 mySimpleBox_jumpForward.mb Sequence_jumpForward 61 80 mySimpleBox_look.mb Sequence_look 91 120 mySimpleBox_jumpUp.mb Sequence_jumpUp 130 150 mySimpleBox_bendFrontBack.mb Sequence_bendFrontBack 150 170 mySimpleBox_fallBack.mb Sequence_fallBack 175 210
As you work through the files, make sure that there is only one sequence node per Maya file. Also make sure that you do not change the DTS hierarchy.