Hi AT! Long time no see, glad to see you back.
Well, everytime I preview this post my linefeeds get removed just
like last night so I'll do this in one go and cross my fingers.
Edit: Sigh! It came out sans linefeeds again. I edited it but it
looks ok in the editor. Saved it and it looked ok again. Then I
logged out and came back and the linefeeds are gone again.
Might have to do this offline and just post a pdf of it.
Header:
Code:
serialization::archive
3 4 4 4
264 0
267 0 0 0
2 0 184.550750732 0
40 0 -7.09150409698 1.21208238602 -2.87348890305
Red 40 is the count for the blocks of 17 ints and 9 floats as follows:
Then 867 20-byte blocks like these (I removed most of them for brevity):
Code:
nstuff = 867
0 0 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
0 0 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
1 0 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
2 0 8 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
3 0 8 -4 15 0 -4 -97 4 -90 54 -55 1 -1 -1 -1 -1 -1 -1
4 0 8 -4 15 0 -4 -81 4 -90 54 -55 1 -1 -1 -1 -1 -1 -1
5 0 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
6 0 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
7 0 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
.
.
.
857 27 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
858 28 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
859 28 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
860 28 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
861 29 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
862 29 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
863 30 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
864 30 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
865 30 4 -4 15 0 -4 -1 -1 -90 54 -55 1 -1 -1 -1 -1 -1 -1
So far I don't know what any of that stuff is for so please feel free
to speculate. Now we get to recognizable data. A granny footer
for the above and then triangle data. I've removed the actual
data just to show the structure:
Next vertex data:
Code:
header: 22 0 1 0 34 0 0 0 23 0 3 0 0 0 109 14 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 35 0 1 0 35 0 0 0 0 0 0 0 0 0
nverts = 3693
footer: 0 0 0 0 34 0 1 0 36 0 0 0 35 0 35 0 0 0 0 0 5 0 0 0 0 0
Next comes 5 byte quad blocks:
Code:
quad byte block 1:
header: 40 0 1 0 37 0 0 0 8 0 0 0 0 0
nquads = 3693
footer: 0 0 0 0 39 0 1 0 38 0 0 0 40 0 37 0 0 0
quad byte block 2:
header: 40 0 39 0 0 0 9 0 0 0
nquads = 3693
footer: 0 0 0 0 39 0 40 0 0 0 40 0 39 0 0 0
quad byte block 3:
header: 40 0 41 0 0 0 3 0 0 0
nquads = 3693
footer: 0 0 0 0 39 0 42 0 0 0 40 0 41 0 0 0
quad byte block 4:
header: 40 0 43 0 0 0 10 0 0 0
nquads = 3693
footer: 0 0 0 0 39 0 44 0 0 0 40 0 43 0 0 0
quad byte block 5:
header: 40 0 45 0 0 0 4 0 0 0
nquads = 3693
footer: 0 0 0 0 39 0 46 0 0 0 40 0 45 0 0 0
Those of you who remember the .mesh format will recognize the
3 0 0 0 int and the 10 0 0 0 int as being codes for cube normalized
RGB encoded vertex normals and tangents, respectively. Now we're
seeing 8 0 0 0, 9 0 0 0, and 4 0 0 0 codes. Caliban has kindly asked
his software guy and these are for:
8 - light indices in rgb, ambient occlusion in .a
9 - light attenuation, ambient occlusion in .a
4 - texture coordinates encoded as hi and lo bytes.
I'll add a little more to this in another post. Let's just finish the format
for now.
Code:
Bounding sphere?, 8 zero bytes, 4 floats, then 8 zero bytes, then footer
0 0 0 0 0 0 0 0
-80.7888946533 -0.4720692635 -93.5925827026 +60.7462997437
0 0 0 0 0 0 0 0
footer: 19 0 1 0 47 0 0 0 20 0 2 0 0 0 20 0 48 0 0 0
Then another complete structure follows with much the same layout.
Some of the granny strings are different, like for the first triangle
group and the vertex data. Let's skip listing this and go to the textures
and really big granny strings.
At this point we are about 200,000 bytes into a 1.5 Mbyte file so we are
only about 15% done. That's the first two structures: a village called
buildinglod0 and then "litter" called buildinglitterlod0, like
barrels and the like.
Bookmarks