XSIDump - The 'Append Shape Animation...' Command
Why to append shape animations ? -The Problem-
Shape Animations are done in the Animation Mixer, which gives the ability to mix two or more
shapes. This powerful feature is both convenient and inconvenient at the same time. It's convenient
because of all the flexibility it provides to animators. And it's inconvenient because exporting
such data to a simpler environment (e.g. a realtime 3D engine) can be tricky.

The dotXSI Exporter that ships with XSI decided to cut through all the trouble that might arise from
complex situations, by simply plotting all the shape animation. A unique shape is defined and added
per frame of the animation. The exporter blindly does the plotting without caring whether the shape
it's plotting has been already defined previously in the animation or not.

The income of this behaviour is a significant increase in the final size of the dotXSI file, which
-logically- should be avoided. Big files load slower, and you might end up filling your game's
memory with redundant shapes that can be safely discarded. XSIDump 1.1 solved this with
its Shape Animation Filter facility. The command efficiently managed to remove redundant
shapes and keys from the exported dotXSI file. (Note that it doesn't filter transitions very well, it
keeps the plotted shapes untouched because -in the end- they're unique shapes, but the command works
like a charm with constant transitions -as in Figure 1 above-).

Not just this. The dotXSI FTK is really slow and memory hungry when it comes to writing big dotXSI files.
Lengthy animations make things worse. Suppose you have a scene that's 5000 frames long. Exporting such
a scene means plotting 5000 shapes for each shape animated object! You could easily run out of memory
(and eventually out of your work!) if you attempt to export such a scene. So what to do? How to workaround
such a problem? That's when the 'Append Shape Animation...' command comes in...
Why to append shape animations ? -The Solution-
One nifty feature in the dotXSI Exporter is that it doesn't export shape animation keys that fall outside
of your animation's time. For example, you have an animated scene that's 500 frames length, starting from frame
1 and ending at frame 500. Before you export it to dotXSI, set the start frame to 200 and the ending frame to 300.
The exporter will only plot and export 100 shapes, those that fall in the range from 200 to 300. (Side note:
FCurves -e.g. rotation- are NOT affected by this trick, they'll still export from 1 to 500).
OK, now you can export the whole scene in portions. In the case above, you would export the scene in 5 sessions
(files). Each defining 100 frames of the animation: 1-100, 101-200, 201-300, 301-400, 401-500.
Next step: You use XSIDump to filter all of the 5 files. If you don't do this, you get back to the case where
you have one huge dotXSI file that can't be dealt with.
All right, now you have 5 optimized copies of the dotXSI files. Next, you need to group them back into
one dotXSI file that defines the whole animation. You open XSIDump, and from the Operations menu,
select the Append Shape Animation... command.
Appending the files :
When you invoke the Append Shape Animation... command, you'll be faced with the
dialog box shown in Figure 4 below.

In the First File field, enter (or browse for) the first dotXSI file of your animation.
In the Second File field, specify the file that follows the first file in time.
Once you enter the two files, a new button will (magically) pop-up, shown in Figure 5 below.

Once the 'Process' button appears, click it to analyze the files and extract what shape animations
can be appended. The white square in the middle of the dialog box will list them as in Figure 6.

From the 'Affected Shape Animations' list, choose the animations you want to append,
or click 'Select All' to append all shape animations in the file.
The only thing left is to specify the 'Output File'. Type in a valid file name
and the 'Append' button will come to life.
You might've already noticed that orphan little check box sitting at the bottom of the dialog box.
Left to it you read 'Adjust scene timing to fit appended Shape Animations'. With this option
enabled, XSIDump will use the first file's scene start time, and the second file's scene end time to
specify the new file's scene time. So, if the first file's time is 1-100 and the second file's time
range is 101-200, then the output file's time will be 1-200. Disabling this option will set the output
file's time to match the first file (i.e. 1-100).

Click Append, and XSIDump will append the animations and save the output file in the same
format as the First file.
But what about the other files ?
Now you have a file that covers the time 1-200. You can directly repeat the command to append the
newely created file with the file that covers 201-300, and so on.
Note that exporting your scene in portions each one covering 100 frames might not be suitable. If you
have a lengthy animation then you must try to maximize the time range as possible. Based on the complexity
of the scene, you might be able to export 1000 frames at once, or -if it's a complex scene with many
shape animated objects- you might be forced to export only 50 frames a time.
Also, you might filter the final file that resulted from appending all the small files. This can
also reduce the final file's size because there might be some shapes that are identical across the small
files.
See Also:
XSIDump 1.3.
Please send comments, bugs and suggestions to this address.