-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrmdl_notes.txt
69 lines (58 loc) · 1.67 KB
/
rmdl_notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Magic: RMDL
Version: 00 00 01 01
BOM: 7F 7F FF FF (x24)
Model Count: u32
Pointer to model pointers
Padding: 12 bytes
Pointer to matrix info
Model header:
Model ID?: u32
Pointer to display list
Vertex data attribute count: u32
Pointer to vertex data
MaterialData package entry
Unknown: u32 (Always 01D0E75D?)
Unknown: u32 (Always 0?)
Bounding box (Min XYZ, Max XYZ): f32[6]
Unknown: u32
Unknown: u32 (Always 0?)
Unknown: u32 (Always 2CA33BDB? "none" when passed through FNV-1)
Unknown (padding?): u32 * 3
Pointer to Bone to Matrix binding info
Pointer to Bone names
Pointer to Bone info
If there is bone info, GX_VA_POSMATIDX is enabled with 8-bit index
Vertex data header:
Vertex attribute data entries...
Vertex attribute data entry:
Vertex attribute array type: u8 (GX_VA_POS and friends)
Vertex attribute type: u8 ($ & 0b111 is component size, $ >> 3 is component type)
Padding? always zero: u16
Pointer to attribute data: u32
Bone to Matrix binding info:
Pointer to start of Bone to Matrix bindings
Pointer to identity 3x4 matrix for each binding
Number of matrix bindings: u32
Bone to Matrix Binding:
Weights: f32[4]
Bone index: u8[4] (FF == no bone)
Bone names:
Number of bones: u32
For each bone, the bone name (probably FNV-1 32-bit): u32
Bone info:
Number of bones: u32
Pointer to bone names: &[u32; num_bones]
Pointer to bone transform matrix data: &[[f32; 4 * 4]; num_bones]
Matrix info:
Pointer to matrix header
Matrix header:
Number of 4*4 matrix entries: u32
Pointer to unknown data
Pointer to start of matrix data (f32[4][4] * num matrix entries)
Pointers inside Pig:
00000034: 000043C0
00000060: 000000E0
00000068: 000020E0
000000AC: 00003D78
000000B0: 000043A0
000000B4: 000043C8