3D model format
Stores 3D models, more investigation needed.
If "signed" was not added assume unsigned value
Thanks to Martin for initial format reversing.
- Magic -
- some files use version
1.82instead, 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.71in the game binary
- some files use version
|0x0||0x18?||Magic - |
|0x18||0x4||Type - 0 = shadow & skybox; 1 = track; 2 = car|
You have to add 0x148 to each value to get proper pointers
Bold IDs are in all files, rest of them are specific for tracks
Some of these are either unused or possibly repurposed
All blocks seems to be 32-bit alignedIf the offset/size address is empty it's always set to zero
|0||0x20||0xb4||Martin think it might be some sort of colider|
|2||0x28||0xbc||UV texture data?|
|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?|
|11||0x4c||0xe0||LOD data, maybe something more|
|12||0xe4||for non-tracks it's size of 1 divided by 16, unknown for tracks|
|14||0x58||for tracks offset marks end of file|
|18||0xfc||stores size of 20 divided by 0x90|
|21||0x74||0x108||List of points, looks like AI curve|
|0xC||float||unknown, might be weight|
|0x3||byte||unknown, might be weight|
|0x6||short||face table start index|
|0x10||short||unknown, might be texture index|
|0x0||float||some kind of matrix|
|0x40||int ?||unknown four ints?|
Probably not surface, Martin used that name in his script, but it feels more like a singular mesh by the look of binary file itself
|0x2C||int||UVs start index|
|0x30||int||vertices start index|
|0x34||int||polys start index|
I'm skipping most of this block, as it's unused or used directly by the engine to store some of the calculated addresses
If the number of LODs is set to less than 3, later ones just copy id from previous ones
|0x0||short||Same as file type at 0x18|
|0x2||short||Unknown, always set to 1 for normal files, 2 for tracks and 4 for cars|
|0x24||int||number of meshes (surfaces) for each LOD|
|0x48||int||ID of first mesh for LOD 0|
|0x4c||int||ID of first mesh for LOD 1|
|0x50||int||ID of first mesh for LOD 2|
|0x54||int||ID of first mesh for LOD 3|
|0x58||int||Number of additional LODs, can be 0-3|
|0x0||signed int||If there is any data it's set to 1, last one is always set to -1|
12 floats and 4 ints, seems similar to 3 points (each 4th float is always 1.0)
0x28 bytes, seems like there are 4 floats (perhaps intensity/R/G/B values?), rest unused?
Long, each element 0x90 bytes long
Block 21 holds list of vertices, possibly defining track for AI.
There are 5 curves in this block, 255 points each.
Curve 0, 2-4 are track curves, curve 1 is for the charging station.
Chall1 only has one curve.
Block 22 holds the same number of elements as is the number of curves. Each element is 0x1C long
WIP, so far data from one track
|0x4||int||starting vertex offset|