OBD:TRTA: Difference between revisions

From OniGalore
Jump to navigation Jump to search
No edit summary
 
m (link fix)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File Types]] >> TRTA File
{{OBD_File_Header | type=TRTA | prev=TRSC | next=TSFF | name=Totoro Quaternion Body Translation Array | family=Character | align=center}}




<CENTER>[[OBD:TRSC|<==]] <FONT SIZE=5>TRTA File</FONT> [[OBD:TSFF|==>]]<BR>
[[image:trta_a.gif]]
<FONT SIZE=2>Totoro Quaternion Body Translation Array - Character File</FONT></CENTER>




Some of the TRSC files are 0 byte files. That means, that Oni will take the information out of the TRSC files of level 0. Below is an example of a TRSC file of level 0.
{{Table}}
{{OBD_Table_Header}}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr| 0x00 | res_id  |FF0000| 01 62 04 00 | 1122 | 01122-.TRTA }}
{{OBDtr| 0x04 | lev_id  |FFFF00| 01 00 00 06 | 3    | level 3 }}
{{OBDtr| 0x08 | char[22] |00FF00| AD DE...    | dead | unused }}
{{OBDtr| 0x1E | int16    |00FFFF| 13 00      | 19  | array size }}
{{OBDtrBK|First bone offset (black outline)}}
{{OBDtr| 0x00 | float    |FFC8C8| 00 00 00 00 | 0 | x-offset of bone (pelvis) with respect to parent }}
{{OBDtr| 0x04 | float    |FFFFC8| 00 00 00 00 | 0 | y-offset of bone (pelvis) with respect to parent }}
{{OBDtr| 0x08 | float    |C8FFC8| 00 00 00 00 | 0 | z-offset of bone (pelvis) with respect to parent }}
|}




http://www.fh-eberswalde.de/user/dkriesch/onistuff/images/trta_a.gif
;Skeleton
 
:The hierarchy of the bones (parents, children, siblings) is defined in the [[OBD:TRIA|TRIA]] file (linked to from the same [[OBD:TRCM|TRCM]] file as the TRTA).
 
:If the (0°, 0°, 0°) orientation is set for every bone, then all the bones point along the X axis of the character (from right to left) and face upwards.
{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
:Viewed from above, you get something like this : "o" is a pivot (yes, the shoulders are attached to the neck), and ":)" is a smiley :)
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
14-o-13-o-12-o-11-o 3-o-2-o-1-o      ^ z
| WIDTH=15% | <B>Hex</B>
                  |           |       ^
| WIDTH=15% | <B>Translation</B>
            :)10-o-9-o-8-o-7-o-0  < < <^< < <
| WIDTH=70% | <B>Meaning</B>
                  |           |   x  ^
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
18-o-17-o-16-o-15-o 6-o-5-o-4-o      ^
| BGCOLOR="#FF0000" | 01 62 04 00
;XYZ offsets
| 1122
:The XYZ-offsets in the TRTA are offsets (aka "translations") of a ''bone'' relative to its ''parent'' in that system of coordinates (see above).
| ALIGN=LEFT | 01122-.TRTA
:Thus they effectively specify the relative positions of the joints.
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
:The different TRTA occurring in Oni are detailed [[OBD_talk:TRTA|HERE]].
| BGCOLOR="#FFFF00" | 01 00 00 06
;Pelvis
| 3
:Pelvis is further translated with respect to the root bone by the [[OBD:TRAM/raw0x0C|height track]] of [[OBD:TRAM|TRAM]]
| ALIGN=LEFT | level 3
:The root bone is translated by TRAM as well as by the physics engine (jumps, blasts).
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
;Relevant offsets
| BGCOLOR="#00FF00" | AD DE
:You may notice that X and Y offset for thighs and shoulders is very small (it's the left/right i.e. Z that matters there).
| dead
:For all the other bones, the offset is essentially along X (i.e. along the main axis of the bone meshes). Y and Z offsets are very small.
| ALIGN=LEFT | not used
:So X/Y offsets of shoulders and thighs can basically be set to zero, as well as Y/Z offsets of all the other bones.
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
:A skeleton is primarily defined by the Z offsets of shoulders and thighs (broad/narrow shoulders and hips), and by the X offset (effectively, the length) of all the other bones.
| BGCOLOR="#00FFFF" | 13 00
| 19
| ALIGN=LEFT | 19 packages follow (one package is edged in black)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#000000"
| COLSPAN=3 | <FONT SIZE=2 COLOR="#FFFFFF">Below follows the first package.</FONT>
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8C8" | 00 00 00 00
| 0
| ALIGN=LEFT | x-postition of the bodypart in connection to the [[OBD:TRIA|TRIA]] file
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFFC8" | 00 00 00 00
| 0
| ALIGN=LEFT | y-postition (height) of the bodypart in connection to the [[OBD:TRIA|TRIA]] file
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFC8" | 00 00 00 00
| 0
| ALIGN=LEFT | z-postition of the bodypart in connection to the [[OBD:TRIA|TRIA]] file
|}
 


