Autodesk documents the IFF container that Maya Binary uses (in its Maya and Alias
help, and through the Maya API’s MIffFile class) but not the chunks Maya
writes inside it. What is known of those comes from open-source readers such as
mayatools and cgkit. The IFF layer, below, is enough to walk any file; the meaning of
many chunks is not public.
IFF chunks
Every block has a four-character tag and a size; all numbers are big-endian.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | char[4] | tag | the chunk’s name, such as CREA |
| 4 | 4 | u32 | size | the length of the data, not counting this header or padding |
| 8 | size | bytes | data | then zero bytes up to the alignment of the enclosing group |
A group’s data begins with a second four-character tag, its type, followed by the chunks and groups it contains; its size covers the type and all of them. Readers can skip anything they do not understand by its size.
Group tags
| Tag | 2-byte alignment | 4-byte | 8-byte | Meaning |
|---|---|---|---|---|
| form | FORM | FOR4 | FOR8 | an ordered structure; its type says how to read its contents |
| catenation | CAT | CAT4 | CAT8 | independent objects in no particular order |
| list | LIST | LIS4 | LIS8 | objects sharing properties, with a tag naming what they are |
| properties | PROP | PRO4 | PRO8 | shared properties for the rest of the enclosing list |
The digit gives the alignment of the chunks inside: data is padded to a multiple of
4 or 8 bytes. Maya files use the 4 or 8 forms.
File layout
The file is one FOR4 (or FOR8) group of type
Maya (some files have MAYA). Its first child is a group of
type HEAD with the file information; then come the scene’s nodes and
connections.
00000000 46 4F 52 34 00 01 2A 3C 4D 61 79 61 46 4F 52 34
FOR4, a size of 76,348, the type Maya, then the
next groupFor FOR8 files, the UK National Archives’ PRONOM signature
(fmt/862) places twelve bytes, rather than four, between the tag and
Maya, which suggests a wider size field in that form; the exact layout
is not publicly documented, and the readers above handle only the four-byte form.