Header:
Code: Select all
05 00 00 00 04 00 00 00 01 00 00 00 00 00 02 00
# of vertices (4-byte integer)
# of triangles (4-byte integer)
# of bones (4-byte integer)
texture length in bytes (4-byte integer)
or in this case, replacing the values:
5 vertices, 4 triangles, 1 bone, 131072 bytes texture (width is always 256 pixels and it uses 16bpp, so that makes it 256x256x2 bytes, or 256 pixels tall)
Next comes the data for the triangles, the structure is the one mentioned in this other post
Given that the last 16 bytes for every triangle seem to always be zero, I'll just list the decimal values for the other ones, in the order (vertA, vertB, vertC), [(A_hor, B_hor, C_hor), (A_ver, B_ver, C_ver)], flags, unknown (normal?), parent triangle
Triangle 0: (4, 0, 3), [(128, 253, 253), (128, 3, 253)], 0, 68 {=&h00000044}, 3
Triangle 1: (4, 3, 1), [(128, 253, 3), (128, 253, 253)], 0, -46 {=&hFFFFFFD2}, -1
Triangle 2: (4, 1, 2), [(128, 3, 3), (128, 253, 3)], 0, -68 {=&hFFFFFFBC}, 1
Triangle 3: (4, 2, 0), [(128, 3, 253), (128, 3, 3)], 0, 46 {=&h0000002E}, 2
Next come the vertices, which have a 16-byte structure like this:
Xcoord (4-byte float)
Ycoord (4-byte float)
Zcoord (4-byte float)
bone (4-byte integer)
The corresponding decimal values for all 5 vertices are:
Vertex 0: (384.19043, 384.19043, 0), 0
Vertex 1: (-384.19043, -384.19043, 0), 0
Vertex 2: (-384.19043, 384.19043, 0), 0
Vertex 3: (384.19043, -384.19043, 0), 0
Vertex 4: (0, 0, 0), 0
Next, the info corresponding to the bones. Since there is a single bone and the first 48 bytes are used to store a zero-padded string with the name of the bone, which in this case is "Sun " for both files (yes, on the moon it is labeled "Sun " too), I will just show the last 16 bytes, which are:
Code: Select all
00 00 00 00 00 00 00 00 00 00 00 00 FF FF 00 00
Xcoord (4-byte float)
Ycoord (4-byte float)
Zcoord (4-byte float)
parent bone (2-byte integer)
unknown (2-byte integer) (seems always 0)
Or, for the current values:
Bone 0: (0, 0, 0), -1, 0
And finally, the texture data (in this case, as already established, 131072 bytes long). This is the only part that's different in both files.
I'm showing here two JPEG versions of the textures, with the corresponding mapping coordinates for the triangles and vertices marked over them by me.
Moon texture
Sun texture
Could you help me guess what the unknown value in the triangles may be?