Talk:Anim File Format

From Second Life Wiki
Revision as of 05:25, 13 August 2018 by Sei Lisa (talk | contribs) (→‎Contradictions between the description and the source: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Contradictions between the description and the source

There are some differences between how the cited source code at [1] (latest commit as of this writing) interprets the data and how this page describes it.

  • There is no F16 float in the source. Instead, the code reads a U16 and scales it to a certain range using function U16_to_F32, which is defined in [2].
  • Strings are zero-terminated and not prefixed by a length, as described in [3].
  • U32 is an unsigned 32-bit integer, not signed as the description says.
  • Num_Hand_Poses should be hand_pose, as it's the numeric index of the hand pose associated to the animation. No idea what the Notes column means when it says "Treating as 0 for this example". The indices are described in this enum: [4].
  • The rotation keys do not define "[t]he rotation on each axis". It forms the first three components of a normalized quaternion that represents a rotation, therefore it defines the rotation axis, as a unit vector scaled to the sine of half the rotation angle.

Apart from that, it doesn't describe that all numbers are codified as little-endian byte sequences, including F32, as per [5] (called from [6] lines 317 for U16, 342 for U32, 367 for S32, 392 for F32, 495 for LLVector3).

The page Internal Animation Format better describes most details. I'm not sure why this page was created in the first place, having that other one. --Sei Lisa (talk) 05:25, 13 August 2018 (PDT)