.MDX

.MDX files are 3D model files engineered and used by Blizzard Entertainment in its games. Several variations exist. The document focuses on the format used in Warcraft III and The Frozen Throne. The format comes in two flavors: .MDX and .MDL. .MDX is a binary format. It's harder to edit and has generally smaller filesizes. .MDL is a text format, which can be edited with a text editor. The text formatting increases the filesize. Several converters exist to convert between these formats.

The .MDX suffix also appears on CD and DVD image files, Media Data Extended, apparently native to Daemon Tools. Newer versions of Daemon Tools support it (e.g. Daemon Tools Lite v4.48.1).

Converters

This is a list of known converters to convert to and from the MDX formats.

Regarding the 3D model format:

Regarding the disc image format:

Editors

This is a list of known editors for manipulating the MDX files.

Code syntax

All code samples below will be given in a C/C++ like pseudo-code. To simplify syntax and readability some have been split into substructures. The following notations are used to describe this.

A few special fields exists which has specific meanings.

Other notations.

Datatypes

In the code below various datatypes are used. This is a table describing these datatypes.

General structure

All models have a tree hierarchy of components, or chunks. Many components lie directly under the root while others are subcomponents. The contents vary from type to type though most of them have the same kind of header as shown below.

struct Chunk
{
  UINT32 Tag;
  UINT32 ChunkSize;

  ...
};

Each chunk begins with two 32-bit unsigned integers. The first is a tag describing the type. It is constructed as a sequence of four 8-bit characters giving them a descriptive ID if viewed in a hex editor (or Notepad). The second integer tells the size of the chunk. This size does not include the tag and size itself; it includes only the following contents. The ChunkSize is useful for determining the number of subcomponents. It is useful for skipping whole chunks in the writing of a non-complete MDX loader, in which case the tag and size are read and then that many bytes are skipped to start reading the next chunk.

Some structures have IDs to refer to other objects. These are 0-based indexes, referring to the object in the order in which they appear in the file. The special value 0xFFFFFFFF (or -1 in signed format) represents "No ID", or in some cases "Many IDs". In the latter case, the reference has to be made in some other way, usually from the other object.

References and Credits

This article is issued from Wikipedia - version of the Sunday, December 07, 2014. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.