The information in the M2 file is generally like this.
Global texture list
Global vertex list
- Position
- Blend Weights
- Blend indices
- Normal
- Texture coordinates
(4 levels for each model ?)
- Vertex indices (the vertices used in this level are the global vertex list indexes)
- Face indices (each triangle has three indexes in the global vertex list)
- Vertex properties (each vertex index has one, unknown)
- Submeshes (generally one for each material)
- Texture units (reference subemesh, global texture List Index, number of texture units bound)
Global volume (used for collision detection ?)
Animation (animations, global sequences)
Skeleton)
Additional rendering information: color, transparency, texture animation, model mixing, etc.
Special effects: strip, particle
Lighting
Camera
Struct modelheader {<br/> char ID [4]; // "md20" <br/> uint8 version [4]; <br/> uint32 namelength; // model name length (including/0) <br/> uint32 nameofs; // model name offset <br/> uint32 type; // model type? Always 0, 1 or 3 (mostly 0) </P> <p> uint32 nglobalsequences; // number of global sequences <br/> uint32 ofsglobalsequences; // offset to global sequences <br/> uint32 nanimations; // Number of animation sequences <br/> uint32 ofsanimations; // offset to animation sequences <br/> uint32 NC; <br/> uint32 ofsc; <br/> uint32 Nd; // always 201 or 203 depending on Wow client version <br/> uint32 ofsd; <br/> uint32 nbones; // Number of bones <br/> uint32 ofsbones; // offset to Bones <br/> uint32 NF; // bone lookup table <br/> uint32 ofsf; </P> <p> uint32 nvertices; // Number of vertices <br/> uint32 ofsvertices; // offset to vertices <br/> uint32 nviews; // number of views (SLS versions ?) 4 For every model <br/> uint32 ofsviews; // offset to views </P> <p> uint32 ncolors; // Number of color definitions <br/> uint32 ofscolors; // offset to color definitions </P> <p> uint32 ntextures; // Number of textures <br/> uint32 ofstextures; // offset to texture definitions </P> <p> uint32 ntransparency; // Number of transparency definitions <br/> uint32 ofstransparency; // offset to transparency definitions <br/> uin T32 Ni; // always unused? <Br/> uint32 ofsi; <br/> uint32 ntexanims; // Number of texture animations <br/> uint32 ofstexanims; // offset to texture animations <br/> uint32 ntexreplace; <br/> uint32 ofstexreplace; </P> <p> uint32 ntexflags; // Number of blending mode definitions <br/> uint32 ofstexflags; // offset to blending mode definitions <br/> uint32 NY; // bone lookup table <br/> uint32 ofsy; </P> <p> uint32 ntexlookup; // Number of texture Lo Okup table entries <br/> uint32 ofstexlookup; // offset to texture lookup table </P> <p> uint32 ntexunitlookup; // Texture unit definitions? <Br/> uint32 ofstexunitlookup; <br/> uint32 ntransparencylookup; // Number of transparency lookup table entries <br/> uint32 ofstransparencylookup; // offset to transparency lookup table <br/> uint32 ntexanimlookup; // Number of texture animation lookup table entries <br/> uint32 ofstexanimlookup; </P> <p> float floats [14]; </P> <p> uint32 nboundingtriangles; <br/> uint32 ofsboundingtriangles; <br/> uint32 nboundingvertices; <br/> uint32 ofsboundingvertices; <br/> uint32 nboundingnormals; <br/> uint32 ofsboundingnormals; </P> <p> uint32 nattachments; <br/> uint32 ofsattachments; <br/> uint32 nattachlookup; <br/> uint32 ofsattachlookup; <br/> uint32 NQ; <br/> uint32 ofsq; <br/> uint32 nlights; // Number of lights <br/> uint32 ofslights; // offset to lights <br/> uint32 ncameras; // number of cameras <br/> uint32 ofscameras; // offset to cameras <br/> uint32 NT; <br/> uint32 ofst; <br/> uint32 nribbonemitters; // Number of ribbon emitters <br/> uint32 ofsribbonemitters; // offset to ribbon emitters <br/> uint32 nparticipant leemitters; // Number of particle emitters <br/> uint32 ofsparticleemitters; // offset to particle emitters <br/> };
The knife looks pretty, so you can use it:
Hexadecimal File Analysis: