XAF file format
Home Up XMF File format XSF Skeleton format XRF file format XAF file format XPF Morph format Rotations

 

XAF Animation file format

Sample of a rotation of Bone 1 about the X axis.

The values in the animation take the place of the Rotation and Translation entries in the Skeleton file, causing the bones to move and in turn causing mesh sections attached to those bones to also move.

Note that in my experiments I found that an animation could have Rotations only or Rotations and Translations. If you only want to translate (move) the bone you'll need to include the rotations anyway or it won't work.

An avatar animation or pose will generally only need one translation for the pelvis node, though your software may export them anyway. Its possible to shrink the file by editing them out.

Durations are expressed in seconds not frames. In the previewer several options are expressed in terms of frames or frame counts. Going by IMVU instructions: "and make sure the frames per second is set to 30" it looks as if the previewer assumes 30 frames per second.

If the last keyframe of the animation is not at the very end of the animation's duration then movement will continue on beyond that keyframe in an extrapolation of the path up to that time. If the animation is meant to loop then it is up to you to ensure that the animation returns to the start.

<HEADER MAGIC="XAF" VERSION="910" />
<ANIMATION DURATION="4" NUMTRACKS="1">
    <TRACK BONEID="1" NUMKEYFRAMES="4">
        <KEYFRAME TIME="0.0">
            <ROTATION>0 0 0 -1</ROTATION>
        </KEYFRAME>
        <KEYFRAME TIME="1.0">
            <ROTATION>-0.707 0 0 -0.707</ROTATION>
        </KEYFRAME>
        <KEYFRAME TIME="2.0">
            <ROTATION>-1 0 0 0</ROTATION>
        </KEYFRAME>
        <KEYFRAME TIME="3.0">
            <ROTATION>-0.707 0 0 0.707</ROTATION>
        </KEYFRAME>
    </TRACK>
</ANIMATION>

 


The track tag

The <TRACK> tag has been observed with the following other attributes:

  1. TRANSLATIONREQUIRED
  2. TRANSLATIONISDYNAMIC
  3. HIGHRANGEREQUIRED

These do not appear to be documented, I have been unable to find them in version 0.10.0 of CAL3D and they may be specific to 3DSMAX exports.