Formats/SSXTricky:MPF(PS2 Model): Difference between revisions

no edit summary
No edit summary
No edit summary
 
|Bone Weight Ref ID (In order to get ID you do (Number - 14)/4)
|}
<syntaxhighlight lang="c#" line="1" start="0">
public int U1;
public int HeaderCount;
public int HeaderOffset;
public int FileStart;
public List<MPFModelHeader> ModelList = new List<MPFModelHeader>();
 
public struct MPFModelHeader
{
//Main Header
public string FileName;
public int DataOffset;
public int EntrySize;
public int BoneDataOffset;
public int IKPointOffset;
public int MeshGroupOffset;
public int MeshDataOffset;
public int MaterialOffset;
public int NumberListOffset;
public int BoneWeightOffet;
 
//Counts
public int BoneWeightCount;
public int NumberListCount;
public int MeshGroupCount;
public int BoneDataCount;
public int MaterialCount;
public int IKCount;
public int MorphKeyCount;
public int FileID;
 
public List<MaterialData> materialDatas;
public List<BoneData> boneDatas;
public List<Vector3> iKPoints;
public List<GroupMainHeader> MeshGroups;
public List<BoneWeightHeader> boneWeightHeader;
public List<WeightRefList> numberListRefs;
}
 
public struct WeightRefList
{
public int SubCount;
public int Offset;
 
public List<int> WeightIDs;
}
 
public struct MaterialData
{
public string MainTexture;
public string Texture1;
public string Texture2;
public string Texture3;
public string Texture4;
 
public float FactorFloat;
public float Unused1Float;
public float Unused2Float;
}
 
public struct BoneData
{
public string BoneName;
public int ParentFileID;
public int ParentBone;
public int Unknown2;
public int BoneID;
 
public Vector3 Position;
public Vector3 Radians;
 
public float XRadian2;
public float YRadian2;
public float ZRadian2;
 
public float UnknownFloat1;
public float UnknownFloat2;
public float UnknownFloat3;
public float UnknownFloat4;
public float UnknownFloat5;
public float UnknownFloat6;
 
public int FileID;
public int BonePos;
}
 
 
public struct GroupMainHeader
{
public int GroupType; //1 Standard, 17 Shadow, 256 Morph
public int MaterialID;
public int Unknown;
public int LinkCount;
public int LinkOffset;
 
public List<WeightRefGroup> meshGroupSubs;
}
 
public struct WeightRefGroup
{
public List<int> weights;
 
public int LinkOffset;
public int LinkCount;
 
public List<MeshMorphHeader> MeshGroupHeaders;
}
 
public struct MeshMorphHeader
{
public int ModelOffset;
public int MorphKeyOffset; //Morph Target Offset
public int MorphKeyEntrySize; //Morph Target Entry Size
public int WeightRefGroup;
 
public List<MeshChunk> staticMesh;
public List<MorphKey> MorphKeyList;
}
 
public struct MorphKey
{
public int MorphPointDataCount;
 
public List<Vector3> morphData;
}
 
public struct BoneWeightHeader
{
public int Length;
public int WeightListOffset;
public int unknown; //Always 36
 
public List<BoneWeight> boneWeights;
}
 
public struct BoneWeight
{
public int Weight;
public int BoneID;
public int FileID;
}
 
public struct MeshChunk
{
public int StripCount;
public int Unknown1;
public int Unknown2;
public int VertexCount;
public List<int> Strips;
 
public List<Vector4> uv;
public List<Vector3> vertices;
public List<int> Weights;
public List<Face> faces;
public List<Vector3> uvNormals;
public List<MorphKey> MorphKeys;
}
 
 
</syntaxhighlight>