<HR>
<CENTER>[[OBD:TRSC|<==]] <B>TRTA File</B> [[OBD:TSFF|==>]]</CENTER>
<HR>


{{OBD_File_Footer | type=TRTA | prev=TRSC | next=TSFF | name=Totoro Quaternion Body Translation Array | family=Character}}


[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File Types]] >> TRTA File
{{OBD}}

Latest revision as of 13:20, 5 April 2021

ONI BINARY DATA
TRSC << Other file types >> TSFF
TRTA : Totoro Quaternion Body Translation Array
switch to XML:TRTA page
Overview @ Oni Stuff
OBD.png


Trta a.gif


Offset Type Raw Hex Value Description
0x00 res_id 01 62 04 00 1122 01122-.TRTA
0x04 lev_id 01 00 00 06 3 level 3
0x08 char[22] AD DE... dead unused
0x1E int16 13 00 19 array size
First bone offset (black outline)
0x00 float 00 00 00 00 0 x-offset of bone (pelvis) with respect to parent
0x04 float 00 00 00 00 0 y-offset of bone (pelvis) with respect to parent
0x08 float 00 00 00 00 0 z-offset of bone (pelvis) with respect to parent


Skeleton
The hierarchy of the bones (parents, children, siblings) is defined in the TRIA file (linked to from the same TRCM file as the TRTA).
If the (0°, 0°, 0°) orientation is set for every bone, then all the bones point along the X axis of the character (from right to left) and face upwards.
Viewed from above, you get something like this : "o" is a pivot (yes, the shoulders are attached to the neck), and ":)" is a smiley :)
14-o-13-o-12-o-11-o 3-o-2-o-1-o       ^ z
                  |           |       ^
           :)10-o-9-o-8-o-7-o-0  < < <^< < <
                  |           |   x   ^
18-o-17-o-16-o-15-o 6-o-5-o-4-o       ^
XYZ offsets
The XYZ-offsets in the TRTA are offsets (aka "translations") of a bone relative to its parent in that system of coordinates (see above).
Thus they effectively specify the relative positions of the joints.
The different TRTA occurring in Oni are detailed HERE.
Pelvis
Pelvis is further translated with respect to the root bone by the height track of TRAM
The root bone is translated by TRAM as well as by the physics engine (jumps, blasts).
Relevant offsets
You may notice that X and Y offset for thighs and shoulders is very small (it's the left/right i.e. Z that matters there).
For all the other bones, the offset is essentially along X (i.e. along the main axis of the bone meshes). Y and Z offsets are very small.
So X/Y offsets of shoulders and thighs can basically be set to zero, as well as Y/Z offsets of all the other bones.
A skeleton is primarily defined by the Z offsets of shoulders and thighs (broad/narrow shoulders and hips), and by the X offset (effectively, the length) of all the other bones.


ONI BINARY DATA
TRSC << Other file types >> TSFF
TRTA : Totoro Quaternion Body Translation Array
Character file