OBD:CRSA: Difference between revisions
Jump to navigation
Jump to search
m (design) |
m (besser so... ^_^) |
||
Line 20: | Line 20: | ||
{{OBDtr| 0x01C | int32 |FF8000| 14 00 00 00 | 20 | array capacity }} | {{OBDtr| 0x01C | int32 |FF8000| 14 00 00 00 | 20 | array capacity }} | ||
{{OBDtrBK}} | {{OBDtrBK}} | ||
{{OBDtr2|0x000 | char[160]|FFC8C8| _lvl_3_Intro_TCL_A_corpse.dat| space for notes; probably the name of the source file }} | |||
{{OBDtr2|0x000 | char[160]|FFC8C8| | |||
{{OBDtr| 0x0A0 | link |FFFFC8| 01 36 02 00 | 566 | link to 00566-TCTF_lite_1.[[OBD:ONCC|ONCC]] }} | {{OBDtr| 0x0A0 | link |FFFFC8| 01 36 02 00 | 566 | link to 00566-TCTF_lite_1.[[OBD:ONCC|ONCC]] }} | ||
|- ALIGN=CENTER VALIGN=TOP | |||
{ | |0xA4||matrix|| | ||
{|border=1 cellspacing=0 style="white-space:nowrap" | |||
|-BGCOLOR="#C8FFC8" | |||
|C1 74 66 3F||00 78 3E 3D||45 AB DD 3E | |||
|-BGCOLOR="#C8FFC8" | |||
|A6 8B 7D 3D||19 73 7F BF||EE 67 B0 BC | |||
|-BGCOLOR="#C8FFC8" | |||
|03 AE DC 3E||82 2C 3D 3D||8D B2 66 BF | |||
{ | |-BGCOLOR="#C8FFC8" | ||
|C5 FA E7 41||2E 2B CB C1||58 B4 45 C1 | |||
|} | |||
| | |||
{|border=1 cellspacing=0 style="white-space:nowrap" | |||
|0.900219||0.046501||0.432947 | |||
|- | |||
|0.061901||-0.997850||0.021534 | |||
|- | |||
|0.431015||0.0461850||-0.901162 | |||
|- | |- | ||
| | |28.997446||-25.396084||-12.356529 | ||
|} | |||
|ALIGN=LEFT|transform matrix for the pelvis (in world space) | |||
{{OBDtrBK|0xD4-0x434 : transform matrices for the other 18 bones}} | |||
|- ALIGN=CENTER VALIGN=TOP | |||
{ | |0x434||AABB|| | ||
{|border=1 cellspacing=0 style="white-space:nowrap" | |||
|-BGCOLOR="#C8FFFF" | |||
|D4 22 8C 41||95 50 E9 C1||BC 31 9C C1 | |||
|-BGCOLOR="#C8FFFF" | |||
|75 E6 14 42||2E 20 B1 C1||07 B1 D3 C0 | |||
|} | |||
| | |||
{|border=1 cellspacing=0 style="white-space:nowrap" | |||
|17.517006||-29.164347||-19.524284 | |||
|- | |||
|37.225056||-22.140713||-6.615360 | |||
|} | |||
|ALIGN=LEFT|bounding box for the whole corpse | |||
|} | |} | ||
;Bones | |||
:Here is one of the few places where the bone count 19 is apparently hardcoded. | |||
:I.e., custom characters with weird bone counts won't work. See, e.g., [[OBD:TRIA#Bones|TRIA]] | |||
;What's in a bone? | ;What's in a bone? | ||
:The transformation matrix and | :The transformation matrix (3D rotation/scale/shear/mirror and translation) | ||
::can be seen as four 3D vectors '''X''', '''Y''', '''Z''', and '''R''' in world space. | |||
: | |||
: | |||
:If a bone mesh has a vertex at (x, y, z) in its native coordinates, | :If a bone mesh has a vertex at (x, y, z) in its native coordinates, | ||
::then the actual position of that vertex in the level will be '''R''' + x ''' | ::then the actual position of that vertex in the level will be '''R''' + x '''X''' + y '''Y''' + z '''Z''' | ||
:That's the transformation defined by the matrix and | :That's the transformation defined by the 3x4 transform matrix. | ||
Reminder : the 2nd coordinate of '''X''', '''Y''', '''Z''', and '''R''' is the height. | |||
;Authoring | |||
:The script command [[make_corpse]](filename) creates a separate corpse file in the Oni folder. | |||
:The pose of the corpse is taken from the player character. The format is roughly as above. | |||
:The contents of the files thus created can then be inserted as elements in a level's CRSA. | |||
{{OBD_File_Footer | type=CRSA | prev=CONS | next=DOOR | name=Corpse Array | family=Level}} | {{OBD_File_Footer | type=CRSA | prev=CONS | next=DOOR | name=Corpse Array | family=Level}} |
Revision as of 18:40, 25 September 2007
|
The first image shows the header and the beginning of the first element. The second image the end of it.
Offset | Type | Raw Hex | Value | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0x000 | res_id | 01 35 02 00 | 565 | 00565-.CRSA | ||||||||||||||||||||||||
0x004 | lev_id | 01 00 00 06 | 3 | level 3 | ||||||||||||||||||||||||
0x008 | char[12] | AD DE | dead | unused | ||||||||||||||||||||||||
0x014 | int32 | 11 00 00 00 | 17 | array size | ||||||||||||||||||||||||
0x018 | int32 | 11 00 00 00 | 17 | array size again | ||||||||||||||||||||||||
0x01C | int32 | 14 00 00 00 | 20 | array capacity | ||||||||||||||||||||||||
First element (black outline) | ||||||||||||||||||||||||||||
0x000 | char[160] | _lvl_3_Intro_TCL_A_corpse.dat | space for notes; probably the name of the source file | |||||||||||||||||||||||||
0x0A0 | link | 01 36 02 00 | 566 | link to 00566-TCTF_lite_1.ONCC | ||||||||||||||||||||||||
0xA4 | matrix |
|
|
transform matrix for the pelvis (in world space) | ||||||||||||||||||||||||
0xD4-0x434 : transform matrices for the other 18 bones | ||||||||||||||||||||||||||||
0x434 | AABB |
|
|
bounding box for the whole corpse |
- Bones
- Here is one of the few places where the bone count 19 is apparently hardcoded.
- I.e., custom characters with weird bone counts won't work. See, e.g., TRIA
- What's in a bone?
- The transformation matrix (3D rotation/scale/shear/mirror and translation)
- can be seen as four 3D vectors X, Y, Z, and R in world space.
- If a bone mesh has a vertex at (x, y, z) in its native coordinates,
- then the actual position of that vertex in the level will be R + x X + y Y + z Z
- That's the transformation defined by the 3x4 transform matrix.
Reminder : the 2nd coordinate of X, Y, Z, and R is the height.
- Authoring
- The script command make_corpse(filename) creates a separate corpse file in the Oni folder.
- The pose of the corpse is taken from the player character. The format is roughly as above.
- The contents of the files thus created can then be inserted as elements in a level's CRSA.
ONI BINARY DATA |
---|
CONS << Other file types >> DOOR |
CRSA : Corpse Array |
Level file |