ABC File Format v6

Compiled in this format by Allan "Geist" Campbell <geist@mindspring.com>
Last updated on Jan 10, 1999.
 
 

Structures Used Here

CHAR 1 byte char
UCHAR 1 byte unsigned char
SHORT 2 bytes short int
USHORT 2 bytes unsigned short int
LONG 4 bytes long int
ULONG 4 bytes unsigned long int
FLOAT 4 bytes float
_STRING_ USHORT size
  <varies> ASCII string data (not zero-terminated)
_SECTION_ _STRING_ section name
  LONG absolute location of next section (from beginning of file)... -1 = last section
_VECTOR_ FLOAT x
  FLOAT y
  FLOAT z
_UVPAIR_ FLOAT u
  FLOAT v
_TRIANGLE_ _UVPAIR_[3] texture coords for each vertex of this face
  USHORT[3] face vertex indices
  CHAR[3] face normal (256 scale)
_VERTEX_ _VECTOR_ position
  CHAR[3] vertex normal (256 scale)
  UCHAR transformation index
  USHORT[2] replacements (indices of the model vertices that this vertex replaces -- only really used for 'extra' vertices:  vertices that got added for extra LODs)
_KEYFRAMEINFO_ ULONG Time index in milliseconds (absolute offset from beginning of current animation)
  _VECTOR_ BoundMin (for the current node and keyframe)
  _VECTOR_ BoundMax (for the current node and keyframe)
  _STRING_ Frame String (500 byte limit)
_NODEKEYFRAME_ _VECTOR_ translation
  FLOAT[4] rotations (quaternion)
_ANIMINFO_ _STRING_ AnimName (500 byte limit)
  ULONG Length of animation in milliseconds
  _VECTOR_ BoundMin (for the enitire anim)
  _VECTOR_ BoundMax (for the enitire anim)
  ULONG #Keyframes
  _KEYFRAMEINFO_[#Keyframes] General keyframe info (time index, bounds, & frame string)
  _NODEKEYFRAME_[#Keyframes] Translation and rotation info each keyfram (for the current node)
  [...] Recursively repeat from _NODEKEYFRAME_[#Keyframes], until no more children (in depth-first order).  ** Exactly corresponds to the node tree recursion established in the "Nodes" section.
 
 
 

Header Section

_SECTION_ "Header"
_STRING_ Model file token (e.g. "MonolithExport Model File v6")
_STRING_ Command String (500 byte limit)
 
 
 

Geometry Section

_SECTION_ "Geometry"
_VECTOR_ BoundMin (for the model)
_VECTOR_ BoundMax (for the model)
ULONG #LODs
USHORT[#LODs+1] Vertex Start Nums for each LOD (starting at LOD 0)
ULONG #Tris
_TRIANGLE_[#Tris] Face info (texture coords, vertex indices, & normals for each face)
ULONG #Verts
ULONG #NormalVerts (how many of the vertices are from the orignial list -- not added by a new level of detail)
_VERTEX_[#Verts] Vertex info (position, normal, transform index, and replacement vertices)
 
 
 

Nodes Section

_SECTION_ "Nodes"
_VECTOR_ BoundMin (for the current node)
_VECTOR_ BoundMax (for the current node)
_STRING_ Node name (500 byte limit)
USHORT Transformation Index (for the current node)
UCHAR Flags
ULONG #Children
[...] Recursively repeat from BoundMin, until no more children (in depth-first order)
 
 
 

Animation Section

_SECTION_ "Animation"
ULONG #Anims
_ANIMINFO_[#Anims] Array of all animation info
 
 
 

AnimDims Section

_SECTION_ "AnimDims"
_VECTOR_[#Anims] Dimensions for each animation
 
 
 

Notes

The sections can be in any order.