LithTech ABC v6 File Format

Compiled in this format by Allan "Geist" Campbell <geist@mindspring.com>
Version 1.4 -- Last updated on June 19, 1999.
 
  • Header Chunk
  • 12 bytes / _CHUNK_ ChunkInfo
  • 8 bytes / _STRING_ ChunkName
  • 2 bytes / USHORT Length / "6"
  • 6 bytes / CHAR Data [6] / ASCII string (not zero-terminated) / "Header"
  • 4 bytes / ULONG NextChunkLocation / offset, from beginning of file, to next chunk
  • 30 bytes / _STRING_ ModelFileToken
  • 2 bytes / USHORT Length / "28"
  • 28 bytes / CHAR Data [28] / ASCII string (not zero-terminated) / "MonolithExport Model File v6"
  • (varies; usually 2 bytes) / _STRING_CommandString
  • 2 bytes / USHORT Length / (500 byte limit) / usually "0"
  • (varies; usually 0 bytes) / CHAR Data [...] / ASCII string (not zero-terminated) / usually ""

  •  
  • Geometry Chunk
  • 14 bytes / _CHUNK_ ChunkInfo
  • 10 bytes / _STRING_ ChunkName
  • 2 bytes / USHORT Length / "8"
  • 8 bytes / CHAR Data [8] / ASCII string (not zero-terminated) / "Geometry"
  • 4 bytes / ULONG NextChunkLocation / offset, from beginning of file, to next chunk
  • 12 bytes / _VECTOR_ BoundMin / (for the entire model)
  • 4 bytes / FLOAT x
  • 4 bytes / FLOAT y
  • 4 bytes / FLOAT z
  • 12 bytes / _VECTOR_ BoundMax / (for the entire model)
  • 4 bytes / FLOAT x
  • 4 bytes / FLOAT y
  • 4 bytes / FLOAT z
  • 4 bytes / ULONG NumLODs
  • (NumLODs+1)*2 bytes / USHORT VertexStartNum [0 ... NumLODs] / for each LOD (starting at 0)
  • 4 bytes / ULONG NumTris
  • NumTris*33 bytes / _TRIANGLE_ FaceInfo [0 ... NumTris-1]
  • 8 bytes / _UVPAIR_ TexCoords1 / for vertex 1 on this face
  • 4 bytes / FLOAT u
  • 4 bytes / FLOAT v
  • 8 bytes / _UVPAIR_ TexCoords2 / for vertex 2 on this face
  • 4 bytes / FLOAT u
  • 4 bytes / FLOAT v
  • 8 bytes / _UVPAIR_ TexCoords3 / for vertex 3 on this face
  • 4 bytes / FLOAT u
  • 4 bytes / FLOAT v
  • 2 bytes / USHORT VertexIndex1
  • 2 bytes / USHORT VertexIndex2
  • 2 bytes / USHORT VertexIndex3
  • 3 bytes / _NORMAL_ FaceNormal / normalized to length of 128
  • 1 byte / CHAR x
  • 1 byte / CHAR y
  • 1 byte / CHAR z
  • 4 bytes / ULONG NumVerts
  • 4 bytes / ULONG NormalVerts / how many of the vertices are from the orignial list (not added by a new LOD)
  • NumVerts*20 bytes / _VERTEX_ VertexInfo [0 ... NumVerts-1]
  • 12 bytes / _VECTOR_ Position / (relative to object's origin)
  • 4 bytes / FLOAT x
  • 4 bytes / FLOAT y
  • 4 bytes / FLOAT z
  • 3 bytes / _NORMAL_ VertexNormal / normalized to length of 128
  • 1 byte / CHAR x
  • 1 byte / CHAR y
  • 1 byte / CHAR z
  • 1 byte / UCHAR TransformationIndex
  • 4 bytes / USHORT Replacements [0 ... 1] / indices of the model vertices that this vertex replaces -- only really used for 'extra' vertices:  vertices that got added for extra LODs

  •  
  • Nodes Chunk
  • 11 bytes / _CHUNK_ ChunkInfo
  • 7 bytes / _STRING_ ChunkName
  • 2 bytes / USHORT Length / "5"
  • 5 bytes / CHAR Data [5] / ASCII string (not zero-terminated) / "Nodes"
  • 4 bytes / ULONG NextChunkLocation / offset, from beginning of file, to next chunk
  • 12 bytes / _VECTOR_ BoundMin / (for the current node)
  • 4 bytes / FLOAT x
  • 4 bytes / FLOAT y
  • 4 bytes / FLOAT z
  • 12 bytes / _VECTOR_ BoundMax / (for the current node)
  • 4 bytes / FLOAT x
  • 4 bytes / FLOAT y
  • 4 bytes / FLOAT z
  • (varies) / _STRING_ NodeName
  • 2 bytes / USHORT Length / (500 byte limit)
  • (varies) / CHAR Data [...] / ASCII string (not zero-terminated)
  • 2 bytes / USHORT TransformationIndex
  • 1 byte / UCHAR Flags
  • 4 bytes / ULONG NumMDVerts / number of vertices for mesh-deformed nodes / usually "0"
  • NumMDVerts*2 bytes; usually 0 bytes / USHORT MDVertList [0 ... NumMDVerts-1] / holds the array of vertex indices for mesh-deformed nodes
  • 4 bytes / ULONG NumChildren
  • ... recursively repeat (from BoundMin to NumChildren), until no more children (in depth-first order)

  •  
  • Animation Chunk
  • 15 bytes / _CHUNK_ ChunkInfo
  • 11 bytes / _STRING_ ChunkName
  • 2 bytes / USHORT Length / "9"
  • 9 bytes / CHAR Data [9] / ASCII string (not zero-terminated) / "Animation"
  • 4 bytes / ULONG NextChunkLocation / offset, from beginning of file, to next chunk
  • 4 bytes / ULONG NumAnims
  • (varies) / _ANIMINFO_AnimData [0 ... NumAnims-1]
  • (varies) / _STRING_ AnimName
  • 2 bytes / USHORT Length / (500 byte limit)
  • (varies) / CHAR Data [...] / ASCII string (not zero-terminated)
  • 4 bytes / ULONG Length / length of total animation in milliseconds
  • 12 bytes / _VECTOR_ BoundMin / (for the entire animation)
  • 4 bytes / FLOAT x
  • 4 bytes / FLOAT y
  • 4 bytes / FLOAT z
  • 12 bytes / _VECTOR_ BoundMax / (for the entire animation)
  • 4 bytes / FLOAT x
  • 4 bytes / FLOAT y
  • 4 bytes / FLOAT z
  • 4 bytes / ULONG NumKeyframes
  • (varies) / _KEYFRAMEINFO_ KeyframeData [0 ... NumKeyframes-1]
  • 4 bytes / ULONG TimeIndex / time index/location (in milliseconds) from beginning of animation
  • 12 bytes / _VECTOR_ BoundMin / (for the current frame/anim/node)
  • 4 bytes / FLOAT x
  • 4 bytes / FLOAT y
  • 4 bytes / FLOAT z
  • 12 bytes / _VECTOR_ BoundMax / (for the current frame/anim/node)
  • 4 bytes / FLOAT x
  • 4 bytes / FLOAT y
  • 4 bytes / FLOAT z
  • (varies, but usually 2 bytes) / _STRING_ FrameString
  • 2 bytes / USHORT Length / (500 byte limit) / usually "0"
  • (varies; usually 0 bytes) / CHAR Data [...] / ASCII string (not zero-terminated) / usually ""
  • NumNodes*((NumKeyframes*28 bytes)+24 bytes) / _NODEANIM_ NodeAnimData [0 ... NumNodes-1]
  • NumKeyframes*28 bytes / _NODEKEYFRAME_ NodeKeyframeData [0 ... NumKeyframes-1]
  • 12 bytes / _VECTOR_ Translation / position (relative to parent node)
  • 4 bytes / FLOAT x
  • 4 bytes / FLOAT y
  • 4 bytes / FLOAT z
  • 16 bytes / _QUATERNION_ Rotation / rotation info (relative to parent node)
  • 4 bytes / FLOAT x
  • 4 bytes / FLOAT y
  • 4 bytes / FLOAT z
  • 4 bytes / FLOAT w
  • 24 bytes / Unknown(NodeBBox?) / not exactly sure what this is, but it is very possible that it is bounding box (BoundMin/BoundMax) info for each node in this animation
  • ... recursively repeat NodeKeyframeData [0 ... NumKeyframes-1], until no more child nodes (in depth-first order)  ** Exactly corresponds to the node tree recursion established in the Nodes Chunk

  •  
  • AnimDims Chunk (optional)
  • 14 bytes / _CHUNK_ ChunkInfo
  • 10 bytes / _STRING_ ChunkName
  • 2 bytes / USHORT Length / "8"
  • 8 bytes / CHAR Data [8] / ASCII string (not zero-terminated) / "AnimDims"
  • 4 bytes / ULONG NextChunkLocation / offset, from beginning of file, to next chunk / usually "-1"
  • NumAnims*12 bytes / _VECTOR_ Dimensions [0 ... NumAnims-1] / total dimensions of each animation
  • 4 bytes / FLOAT x
  • 4 bytes / FLOAT y
  • 4 bytes / FLOAT z

  •  

    NOTES