This document describes version 1.6 of the MM3D file format. Data that is available only in specific versions will be noted below. All other data is common to every version of the file format. Previous releases of Misfit Model 3D that do not read all data segments should still be able to load model files, though some information may be lost.
The MM3D file format was designed to be easy to extend and easy to read to extract just the information you want. The header will tell you what information is included in the file and give you offsets to the location where the information is in the file.
Data sections have their own header before the data. Each data type is either a fixed size or a variable size. If the data size is fixed (constant, Type B) the data size immediatley preceeds the data block of the data section. If the data size is variable (Type A) the data size preceeds each data element.
MM3D uses Intel byte order (least significant byte first). Bytes are 8 bits. The types specified in the Type fields below are ints (signed integers) or uints (unsigned integers). The type designation is followed by a number which designates the number of bits in that integer. The type may be multiplied by a constant or variable number to get the full length of the field. Variables are generally data fields from earlier sections in the file. In the data chunks there is also a float32 which is a 32-bit floating point number and an ASCIIZ which is every byte up to and including the next null byte. ASCIIZ strings are truncated to 1024 bytes (including the terminating null) if necessary.
As of MM3D version 1.4 (and later 1.3 versions) all text strings are encoded as UTF-8. Versions 1.2 and earlier (as well as early 1.3 versions) used extended ASCII encoding. If you want your MM3D models to be usable in new and older versions of MM3D you should use only standard ASCII characters (0-127) for model object names and texture filenames.
NOTE: Items marked in red are still under development. They will not be finalized until the next revision of the file format is complete. They are provided for reference in the interim and are subject to change without notice.
The file header is 12 bytes.
| Data | Type | Notes | Description |
|---|---|---|---|
| MAGIC_NUMBER | int8 * 8 | 'MISFIT3D' | If the first 8 bytes do not match this string it is not an MM3D file |
| MAJOR_VERSION | uint8 | 0x01 | Major version number, the file format may be incompatible with newer or older filters if the major version number does not match |
| MINOR_VERSION | uint8 | 0x06 | Minor version number, older filters should be able to get useful data from the file but may not underll unnates
Copyright © 2004-2007, Kevin Worcester |