3D model format: Difference between revisions
No edit summary |
No edit summary |
||
Line 45: | Line 45: | ||
!Description | !Description | ||
|- | |- | ||
|0 | |'''0''' | ||
|0x20 | |'''0x20''' | ||
|0xb4 | |'''0xb4''' | ||
|track stuff??? | |track stuff??? | ||
|- | |- | ||
|1 | |'''1''' | ||
|0x24 | |'''0x24''' | ||
|0xb8 | |'''0xb8''' | ||
|polygons data? | |polygons data? | ||
|- | |- | ||
|2 | |'''2''' | ||
|0x28 | |'''0x28''' | ||
|0xbc | |'''0xbc''' | ||
|UV texture data? | |UV texture data? | ||
|- | |- | ||
|3 | |'''3''' | ||
|0x2c | |'''0x2c''' | ||
|0xc0 | |'''0xc0''' | ||
|vertex data? | |vertex data? | ||
|- | |- | ||
|4 | |'''4''' | ||
|0x30 | |'''0x30''' | ||
|0xc4 | |'''0xc4''' | ||
|faces data? | |faces data? | ||
|- | |- | ||
|5 | |'''5''' | ||
|0x34 | |'''0x34''' | ||
|0xc8 | |'''0xc8''' | ||
|Textures names | |Textures names | ||
|- | |- | ||
|6 | |'''6''' | ||
|0x38 | |'''0x38''' | ||
|0xcc | |'''0xcc''' | ||
|Offsets to texture names, absolute addresses in file | |Offsets to texture names, absolute addresses in file | ||
|- | |- | ||
|7 | |'''7''' | ||
|0x3c | |'''0x3c''' | ||
|0xd0 | |'''0xd0''' | ||
|Each element is 16B long, ?, ?, float, float | |Each element is 16B long, ?, ?, float, float | ||
|- | |- | ||
|8 | |'''8''' | ||
|0x40 | |'''0x40''' | ||
|0xd4 | |'''0xd4''' | ||
|Holds IDs of elements in 7 | |Holds IDs of elements in 7 | ||
|- | |- | ||
|9 | |'''9''' | ||
|0x44 | |'''0x44''' | ||
|0xd8 | |'''0xd8''' | ||
|surface transforms data? | |surface transforms data? | ||
|- | |- | ||
|10 | |'''10''' | ||
|0x48 | |'''0x48''' | ||
|0xdc | |'''0xdc''' | ||
|surfaces data? | |surfaces data? | ||
|- | |- | ||
|11 | |'''11''' | ||
|0x4c | |'''0x4c''' | ||
|0xe0 | |'''0xe0''' | ||
| | | | ||
|- | |- | ||
Line 110: | Line 110: | ||
|Offset is 0x0; the size is non-zero, for shadow it's 1, with one <code>00</code> byte, size is checked for tracks | |Offset is 0x0; the size is non-zero, for shadow it's 1, with one <code>00</code> byte, size is checked for tracks | ||
|- | |- | ||
|13 | |''13'' | ||
|0x54 | |''0x54'' | ||
|0xe8 | |''0xe8'' | ||
| | |''unused'' | ||
|- | |- | ||
|14 | |''14'' | ||
|0x58 | |''0x58'' | ||
|0xec | |''0xec'' | ||
| | |''unused (probably)'' | ||
|- | |- | ||
|15 | |15 | ||
Line 210: | Line 210: | ||
|track stuff | |track stuff | ||
|- | |- | ||
|33 | |''33'' | ||
|0xa4 | |''0xa4'' | ||
|0x138 | |''0x138'' | ||
| | |''unused'' | ||
|- | |- | ||
|34 | |''34'' | ||
|0xa8 | |''0xa8'' | ||
|0x13c | |''0x13c'' | ||
| | |''unused'' | ||
|- | |- | ||
|35 | |''35'' | ||
|0xac | |''0xac'' | ||
|0x140 | |''0x140'' | ||
| | |''unused'' | ||
|- | |- | ||
|36 | |''36'' | ||
|0xb0 | |''0xb0'' | ||
|0x144 | |''0x144'' | ||
| | |''unused'' | ||
|} | |} |
Revision as of 22:59, 4 January 2021
Stores 3D models, more investigation needed.
Thanks to Martin for initial format reversing.
- Magic -
PMD V1.83
- some files use version 1.82 instead, but they aren't used by the game, the engine in PC version won't recognise anything other than 1.83
- There is one unused mention of
PMD V1.71
in the game binary
Offset | Size | Description |
---|---|---|
0x0 | 0x18? | Magic - PMD V1.83
|
0x18 | 0x4 | Type - 0 = shadow & skybox; 1 = track; 2 = car |
0x1C | 0x4 | Zeroes? |
0x20 | 0x94? | offsetsTable |
0xB4 | 0x94? | offsetsTable sizes |
offsetsTable
You have to add 0x148 to each value to get proper pointers to elements 0-12 (later ones will probably need different bias)
Blocks 0-11 are 32-bytes aligned, 12 is unaligned and starts directly after this table.
ID | offset | size offset | Description |
---|---|---|---|
0 | 0x20 | 0xb4 | track stuff??? |
1 | 0x24 | 0xb8 | polygons data? |
2 | 0x28 | 0xbc | UV texture data? |
3 | 0x2c | 0xc0 | vertex data? |
4 | 0x30 | 0xc4 | faces data? |
5 | 0x34 | 0xc8 | Textures names |
6 | 0x38 | 0xcc | Offsets to texture names, absolute addresses in file |
7 | 0x3c | 0xd0 | Each element is 16B long, ?, ?, float, float |
8 | 0x40 | 0xd4 | Holds IDs of elements in 7 |
9 | 0x44 | 0xd8 | surface transforms data? |
10 | 0x48 | 0xdc | surfaces data? |
11 | 0x4c | 0xe0 | |
12 | 0x50 | 0xe4 | Offset is 0x0; the size is non-zero, for shadow it's 1, with one 00 byte, size is checked for tracks
|
13 | 0x54 | 0xe8 | unused |
14 | 0x58 | 0xec | unused (probably) |
15 | 0x5c | 0xf0 | track stuff |
16 | 0x60 | 0xf4 | track stuff |
17 | 0x64 | 0xf8 | |
18 | 0x68 | 0xfc | |
19 | 0x6c | 0x100 | |
20 | 0x70 | 0x104 | |
21 | 0x74 | 0x108 | track stuff |
22 | 0x78 | 0x10c | track stuff |
23 | 0x7c | 0x110 | track stuff |
24 | 0x80 | 0x114 | track stuff |
25 | 0x84 | 0x118 | track stuff |
26 | 0x88 | 0x11c | track stuff |
27 | 0x8c | 0x120 | track stuff |
28 | 0x90 | 0x124 | track stuff |
29 | 0x94 | 0x128 | track stuff |
30 | 0x98 | 0x12c | track stuff |
31 | 0x9c | 0x130 | track stuff |
32 | 0xa0 | 0x134 | track stuff |
33 | 0xa4 | 0x138 | unused |
34 | 0xa8 | 0x13c | unused |
35 | 0xac | 0x140 | unused |
36 | 0xb0 | 0x144 | unused |