5,389
edits
m (→Header) |
m (→Corpse chunks) |
||
Line 65: | Line 65: | ||
*A space for notes (160 bytes) : often the name of the file the corpse was taken from when packing the array. | *A space for notes (160 bytes) : often the name of the file the corpse was taken from when packing the array. | ||
*A link to the [[OBD:ONCC|ONCC]] (model that should be used for the corpse) : that's 4 bytes as usual. | *A link to the [[OBD:ONCC|ONCC]] (model that should be used for the corpse) : that's 4 bytes as usual. | ||
*Then, 19 bones, each of them defined by absolute orientation and position (unlike in a TRAM, where orientations are relative)<br>Every bone is ( | *Then, 19 bones, each of them defined by absolute orientation and position (unlike in a TRAM, where orientations are relative)<br>Every bone is (3*3 + 3)*4 = 48 bytes, so that's 19*48 = 912 bytes. | ||
*Finally, an axis-aligned bounding box ( | *Finally, an axis-aligned bounding box (2*3*4 = 24 bytes) | ||
The total size of a corpse is thus 1100 bytes. | The total size of a corpse is thus 1100 bytes. | ||
Line 72: | Line 72: | ||
:three 3D vectors '''x''', '''y''' and '''z''', each of length 1, at right angles with each other, and ordered "directly" | :three 3D vectors '''x''', '''y''' and '''z''', each of length 1, at right angles with each other, and ordered "directly" | ||
:(like Oni's world axes : if '''x''' points left and '''y''' points up then '''z''' points to ''front'', not back). | :(like Oni's world axes : if '''x''' points left and '''y''' points up then '''z''' points to ''front'', not back). | ||
:Each one of those vectors is stored as 3 floats ( | :Each one of those vectors is stored as 3 floats (3*4 bytes), first '''x''', then '''y''', then '''z''' (so 3*3*4 = 36 bytes in total). | ||
:The absolute position '''R''' of a bone (of its parent node, actually) is stored as 3 floats right after the orientation trihedron. | :The absolute position '''R''' of a bone (of its parent node, actually) is stored as 3 floats right after the orientation trihedron. | ||
:That's another 12 bytes, so 48 bytes in total. | :That's another 12 bytes, so 48 bytes in total. |