Gillius's Programming

ANM File Format

The ANM File format is a supplement to information containing information about animations about an object. What the ANM file does is separates data into logical components. The animation data is assumed to be skeletal animation with all of the joints' keyframes being in a linear time space. The ANM file breaks the joints into animation sets then breaks the linear list of keyframes on those joints into different animations.

The associated file that the ANM supplements is called the Model File. The Model File consists of a model with a skeleton consisting of a hierarchy of joints and keyframes on these joints. Each bone has a name.

The ANM file format also inserts event information to parallel the keyframe list. This data specifies events (callbacks) to occur at that time.

There are 6 types of lines in the ANM file format. The file format is case-sensitive on all values and is parsed line-by-line. Strings/values denoted by <> or [] must not have spaces or tabs in them, but may have any amount of space or tab characters between them. <> means a required value, [] is an optional value.

 

 

 

Order

The ANM file consists of the previously defined 4 significant lines in order defined by this finite state diagram:

Essentially, each ANM file consists of 1 or more animation sets, and each animation set consists of 1 or more BL, 0 or more EV, and 1 or more AN. For a given AS, all BLs for that set appear before all EVs that appear before all AN lines.

Example

#lines starting with # and blank lines are ignored

as LeftArm
bl lShoulder +children
#for Cylindro, this would be the same as:
#bl lElbow +parent +children
ev 48 Hi
an 0 50 Hello
an 56 100 Wave

as Head
bl neck
bl head
an 0 50 Bobbing

as Legs
bl lHip +parent +children
bl rHip +children
ev 5 footstep_sound
ev 10 footstep_sound
an 0 24 walk
an 30 50 jog
an 55 100 run

This example is based on the Cylindro model whose skeleton is described by the following tree: