OBD talk:TRAM/raw0x34: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (basic info on overlay TRAMs)
 
m (+cat)
 
(2 intermediate revisions by 2 users not shown)
Line 25: Line 25:
:For the other overlay TRAMs, the "used parts" are 0x00010000 (chest), and the "replace parts" vary.
:For the other overlay TRAMs, the "used parts" are 0x00010000 (chest), and the "replace parts" vary.
::[[User:Geyser|geyser]] 00:33, 28 January 2007 (CET)
::[[User:Geyser|geyser]] 00:33, 28 January 2007 (CET)
==Quaternions==
:[[wikipedia:Quaternions_and_spatial_rotation|HERE]] is a rather tedious page on quaternions and rotations. Just scroll down past the blabla ^^
===Quaternion===
:A quaternion is something like this:
::i x + j y + k z + w
:where i, j and k are 3 imaginary numbers defined by:
::i²=j²=k²=ijk=-1
:The pairwise multiplication rules can be inferred from the above.
::ij=k, ji=-k, ...
:Note that multiplication is ''not'' commutative.
===Rotations===
:A unit quaternion is such that x²+y²+z²+w²=1
:A unit quaternion corresponds to a rotation about the axis (x,y,z) with angle (2 arccos w)
===More===
:Later
{{OBD}}

Latest revision as of 17:17, 4 May 2022

Overlay TRAM

Overlay anims use quaternions rather than quantized Euler angles to define rotations.
That's because an aiming overlay uses a lot of interpolation (and quaternions are better at it).
They all behave the same way except the *_arc.TRAM. Those are coupled to the TRAS.
For an *_arc.TRAM, the frames don't correspond to different moments in time, but to sectors of the aiming screen.
Basically, such a TRAM holds, e.g., nine positions:
  • aiming high and to the right
  • aiming high
  • aiming high and to the left
  • aiming to the right
  • aiming straight ahead
  • aiming to the left
  • aiming low and to the right
  • aiming low
  • aiming low and to the left
The TRAC specifies what maximum deviation of the aiming vector the extreme frames correspond to.
A generic aiming direction in interpolated using that grid.
There are 15 keyframes for RIF aiming screens (an extra column of 3 on the left and on the right)
There are 6 keyframes for the prone PIS aiming screen (no bottom row, i.e., you can't aim down)
The "used parts" and "replace parts" are bitsets that define for which bones the quaternions will indeed be read.
For the aiming screen TRAMs, there are no "replace parts", and the "used parts" vary a lot:
  • For STRIKEstand_fire_arc.TRAM, only the head turns around, so the used part bitset is 0x00040000
  • For KONCOMstand_fire_arc.TRAM, almost every bone is affected by the aiming direction
For the other overlay TRAMs, the "used parts" are 0x00010000 (chest), and the "replace parts" vary.
geyser 00:33, 28 January 2007 (CET)

Quaternions

HERE is a rather tedious page on quaternions and rotations. Just scroll down past the blabla ^^

Quaternion

A quaternion is something like this:
i x + j y + k z + w
where i, j and k are 3 imaginary numbers defined by:
i²=j²=k²=ijk=-1
The pairwise multiplication rules can be inferred from the above.
ij=k, ji=-k, ...
Note that multiplication is not commutative.

Rotations

A unit quaternion is such that x²+y²+z²+w²=1
A unit quaternion corresponds to a rotation about the axis (x,y,z) with angle (2 arccos w)

More

Later