Skip to content

FreeHK Terminology

Psymon edited this page Oct 16, 2023 · 5 revisions

[Image 1]

Star Type

[Image 2]

The star or asterisk type of an action is simply a setting which tells the Blender UI, the node and exporter systems to identify an action as either a generic blender action, a TIML Action or an LMT Action. LMTs contain both TIML and LMT Actions, TIMLS and EFX contain TIML actions.

The UI will not show properties and operations that do not belong to the correct asterisk type. If you think you are missing tools or properties, or an action does not show on the node editor drop downs, remember to check it's the correct asterisk type.

Transform

[Image 3]

A grouping of tracks/fcurves with the same data path, differing only in array index. Tracks in Blender correspond to a transform's specific axis. For example a quaternion rotation consists of up to 4 tracks, each track is one axis of the transform. The transform is the quaternion rotation as a whole.

Blender does not have the concept of a transform, so information on transforms is stored on its constituent tracks. FreeHK's Encodign and Bone Function properties are Transform level properties.

Custom F-Curve

[Image 4]

Blender engine does not allow adding properties to tracks. As a result FreeHK uses a workaround to assign properties to tracks. However this requires the user to manually add this properties in user created curves. This process is referred to as Customizing F-Curves.

Encodings

When exporting animations one must convert the animations to numerical values that can be crammed into files. Because storing animations "as is" from modelling software would take cataclysmics amount of space, compression schemes are used. On more advanced encoding schemes, data is transformed in ways such that information loss is minimized. In the LMT format specification, data is just chopped off to fit in less space by losing precision. The exact way this data is chopped off is determined by the encoding of the transform. There are 12 encoding types:

Base Encodings
  • Vector Key (1)
  • Rotation Key (2)

Location and Scale Encodings

  • Float Key (3)
  • Short LERP (4)
  • Byte LERP (5)

Rotation Encodings

  • 14-bit Quaternion Key (6)
  • 7-bit Quaternion LERP (7)
  • Monoaxial X 14-bit Quaternion LERP (11)
  • Monoaxial Y 14-bit Quaternion LERP (12)
  • Monoaxial Z 14-bit Quaternion LERP (13)
  • 11-bit Quaternion LERP (14)
  • 9-bit Quaternion LERP (15)

The first two are reserved for transformations without keyframes. The following 3 for Location and Scale transforms and finally the last are reserved for rotations. We highlight types 11 to 13 which correspond to rotatioons on a single axis. When setting a transform to encode under this, the remaining two axis will be omitted.

Animations can be stored raw keys (or just Keys in the listing above) or as a parameter in an interpolation (LERP). Interpolating allows storing the "ends" of a transform and treating a keyframe as a percentage of the way from one extreme to the other, potentially adding precision.

However under most circumstances Float Key for Location and Scale and 14-bit Quaternion Key will be the ones to minimize exporting error (formally this is called Quantization Error). The button "Maximize Encodings" will set all tracks without an explicit encoding to the maximum quality encoding that their transform type allows. To maximize the quality of all tracks one must first "Clear Encodings" and then "Maximize Encodings". In general maximizing the encoding is not really desirable or necesary. "Clear Encodings" allows the exporter to auto-detect quality level, and it tries to approximate the same criteria used by ingame animations.

Astute observers will note that there are no encodings for Euler Rotations. This are automatically converted by the exporter into their quaternion equivalent. Care must be taken when exporting Euler Rotations as an insufficient number of explicit inbetween frames might result in incorrect results. The "Resample Selected FCurves" button is useful for this purpose (or manually adding inbetween points, at least two per full turn).

Folded Animation

[Image 5]

Under normal circumstances an animation can only have one track per transform's axis. The LMT format however has no such limitation. To get around this limitation FreeHK introduces animation folding. An animation that would have a repeated track in the LMT file instead is assigned array indices such that there is no repetition. To edit the second copy of the track the MAIN/FOLDED toggle can be used to set the secondary set of tracks as the main ones and animate normally. This switch can then be reversed through the same toggle.

To create a second track compatible with FreeHK system simply use the Fold Selected F-Curves Button.

Tethering

[Image 6]

Because blender does not have the concept of animating deltas and animates based on the bone's root instead of the head (contrary to MTFramework) it's necessary to perform certain operations for imported to visually match their in-game results. A tether is an armature tied to an animation which the FreeHK system keeps track separate from blender usual action linking.

Asssigning an action to a skeleton is not enough for an animation to display properly, the action must additionally be "tethered with updates" through the "Transfer & Update" button. When dealing with an animation that already modifies a skeleton, such as user created animations, one must assign the tether without updates so that FreeHK knows that the animation is tied to the skeleton through the "Transfer Tethers" button.

Additionally for this cases it's recommended to use the "Update Bone Functions" so that the relevant tracks self-assign the bone functions from the skeleton (this does require the skeleton to be assigned bone functions).

Reference Frame

[Image 7]

The reference frame is a special frame used by LMT animations for blending purposes. The reference frame is any keyframe at time 0. This frame is stored separate from other frames in the transform. Tracks, even without keyframes will have one at time 0. When talking about the number of frames in a track, the reference frame is not counted. A track without any frames is never produced by the importer.

Because this frames are not directly used sometimes they might have aberrant states. If an animation looks bizarre at time 0 it's because the game is not using the reference frames for blending with other animations for one reason or another, it's not an importer error.

Animation Basis

[Image 8]

Animations in MHW store additional information about their root transform's end state. Tracks for the skeleton's root have an additional frame one past the animatiton end for rotation and translation transformations (scale transforms don't have this extra frame). This frame is used for calculating animation chaining. This frame is also omitted when counting a track's number of frames.

For folded animations the Basis has not-fully-understood values. It will be added to all root tracks but in case they differ it will take the value from the track which is lower on the action list (in most cases the one-past the last frame of the folded root transform).

Synchronization

[Image 9]

A transform is said to be synchronous if all of it's individual tracks have keyframes at the same time intervals. The LMT format requires transforms to be synchronous. Furthermore it requires transforms to be complete. This means each possible axis of the transform has data on it. The exporter completes missing channels with 0s (in tether space) and missing frames through Blender's existing track interpolation. It's also possible to use the "Synchronize Keyframes" button to explicitly generate the missing frames.

Visual Summary

[Image 10]

General Tutorials

General Tutorials

Animation Tutorials

Animation Tutorials

Audio Tutorials:

Audio Tutorials

IDs:

File & In Game IDs

Model Tutorials:

Model Tutorials

Effects Tutorials:

EFX Tutorials

FSM Tutorials

FSM Editing

MRL3 Tutorials:

MRL3 Tutorials

NPC Editing:

NPC Editing

Map Editing:

Map Editing

Plugins and Memory Editing:

Plugins and Memory Editing

Quest Editing:

Quest Editing

Monster AI Editing:

Monster AI Editing

Texture Tutorials:

General Texture Tutorials
Specific Texture Tutorials

TIML Editing

TIML Editing

Asterisk's Plugin Notes:

Asterisk's Plugin Notes

Miscellaneous Tutorials:

Miscellaneous Tutorials

Outdated Tutorials:

Outdated Tutorials
Clone this wiki locally