OBD:CRSA: Difference between revisions

2,798 bytes added ,  17 February 2006
m
no edit summary
No edit summary
mNo edit summary
Line 8: Line 8:
http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/crsa_a.gif
http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/crsa_a.gif


==Array header==


==Corpse==
What's in a corpse?
*A space for notes (160 bytes) : often the name of the file the corpse was taken 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.
*Then, 19 bones, each of them defined by absolute orientation and position (unlike in a TRAM, where orientations are relative)<br>Every bone is (3x3 + 3)x4 = 48 bytes, so that's 19x48 = 912 bytes.
*Finally, an axis-aligned bounding box (2x3x4 = 24 bytes)
The total size of a corpse is thus :
;What's in a bone?:The absolute orientation is defined in a "heavy" way ''via'' an orthonormal trihedron :
: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).
:Each one of those vectors is stored as 3 floats (3x4 bytes), first '''x''', then '''y''', then '''z''' (so 3x3x4 = 36 bytes in total).
:The absolute position '''R''' is stored as 3 floats right after the orientation trihedron. That's another 12 bytes, so 48 bytes in total.
:''Reminder : the 2nd coordinate of'' '''R''' ''aka'' y ''is the height of the bone (of its parent node)''
;Example:first corpse of '''00565-.CRSA''' in '''level3_Final.dat'''.
:Offsets are measured from the start of the corpse chunk.
{|border=1 cellspacing=0
|+Notes and ONCC link
!Offset
!Raw hex/string
!Value
!Meaning
|-
|0x00
|colspan=2|_lvl_3_Intro_TCL_A_corpse.dat
|probably the name of the source file
|-
|0xA0
|01 36 02 00
|566
|Link to 00566-TCTF_lite_1.[[OBD:ONCC|ONCC]]
|}
{|border=1 cellspacing=0
|+Bone orientation and position
!Offset
!Bone
!Raw hex
!Value/Meaning
|-
|0xA4
|Pelvis
|
|'''x''' = (, , )<br>'''y''' =  (, , )<br>'''z''' = (, , )<br>'''R''' = (, , )
|-
|
|Lt Thigh
|
|'''x''' = (, , )<br>'''y''' =  (, , )<br>'''z''' = (, , )<br>'''R''' = (, , )
|-
|
|Lt Calf
|
|'''x''' = (, , )<br>'''y''' =  (, , )<br>'''z''' = (, , )<br>'''R''' = (, , )
|-
|
|Lt Foot
|
|'''x''' = (, , )<br>'''y''' =  (, , )<br>'''z''' = (, , )<br>'''R''' = (, , )
|-
|
|Rt Thigh
|
|'''x''' = (, , )<br>'''y''' =  (, , )<br>'''z''' = (, , )<br>'''R''' = (, , )
|-
|
|Rt Calf
|
|'''x''' = (, , )<br>'''y''' =  (, , )<br>'''z''' = (, , )<br>'''R''' = (, , )
|-
|
|Rt Foot
|
|'''x''' = (, , )<br>'''y''' =  (, , )<br>'''z''' = (, , )<br>'''R''' = (, , )
|-
|
|Mid
|
|'''x''' = (, , )<br>'''y''' =  (, , )<br>'''z''' = (, , )<br>'''R''' = (, , )
|-
|
|Chest
|
|'''x''' = (, , )<br>'''y''' =  (, , )<br>'''z''' = (, , )<br>'''R''' = (, , )
|-
|
|Neck
|
|'''x''' = (, , )<br>'''y''' =  (, , )<br>'''z''' = (, , )<br>'''R''' = (, , )
|-
|
|Head
|
|'''x''' = (, , )<br>'''y''' =  (, , )<br>'''z''' = (, , )<br>'''R''' = (, , )
|}
Last
{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
|- ALIGN=CENTER BGCOLOR="#FFDDBB"