5,389
edits
m (→Origin and direction of the angles: wrong axis) |
m (→Compression size 6: reformulating) |
||
Line 184: | Line 184: | ||
|0x00C0 | |0x00C0 | ||
|} | |} | ||
An orientation consists of three angles, each of them stored as a 2-byte signed integer (short). | An orientation consists of three angles, each of them stored in quantized form, as a 2-byte signed integer (short). | ||
:* | :*Oni converts from the stored integer to an angle through multiplication by 360°/65535 = '''0.00549324'''78828[...] | ||
:* | :*Thus, when quantizing angles from a new animation, multiply the angles by 65535/360° = '''182.041'''6667[...] | ||
(It would make more sense here to take the ratio with 65536 rather than 65535, but Oni indeed uses 65535.) | |||
Note that these angles cannot be used directly for interpolation, they must first be converted to quaternions. | Note that these angles cannot be used directly for interpolation, they must first be converted to quaternions. |