Hierarchies and Animations

There are three main stages for creating a rif file with a hierarchical animation

1.       Export the shapes to be used in the hierarchy using export option 2.

2.       Export the hierarchy (the links between the shapes) using export option 3.

3.       Finally export the animation sequence data using the fourth export option.

The export process is split into these separate stages because each rif file can have multiple hierarchies (possibly sharing the same shapes), and each hierarchy can have multiple sequences. Note that it isn’t necessary to go through the 3 stages for every animation exported. Once you have exported the shapes and hierarchy, you can export all the animation sequences that you want, just using the fourth export option 

Exporting Hierarchies

First create a scene in Max containing all of the objects that should be in the hierarchy, with the appropriate hierarchical links in place. If you want to have dummy objects in the hierarchy then you will need to make sure that these are in place as well. This stage of the export process in only interested in the linkages between objects, the actual placement is irrelevant. The export will fail if there is more that one hierarchy within the scene (If you want to export more than one hierarchy, then you will need to create separate Max scenes, and run through the export process once for each hierarchy).

After choosing the hierarchy export option you will be asked to enter a name for the new hierarchy. If you enter the name of a hierarchy that already exists then you will be warned of this, and asked whether you want to replace the hierarchy. Note that when a hierarchy is replaced, all of the animation data for that hierarchy is lost. Therefore, if you are just making small alterations to a hierarchy that already exists, you may want to use the update hierarchy option instead.

Exporting Animation Sequences

In order to export an animation you need to create a Max scene that either contains the animation, or alternatively , a series of snapshots. The snapshot option involves having a separate object for each frame and each object in the hierarchy . So if ‘head’ was on object in the hierarchy, then you (or Max) would create objects called ‘head01’,’head02’ etc. for the frames. This method isn’t recommended for most animations, and will it will fail if any of the original object names end with numbers.

When exporting an animation sequence you don’t have to have the hierarchical links sets up in the Max scene. It also doesn’t matter if there are surplus objects in the scene (although you will be warned of their presence ), so you can safely leave the ‘biped’ objects lying around.

After choosing to export an animation sequence, you will be shown a dialog box containing a number of options for the export. You can edit the following :

Sequence/Sub Sequence 

 The sequence names listed will be taken from the sequences.txt file for your project.

Start/End frame 

These allow you to export just part of a sequence should you wish. If the end frame is set lower than the start frame, then the frames will be taken backwards. These settings are ignored if you are exporting using snapshots.

Delta Sequence Properties

You can specify whether a sequence should be considered to be a delta sequence. The delta sequence can be taken as relative to the first frame (used for hit deltas), or relative to the middle frame (used for elevation deltas). Note that you can change these settings in hierarchy mode in Inteng, if you prefer.

Sequence Loops

Check this box if this is a looping sequence. In fact this isn’t used for storing whether a sequence loops in the rif file, rather it is used for determining whether the last frame of the animation should be exported. If the sequence loop box is checked, then the last frame of the animation is assumed to be the same as the first, so the export process won’t bother exporting this last frame. If the box isn’t checked then the last frame will get exported.

Output from snapshots

Check this box if the scene contains a series of snapshots, instead of an animation.

Finally select the hierarchy (from those in the rif file) that this animation is for. That should be all that is required providing that the Max scene contains all the objects that appear within the hierarchy in the rif file. Should some objects be missing, you will be warned of this, and then asked to select a sequence that already exists. The export process will look at how the objects are positioned relative to their parents in the first frame of the selected animation, and use this relative positioning in the new sequence. This option is mainly provided so that if you have added some extra  objects to the hierarchy using the update hierarchy option, you will still be able to export animations created before the objects were added. For example, if you have added a hat that stays static relative to the head in most animations, then you can export an animation without the hat, and it will be assumed that the hat shouldn’t move relative to the head for that animation.