Luigi's Mansion:Docs/Model Formats/MP (File Format)
Summary[edit | edit source]
MP files can be fully edited. It can be extracted and (custom) imported.
In Luigi Mansion , MP files are the collision maps, to make sure Luigi doesn't accidentally go through walls and so on.
Format Information[edit | edit source]
The MP are the collision map format used in Luigi's Mansion.
The following wikitable have been interpreted from the Luigi's Mansion Collision MP list written by ItsEasyActually. It may not be accurate to the list exactly.
Header[edit | edit source]
Offset | Integer | Description | |
---|---|---|---|
0x00 | float3 | Position | |
0x12 | float3 | Rotation | |
0x24 | float3 | Scale | |
End of header |
Data Header[edit | edit source]
Offset | Integer | Description | |
---|---|---|---|
0x00 | ui32 | Vertex Buffer Offset | |
0x04 | ui32 | Unknown1 (Directly after Vert Buffer) | |
0x08 | ui32 | Unknown2 (After Unknown1) | |
0x0C | ui32 | Face Data Offset | |
0x10 | ui32 | Unknown3 (Directly after Face Data) | |
0x14 | ui32 | Unknown4 (Same as Unknown3) | |
0x18 | ui32 | Unknown4 Unknown5 (After Unknown3/Unknown4) | |
End of Data header |
Vertex Buffer[edit | edit source]
(Undefined length)
Offset | Integer | Description |
---|---|---|
0x00 | float3 | X,Y,Z Position |
Unknown1[edit | edit source]
It's structured. The data aligns to 12 byte rows.
Unknown2[edit | edit source]
The data aligns directly to 24 byte structures.
Offset | Integer |
---|---|
0x00 | ui16 |
0x02 | ui16 |
0x04 | ui16 |
0x06 | ui16 |
0x08 | ui16 |
0x0A | ui16 |
0x0C | ui16 |
0x0E | ui16 |
0x10 | byte4 |
0x14 | byte4 |
Unknown3[edit | edit source]
Structures seem to be mostly null, but when data is seen, it's usually in ui32 structures.
Face Data[edit | edit source]
Structures begin with 0xFFFF, which signifies the beginning of a set of face data. The face data itself is either in tri-fan or tri-strips, and another 0xFFFF signifies when it ends and a new set begins. When you reach a 0xFFFFFFFF, the data ends.
Offset | Integer |
---|---|
0x00 | ui16 v1 |
0x02 | ui16 v2 |
0x04 | ui16 v3 |
0x06 | ui16 normal |
0x08 | ui16 n1 |
0x0A | ui16 n2 |
0x0C | ui16 n3 |
0x0E | ui16 unk4 |
0x12 | float unk5 |
0x14 | u16 unk6 |
0x16 | u16 unk7 |
Unknown5[edit | edit source]
Offset | Integer | |
---|---|---|
0x00 | u16 | xFFFF |
0x02 | ui8 | x0A |
0x00 | ui8 | x40 |
The beginning is full of 0xFFFF0A and 0x40 takes up the end of the structure.
Misc[edit | edit source]
Offset | Integer |
---|---|
0x24 | vertex offset |
0x26 | unk1 |
0x28 | face offset |
0x30 | unk2 |
vert count = unk1 - vertoffset/12 face count = unk2 - faceoffset/24
Luigi's Mansion MP Doc[edit | edit source]
Luigi's Mansion Collision Format (.mp files) Written by ItsEasyActually --Header-- 0x00 float3 Position 0x12 float3 Rotation 0x24 float3 Scale --Data Header-- 0x00 ui32 Vertex Buffer Offset 0x04 ui32 Unknown1 (Directly after Vert Buffer) 0x08 ui32 Unknown2 (After Unknown1) 0x0C ui32 Face Data Offset 0x10 ui32 Unknown3 (Directly after Face Data) 0x14 ui32 Unknown4 (Same as Unknown3) *From my research* 0x18 ui32 Unknown5 (After Unknown3/Unknown4) --Vertex Buffer-- (Undefined length) 0x00 float3 X,Y,Z Vert Total = (Unknown1-Vertex Buffer Offset)/12 --Unknown1-- It's structured, but I have no idea what. The data aligns to 12 byte rows. --Unknown2-- 0x00 ui16 0x02 ui16 0x04 ui16 0x06 ui16 0x08 ui16 0x0A ui16 0x0C ui16 0x0E ui16 0x10 byte4 0x14 byte4 The data aligns directly to 24 byte structures. I have no idea what they do, but the structures resemble what I formatted them as. --Face Data-- FF FF [Face Data] FF FF [Face Data] FF FF FF FF Structures begin with 0xFFFF, which signifies the beginning of a set of face data. The face data itself is either in tri-fan or tri-strips, and another 0xFFFF signifies when it ends and a new set begins. When you reach a 0xFFFFFFFF, the data ends. --Unknown3-- Structures seem to be mostly null, but when data is seen, it's usually in ui32 structures (I think) --Unknown5-- 0x00 ui16 xFFFF 0x02 ui8 x0A 0x00 ui8 x40 The beginning is full of 0xFFFF0A and 0x40 takes up the end of the structure. They seem to be related in size somehow, but I'm not entirely sure how. ---Update by SpaceCats and arookas--- 0x24 - vertex offset 0x26 - unk1 0x28 - face offset 0x30 - unk2 vert count = unk1 - vertoffset/12 face count = unk2 - faceoffset/24 --Face Data-- 0x00 - u16 v1 0x02 - u16 v2 0x04 - u16 v3 0x06 - u16 normal 0x08 - u16 n1 0x0A - u16 n2 0x0C - u16 n3 0x0E - u16 unk4 0x12 - float unk5 0x14 - u16 unk6 0x16 - u16 unk7