so i have sent MagnusII a pm on LF, here is what he had to say:
public class TriMeshHeader
{
public static int KotorI_Size = 332;
public static int KotorII_Size = 340;
#region Private Members
private int _KotorVersion;
/*0*/ private UInt32 _FunctionPointer0; /* 4216656 K1, 4216592 K1 SkinMesh, 4216640 K1 DanglyMesh
* 4216880 K2, 4216816 K2 SkinMesh, 4216864 K2 DanglyMesh
* */
private UInt32 _FunctionPointer1; /* 4216672 K1, 4216608 K1 SkinMesh, 4216624 K1 DanglyMesh
* 4216896 K2, 4216832 K2 SkinMesh, 4216848 K2 DanglyMesh
* */
private UInt32 _OffsetToFaces;
private UInt32 _FacesCount;
private UInt32 _DuplicateFacesCount;
private KotorVertex _BoxMin;
private KotorVertex _BoxMax;
private float _Radius;
private KotorVertex _AveragePoint;
/*60*/ private float[] _DiffuseColor = new float[3];
private float[] _AmbientColor = new float[3];
private UInt32 _Shininess_Tentative; /* 0 (mostly), 1, 2, 3, 4, 5, 7, 8, 13
* Blend Factor, SamplerStageStates, TextureOperation?
*/
private byte[] _Texture1Name = new byte[32];
/*120*/ private byte[] _Texture2Name = new byte[32];
private byte[] _Texture3Name = new byte[12];
private byte[] _Texture4Name = new byte[12];
private UInt32 _OffsetToVerticesIndexesCounts;
/*180*/ private UInt32 _VerticesIndexesCountsCount; // = 1
private UInt32 _DuplicateVerticesIndexesCountsCount;
private UInt32 _OffsetToVerticesOffsets;
private UInt32 _VerticesOffsetsCount; // = 1
private UInt32 _DuplicateVerticesOffsetsCount;
/*200*/ private UInt32 _OffsetToTrimeshInvertedCountersArray;
private UInt32 _TrimeshInvertedCountersArrayItemsCount; /*
* = 1, always one UInt32
* sequence goes like this: first
* trimesh node is 98, then:
* 98..00, 100
* 199..101, 200
* 399..?
*/
private UInt32 _DuplicateTrimeshInvertedCountersArrayItemsCount;
private Int32[] _Unknown1 = new Int32[3]; // -1, -1, 0
/*224*/ private byte _SaberUnknown1; // 3 for non-saber
private byte _SaberUnknown2; // 0 for non-saber
private byte _SaberUnknown3; // 0 for non-saber
private byte _SaberUnknown4; // 0 for non-saber
private byte _SaberUnknown5; // 0 for non-saber
private byte _SaberUnknown6; // 0 for non-saber
private byte _SaberUnknown7; // 0 for non-saber
private byte _SaberUnknown8; // 0 for non-saber, 17 for sabers
private Int32 _SparkleTentative; /* 0 for most, 1 for water and clouds and
* one piece of the GUI
* Maybe some sparkle or reflex effects,
* or a specular lighting modifier?
*/
private Rotation _UnknownRotation = null;
private Int32 _MDXDataSize; /* mostly 24, 32, 40, 76 with a smattering of other values
* if textures = 0 almost always 24, except 15 models with -1 and 23 with 60
* if textures = 1, almost always 32, with several 64 and 68, and a bunch of 100 and 0
* if textures = 2, it's either 40 (mostly) or 76
*/
private UInt32 _MDXDataBitmap; /* which data is present in MDX
* according to MDXDatabits
*/
/*260*/ private Int32 _OffsetToVerticesInMDX; // = 0 for most, -1 for lightsabers or when verticescount = 0
private Int32 _OffsetToNormalsInMDX; // = 12
private Int32 _OffsetToUnknownInMDX; // = -1, never present
private Int32 _OffsetToUVsInMDX; // = 24 if present
private Int32 _OffsetToUV2sInMDX; /* -1, 24, 32
* if mdxdatasize = 24 then it's always -1
* if mdxdatasize = 32 it's almost always -1 except for 14 models where it's 24
* if mdxdatasize = 40 or 76 then it's always 32
*/
private Int32 _OffsetToUV3sInMDX; // = -1, never present
private Int32 _OffsetToUV4sInMDX; // = -1, never present
private Int32 _OffsetToUnknownStructInMDX; /* -1, 24, 32, 40
* if mdxdatasize = 24 or 32 or 40 then it's always -1
* if mdxdatasize = 76 then it's always 40
* this is basically whatever info is in the MDX
* after the last texture UV coordinates and
* before the bones. It is 36 bytes long.
* the last three of these values seem to be some sort of
* "weighted normals"... they definitely have something
* to do with normals as at least one of these triplets
* was equal to the normal in c_hutt --> eye01, and the others
* have similar values
*/
private Int32 _OffsetToUnusedMDXStructure1; // -1
private Int32 _OffsetToUnusedMDXStructure2; // -1
/*300*/ private Int32 _OffsetToUnusedMDXStructure3; // -1
private UInt16 _VerticesCount;
private UInt16 _TexturesCount;
private UInt16 _HasLightmap; //0, 1
private UInt16 _Shadow; // 0, 256
private UInt16 _Render; // 0, 256
private UInt16 _Unknown2; // ??
private float _TotalArea; // sum of faces' areas
/*320*/ private UInt32 _Unknown4; // = 0
private UInt32 _Kotor2Unknown1;
private UInt32 _Kotor2Unknown2;
private UInt32 _OffsetToMDXData;
private UInt32 _OffsetToVertices
i'd wager the four textures are, the base, the lightmap, the bumpmap and the environment map.