Call of Duty: XANIM formats

From COD Modding & Mapping Wiki
Revision as of 20:43, 28 August 2011 by CoDEmanX (talk | contribs) (Format specs XANIM_EXPORT v3 up to Black Ops)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Intermediate (*.XANIM_EXPORT)

Version 3

Header

// Export filename: `C:/Program Files/Activision/Call of Duty 4 - Modern Warfare/xanim_export/viewmodels/M16/m16_acog_ADS_down.XANIM_EXPORT`
// Source filename: `C:/Program Files/Activision/Call of Duty 4 - Modern Warfare/bin/maya/animation_src/viewmodel/m16/viewmodel_m16_animation.mb`
// Export time: Mon Jan 07 16:17:03 2008

ANIMATION
VERSION 3
  • // Comments (optional)
  • ANIMATION data type definition (magic word)
  • VERSION format version number


Bone list

NUMPARTS 2
PART 0 "tag_view"
PART 1 "tag_ads"
  • NUMPARTS number of parts / bones in file
  • PART description:
    • Part number
    • "name string"


Animation data

FRAMERATE 30
NUMFRAMES 13

FRAME 424
PART 0
OFFSET 0.0000 0.0000 0.0000
SCALE 1 1 1
X 1.0000 0.0000 0.0000
Y 0.0000 1.0000 0.0000
Z 0.0000 0.0000 1.0000

PART 1
OFFSET -3.2486 8.1971 -2.4117
SCALE 1 1 1
X 0.4341 -0.1372 -0.8904
Y -0.0802 -0.9903 0.1135
Z -0.8973 0.0221 -0.4409

...

FRAME 425
PART 0
...
  • FRAMERATE frames per second (animation speed)
  • NUMFRAMES number of animation frames
    ---
  • FRAME frame number
    Note: It doesn't necessarily start at 0!
    • PART part / bone number
    • OFFSET translation / location (3x float)
    • SCALE bone scale, always (?) 1 1 1
    • X part of rotation matrix
    • Y part of rotation matrix
    • Z part of rotation matrix


Notetracks

NOTETRACKS

PART 0
NUMTRACKS 1

NOTETRACK 0
NUMKEYS 2
FRAME 162 "weap_m16_clipout_plr"
FRAME 188 "weap_m16_clipin_plr"

PART 1
NUMTRACKS 0

PART 2
NUMTRACKS 0
...
  • NOTETRACKS magic word
    ---
  • PART part / bone number
  • NUMTRACKS number of notetracks, either 0 or 1. It's 0 for all parts except the first (if there are any notetrack nodes)

Only if NUMTRACKS 1:

  • NOTETRACK first (and only) notetrack
  • NUMKEYS number of notetrack nodes
  • FRAME notetrack node description:
    • Frame number (the when)
    • "string name" which will be used ingame for notetrack scripting


Differences in Notetrack lists

World at War and Black Ops by Treyarch differ a little bit from the original XANIM_EXPORT version 3:

CoD5

All XANIM_EXPORT files have an empty notetrack list, the nodes are separately stored as *.NT_EXPORT:

NUMKEYS 2
FRAME 29 "knife_stab_plr"
FRAME 43 "knife_pull_plr"
  • NUMKEYS number of notetrack nodes
  • FRAME description:
    • Frame number
    • "name string"


CoD7

At the bottom of all XANIM_EXPORT files you find this instead of a regular notetrack list:

NUMKEYS 0

If there are notetracks for an animation, they are separately stored as *.NT_EXPORT, which you have to specify in AssetManager to convert notetracks.

FIRSTFRAME 50
NUMFRAMES 93
NUMKEYS 7
FRAME 71 "sndnt#fly_python_open"
FRAME 71 "rmbnt#reload_clipout"
FRAME 78 "sndnt#fly_python_empty"
FRAME 101 "sndnt#fly_python_load"
FRAME 101 "rmbnt#reload_clipin"
FRAME 123 "sndnt#fly_python_close"
FRAME 123 "rmbnt#reload_rechamber"
  • FIRSTFRAME frame number of the first frame in the corresponding XANIM_EXPORT file
  • NUMKEYS number of notetrack nodes
    ---
  • FRAME description:
    • Frame number
    • "name string"