The properties of a node follow its name. Each starts with a one-byte type code, an ASCII letter, and its data follows at once, without padding or alignment. There are three kinds: single values, arrays of numbers, and strings or raw bytes. All numbers are little-endian.
Single values
| Code | Byte | Size | Type |
|---|---|---|---|
Y | 0x59 | 2 | signed 16-bit integer |
C | 0x43 | 1 | boolean: the lowest bit of the byte |
I | 0x49 | 4 | signed 32-bit integer |
F | 0x46 | 4 | 32-bit IEEE 754 float |
D | 0x44 | 8 | 64-bit IEEE 754 double |
L | 0x4C | 8 | signed 64-bit integer |
Arrays
| Code | Byte | Element |
|---|---|---|
f | 0x66 | 32-bit float |
d | 0x64 | 64-bit double |
l | 0x6C | signed 64-bit integer |
i | 0x69 | signed 32-bit integer |
b | 0x62 | boolean, one byte each |
The type code is followed by a 12-byte array header, then the contents:
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | ArrayLength | the number of elements |
| 4 | 4 | u32 | Encoding | 0 for raw elements, 1 for a zlib stream |
| 8 | 4 | u32 | CompressedLength | the number of bytes of contents that follow |
| 12 | CompressedLength | bytes | contents | with encoding 0, ArrayLength elements back to back; with encoding 1, a zlib stream (RFC 1950) that inflates to them |
No other encoding value has been seen. The array header stays 32-bit in version 7500 and later. Writers choose which arrays to compress; Blender, copying Autodesk’s converter, compresses arrays longer than 128 bytes and stores shorter ones raw.
Strings and raw data
| Code | Byte | Layout |
|---|---|---|
S | 0x53 | u32 length, then that many bytes of text, not terminated by a zero |
R | 0x52 | u32 length, then that many bytes of raw data |
Strings are usually UTF-8 and can contain zero bytes. Raw data carries things such as
the 16-byte FileId and embedded texture files (Content).
Object names
An object’s name and its class are joined into one string. In binary files the name
comes first, then the bytes 00 01, then the class:
Cube, 00 01, Model. ASCII files write the same
thing the other way round, as Model::Cube.
Worked example
69 03 00 00 00 00 00 00 00 0C 00 00 00 00 00 00 00
00 01 00 00 00 FD FF FF FF
i array of three elements, raw, 12 bytes: 0, 1 and −3, the
PolygonVertexIndex of one triangleThe last index of each polygon in PolygonVertexIndex is stored as minus
itself minus one, so −3 here means vertex 2 and ends the polygon (see
Scene nodes).