BSM wrote:... understood something more about the TreeNodes part:
- bothriolepis has 3 childs in TreeNodes: swim, standanim and dying; I have found 3 childs in ChildsDef chunk, but just 1 of them points to a MeshesDef chunk (the other 2 are null pointers), and that MeshesChunk corresponds to the SubObject00.
Explanations for myself about the last findings, in case I lose some notes
and some questions in case you have some idea.
PackFile: icewaste_animals.gsf
ObjectsTable, first entry:
Code: Select all
0x0001002C bothriolepis
43 68 61 72 Type = "Char"
38 FE 00 00 ObjectNameAddress = 0x00010030 + 0xFE38 = 0x0001FE68
2C FE 00 00 MeshDefAddress = 0x00010034 + 0xFE2C = 0x0001FE60
02 00 00 00 MeshDefCount = 2
1C A0 00 00 MaterialsDefsAddress = 0x0001003C + 0xA01C = 0x0001A058
01 00 00 00 MaterialsDefsCount = 1
00 00 00 00 ??? = 0
FF FF 00 00 ??? = 65535
00 01 00 00 ??? = 256
FF 00 00 00 ??? = 255
00 00 00 80 ???Address = null
00 00 00 80 ???Address = null
00 00 00 00 ??? = 0
48 AF 10 BF MinX = -0.565
FB 41 7E BF MinY = -0.993
64 B8 37 BE MinZ = -0.179
4A AF 90 3F MaxX = 1.130
DA B5 FD 3F MaxY = 1.982
57 E6 E1 3E MaxZ = 0.441
10 FE 00 00 ChildsDefAddress = 0x00010078 + 0xFE10 = 0x0001FE88
03 00 00 00 ChildsCount = 3
Follow the pointer to the ChildDefs:
Code: Select all
0x0001FE88
A4 01 FF FF 20 00 00 00 01 00 00 00 0x0001002C 78 04 FF FF 0A 00 00 00 0x00010324
98 01 FF FF 00 00 00 80 00 00 00 00 0x0001002C
8C 01 FF FF 00 00 00 80 00 00 00 00 0x0001002C
3 childs, but just the first one points to a chunk of data at 0x00010324
Now check the SubObjectsTable, first entry:
Code: Select all
0x000101D0 Helper01
43 68 61 72 Type = "Char"
30 01 00 00 ObjectNameAddress = 0x000101D4 + 0x0130 = 0x00010304
74 04 00 00 DefPointersTableAddress = 0x000101D8 + 0x0474 = 0x0001064C
01 00 00 00 DefPointersCount = 1
00 00 00 80 null
01 00 00 00 1
0A 00 00 00 TransformationsCount = 10
And follow the pointer to DefPointersTable:
Code: Select all
Char 0x0001064C (1) (10) Helper01 D8 FC FF FF - 808 = 0x00010324
And it points to the same chunk of data at 0x00010324
However, that chunk contains no mesh, but transformations (data used to animate a mesh or set of meshes):
Code: Select all
SubObject00 for bothriolepis 1/1 (Char Helper01)
0x00010324
05 00 00 40 ChunkType = 0x40000005
00 00 00 00
5B F9 F4 16 Guid = 0x16F4F95B
00 00 00 80
FF FF FF FF -1
00 00 80 BF -1.000
00 00 01 00 65536
1C 00 00 00 DataChunkAddress = 0x00010340 + 0x001C = 0x0001035C
A8 01 00 00 NextHeaderAddress = 0x00010344 + 0x01A8 = 0x000104EC
01 00 00 00 NextHeadersCount = 1
0A 00 00 00 TransformationsCount = 10
00 00 00 00 0.000
00 00 00 00 0.000
00 00 00 00 0.000
0x0001035C Data
40 bytes * 10 transformations = 400 bytes = 0x0190
0x000104EC Header
01 Index = 1
02 Always 2?
01 Values found are 0, 1 and 2
00 Always 0?
0C 00 00 00 DataChunkAddress = 0x000104F0 + 0x000C = 0x000104FC
A8 00 00 00 NextHeaderAddress = 0x000104F4 + 0x00A8 = 0x0001059C
01 00 00 00 NextHeadersCount = 1
0x000104FC Data
16 bytes * 10 transformations = 160 bytes = 0x00A0
0x0001059C Header
02 Index = 2
02 Always 2?
00 Values found are 0, 1 and 2
00 Always 0?
0C 00 00 00 DataChunkAddress = 0x000105A0 + 0x000C = 0x000105AC
00 00 00 80 NextHeaderAddress = null
00 00 00 00 NextHeadersCount = 0
0x000105AC Data
16 bytes * 10 transformations = 160 bytes = 0x00A0
0x0001064C DefPointer for SubObject00
D8 FC FF FF 0x0001064C - 808 = 0x00010324
All tested chunks of this type (on different .gsf packages) uses the same structure. It seems like a way to build frames for animations. Can you check in game if that amount correspond to an amount of frames? If so, my guess from data is that it is used some amount of transformations to build the different frames:
for bothriolepis
swim - 2 transformations
standanim - I have no data
dying - I have no data
for dunkleosteus
attack_front - 41 transformations
swim_1 - 31 transformations
swim_2 - 21 transformations
swim_3 - 16 transformations
swim_left - 1 transformation
swim_right - 1 transformation
standanim - 31 transformations
dying - 41 transformations
being the amount of frames the number found in the TreeNodes. For dunkleosteus:
attack_front, index=0, childs=7 { 0, 2, 3, 4, 5, 1, 6 }
swim_1, index=1, childs=6 { 7, 10, 8, 11, 9, 12 }
swim_2, index=2, childs=6 { 7, 14, 10, 13, 15, 16 }
swim_3, index=3, childs=6 {17, 19, 20, 18, 21, 22 }
swim_left, index=4, childs=0
swim_right, index=5, childs=0
standanim, index=6, childs=29 { 23, 25, 26, 27, 28, 29, 30, 31, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 24, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33 }
dying, index=7, childs=3 { 34, 35, 36 }
However, I have tested the corresponding chunks for several entries, and I find 2 indices for bothriolepis.swim, and none for bothriolepis.standanim and bothriolepis.dying; same weirdness for dunkleosteus, found 7 indices for attack_front (that's correct, but the order 1,5,2,3,4,6,7 seems weird), and 6 indices for swim_1 (that's correct), but found 6 indices for dying (expected just 3). I will try to check more chunks and see what I find.
About the data found, 1 block of 40*transformationsCount bytes for each animation, and several blocks of 16*transformationsCount bytes, I guess a block for each "frame". The 16 bytes maybe just a quaternion (4 floats used to store a rotation), but the 40 bytes are still of unknown purpose for me; any idea?