Animation Files (Hyperkinetics) [LEGACY] - The1andonlyDarto/MHAssetInfo GitHub Wiki
ANYTHING BELOW IS A WORK IN PROGRESS
Model Importing - Blender
First, drag and drop the .pac file of your choice onto the ReFrontier.exe, it will spit out a decompressed folder with subfolders and .bin files inside. The first folder at the top when alphabetically sorted will contain a .fmod and .fskl file. When importing models into blender, The .fmod file comes first, and the .fskl file comes second. Once both are imported, run the command in the section below to create an armature from the empty bones the .fskl imported. Once that is done, feel free to delete the empties. Additionally you should parent the meshes under the armature. Just drag and drop the mesh onto the armature, and select the “With Empty Groups” option.
It appears that - when imported - armatures are 100 times larger than they should be canonically. If you’re wanting accurate scales, create an empty bone and parent the model armature under it, setting the empty’s scale to “0.01”.
*NOTE, DO NOT SET SCALE, WILL RUIN ANIMATIONS. Use empties for scaling instead
Empty Hierarchy to Armature
bpy.ops.frontier_tools.convert_fskl()
This command, run in the console with an empty hierarchy selected will convert it to an armature compatible with importing animations.
A modification has been done to the plugin in the download link for the “Monster Hunter Frontier Importer” in the required files section, more specifically the init.py file, to add a menu for the conversion of the empties created by the import process of .fmod into an armature. To use it, after importing the .fmod files, go to File > Import > MHF Converter (.fskl) and it will create the armature.
Animation Files
The animation file is the .bin file starting with “0003_”. This file is not decompressed during the ReFrontier process, and it’s often the 2nd largest file in the folder, but in the case of monsters like Unknown, it is the largest .bin present.
Once your animation file has been located, manually rename the file extension to ".fua" and load it in via the Hyperkinetics FU .fua animation importer with the armature selected in the model viewer window.
You’ll be able to select animations using the “Dope Sheet” editor window in blender.
Selecting the Action Editor using the drop down.
From there navigate over to the and select your animations.
Animation Retention
A big issue that comes from saving a 2.79c file and opening it up later once you’re done, is that the animations that are not currently in use will be removed to save space. In order to retain the animations that were just imported, run the following script using a new file in the “Text Editor” editor window. When run, this will toggle every animation in the file to be a fake user. Otherwise, Blender will delete a majority of the animations when you save a non-2.79 blend file.
Also works on newer versions of blender 2.8+
import bpy
from itertools import chain
for i in chain(bpy.data.actions):
i.use_fake_user = True
Some Animation Notes
- Most animation files will have their own little quirks with some things that are wrong. Most of these things are minor annoyances and can be fixed with a bit of rotation or scaling.
- Bone.001 seems to be the root bone for most animations that have their translations intact.
- The actions are all labeled as FUAnim-XX/YYY; with XX being 00 or 01. 00 is mostly common animations, and 01 is mostly the monster-specific (aka fun) stuff. YYY simply denotes the number of the animation.
- Many animations don’t have root rotational data This is most evident in the turning animations, where the monsters don’t actually end up facing 90 degrees to the side. The older games used math in-game to turn the monsters, unlike the newer games using actual root rotation in the animations.
- Not all of the location positions seem to be actually keyframed? When switching actions, if the monster has moved 5 feet forward during a run animation for example, swapping to an idle animation will have them still 5 feet forward rather than over the origin. This also happens with tail cut animations, where the tail will become “unrigged” for other actions. Annoying at worst, this can be fixed by selecting the rest position, applying it as the rest pose, and then selecting an action again.
Fixing Broken Animations
Rotation Issues
In the case of a ‘broken animation’ with incorrect bone rotations such as:
First, select all of the bones of the skeleton in pose mode Then, in the graph editor, change the pivot to ‘2D Cursor’
Search only for ‘rotation’ so the graph editor only displays the X, Y, and Z Euler Rotation keyframes. Click in the graph box once to focus on that window, then press A until all of the curves are highlighted yellow Press S to scale, Y to lock to the Y-Axis, and type .66 to scale all of the keyframes by a factor of 2/3.
When done correctly, the animation should look like this. Congrats! Note that you’ll need to do this for any animation that seems broken in this way. The animations may still be jittery/shaky, this is due to file compression on older-gen games.
While all of these steps can be done in 2.79, these screenshots are from Blender 3. I’d recommend swapping to at least 2.8+ because they have better UI, and the plugin itself makes 2.79c a little unstable. Note that you won’t lose any data going to a higher version of blender.
Scaling Issues
This is an example of a 'broken' animation due to incorrect scaling:
Step 1. Select every bone in pose mode Step 2. Use box select (B) to unselect (hold middle click) the root bones Step 3. Clear Scale with Alt+S or Translations with Alt+G Step 4. Insert available keyframe (I) at frame 0 Note that some bones DO use scaling, the neck, and the chest here for example. To preserve them, be sure to deselect them before clearing the scalar keys. Keep in mind DO NOT delete the translations for root bones (the first five bones in the hierarchy). If deleted, your animation will be centered on the origin of the armature.
Yay, no more chicken neck and snail eyes!
Textures
When the textures are first extracted from the .pac file, they’re encoded using the “Indexed color 8-bit gamma integer” format, which applications like gimp hate. This leads to nasty artifacting in Alpha channels and the inability to decompose the image into RGB/A channels.
Left Image: Gimp | Middle Image: Paint.net | Right Image: Photoshop
Top Image: Error when trying to decompose an "Indexed color" format image
If you want to continue using Gimp, Instead of opening the image directly, make a canvas the same dimensions as the image (i.e. 512x512), drag the image into the file from file explorer, and directly export the image as a png. This results in the image being converted to a proper “RGB color 8-bit gamma integer” format. This process works for RGB images but not RGBA images. If you want good Alpha channels, just use paint.net. Paint.net does not share these issues either, but for both its good practice to load the image in via dropping it into a layer instead of directly opening it. The important thing here is being able to convert the format into RGB(good), while directly opening the image opens it in an Indexed format (bad).
Fixing Normal Map Textures
There are two types of NM, OpenGL and DirectX. The type of NM is determined by the direction on the Y axis the green channel intensity is coming from. OpenGL’s green channel comes from the north (Y+) while DirectX comes from the south (Y-). Frontier’s normal map textures are usually OpenGL, but sometimes are DirectX. Below are some examples on how to spot them.
If you’re wanting to use applications such as Blender that use OpenGL, just make sure the NM appears correct for its use case. The Green color channel of the normal map texture may need to be inverted to fit the correct use.
[>insert example of monsters using DirectX normal map textures, and how they appear once they’re inverted to the OpenGL format.]
Some monsters have some texture islands forcibly transformed (flipped and/or rotated at 90° increments) causing normal directions to be incorrect on these areas.
Identified islands marked
Corresponding meshes shown in pink
Example of effect, light source at Z+. Notice the bottom-right area of the 3D cursor. Also notice the seam in the middle of the tail where the lighting appears inverted.
After fixing the normal maps:
Comparing normal map textures;
Original:
Edited: