Skip to content

Miku Miku Model

Skyth edited this page Nov 30, 2021 · 42 revisions

Miku Miku Model

This program opens models, textures, motions and sprites from all Hatsune Miku: Project DIVA games excluding PSP.

Games that use the same game engine such as Virtua Fighter 5 and Miracle Girls Festival are also supported.

Content

Requirements

Windows

You need:

If you don't have the dependencies, the tools are going to crash.

Linux

  • Install dotnet48 with winetricks.
  • Run with Wine.

Configurations

Before using this program, you need to make configuration for each game to achieve the desired results.

  • If model files are opened without a configuration set, texture names are not available.
  • If motion files are opened without a configuration set, key collections are listed directly because they cannot be grouped by bones.
    • For this reason, you cannot port motion files from game to game without a configuration set.
  • Sprite files do not require a configuration set.

Each configuration requires 4 files:

  • Object database
    • The object database contains information related to each model and the subsequent meshes in the game.
    • Required to correct mesh IDs when you save a file.
    • The name of the file is mostly obj_db.bin, but if it exists in a DLC (in the case of Future Tone), it contains the mdata_ prefix.
    • The file is in the folder rom\objset.
  • Texture database
    • Texture database contains the name and id of each texture in the game.
    • When you save a model file, it will be updated with new textures if there is a texture not already found in the game.
    • The name of the file is mostly tex_db.bin, but if it exists in a DLC, it also contains the mdata_ prefix.
    • The file is in the folder rom\objset.
  • Bone database
    • The bone database contains information about the skeletal structure of each character in the game.
    • Used to correct bone IDs when you save a model file.
    • It is required to have this database to open motion files properly and port them from game to game.
    • The name of the file is usually bone_data with bin or bon extension.
    • This file is in the rom folder.
  • Motion database
    • The motion database contains information about every motion in the game.
    • It is required to have this database to open motion files properly and port them from game to game.
    • The name of the file is usually mot_db with the extension bin or farc. If it is in a DLC, it has a prefix of mdata_.
    • The file is in the rom\rob folder.

F 2nd and X contain only the bone database due to major changes to their databases. That's why the only database you need to configure for these games is the bone database.

When a file is opened, the program finds the configuration that should be used by comparing the paths of configurations with the path of the opened file. If the file is in any database folder or subfolder of the compared configuration, that configuration is used.

For example, if you made a configuration in the folder NPUB31241\rom\objset for F and opened a file there, the program would select the F configuration.

The same applies when saving, replacing, and importing files.

For example, if you are replacing an F model with any FT model, make a configuration set for both F and FT so that the FT model will have the correct texture names and the textures can be added to F's texture database.

For the files to be saved properly, you must save the files in a folder of the configuration of the game you want. The fixes mentioned above are applied before saving.

Models

File system

The location of the model files depends on the game:

  • DT, AC, F and FT store files in the rom\objset folder.
  • F Vita stores files in the rom\objset.psarc file.
  • F 2nd and X store files in the rom\data.psarc file.

Model files are contained within .farc files that can be named this way:

  • Files that have a suffix of itm contain either character models or accessory models.
    • For example, while mikitm.farc contains Miku's models, cmnitm.farc contains various accessories.
    • Model files are in their own small .farc files instead of being contained in large .farc files in F 2nd, X and FT. For example: mikitm001, mikitm002, etc.
  • Files containing the stg prefix contain stage models.
    • For example, the stgpv600.farc file in F contains the stage model of Cat Food.
    • Due to the way the textures are stored for stages, the stage models will not be shown or ripped with the textures. Stage model viewing and ripping will come in a future feature update.
      • This does not apply to edit stages or X stages.

Ripping models

  • Open the model file with the extension bin or osd. You can also open the .farc file that contains the file.
  • If the file extension is bin:
    • Make sure that the file _tex.bin is included with the file.
  • If the file extension is osd:
    • Make sure that the txd and txi files are included with the file.
  • Right-click on the model and select Export.
  • Save the file as fbx.
  • Textures will also be saved as dds or png depending on the compression type in the same folder.
  • When opening the file in Blender, make sure to import with these settings:
    • Primary bone axis: X
    • Secondary bone axis: Y

NOTE: If you want to use model rips for production, I recommend ripping them with minmode's or chrrox's Noesis scripts instead. While the model ripper in this program is good enough for its purpose, it might not satisfy you.

Modifying models

Replacing model files from game to game

  • Right-click on the model you want to replace and select Replace.
  • Select the model file with the extension bin and make sure that the file _tex.bin is in the same folder. You can also select the .farc file that contains the file.
  • If you are porting from DT/AC/FT to F/F 2nd, the model will have wrong lighting in the game. You can do two things to fix it:
    1. Right-click on the model and select Rename all shaders to... and name all shaders to BLINN. It still won't look as good, but better than before.
    2. Replace normal textures with toon curve textures. The reason the model looks wrong is that the game confuses the normal textures with toon curve textures.
      • Each character in F contains a toon curve texture. You can use them.
        • NOTE: When you export a toon curve texture for this process, export as DDS instead of PNG.
      • If you want to get better results, you can edit the shininess value or specular texture of materials.
      • If you don't know what a normal texture or toon curve texture is meant to be:
        • Normal textures give models details that they don't normally have. These textures that are mostly blue and purple are not used by F.
        • Toon curve textures are very small textures consisting of black and white colors. They control the toon shading.
  • If you are porting from FT to F/F 2nd, DT or AC, the bones of the model may explode. To fix:
    1. Save the model as fbx.
    2. Replace the model back with the fbx file you saved.
  • You must also transfer skin parameter files over. They are used for real-time bone physics calculations and are called ext_skp_mesh_name.txt. You can find these files in the rom\skin_param folder.

Replacing DT/AC/F/FT model file with F 2nd/X model file

  • Right-click on the model you want to replace and select Replace.
  • Select the file with the extension osd and make sure that txd and txi are in the same folder. You can also select the .farc file that contains the file.
  • If you port to FT, the model will not appear in the game. To fix, right-click on the model and select Convert triangles to triangle strips.
  • In F 2nd/X, skin parameter files are binary files with .osp extension. They can be converted to .txt through Tools -> Convert osage skin parameters to...

Replacing a game model file with a custom FBX model file

  • Be sure to work with models ripped from this program.

  • All bones in the model you are going to import must be either in the original model or in the bone database.

  • Save your model as FBX. It doesn't matter what program it is saved from.

    • For Blender, make sure to export with these settings:
      • Primary bone axis: X
      • Secondary bone axis: Y
      • Apply Scalings: FBX Units Scale
  • Make sure the textures are in the same folder as the model you saved.

  • Right-click the model you want to replace and select Replace.

  • Select the file you saved.

  • The grid in the model viewer should help you to determine if the model is imported correctly. If the model is rotated, try saving it as Y-up or Z-up from your 3D program.

  • If you are porting to DT or AC, the bones will not move. This is because the model importer uses the BLINN shader in each material and BLINN does not move the bones in DT/AC. You can try changing the shader of the materials to HAIR, SKIN, CLOTH, or ITEM.

Model viewer

When you click a model, the model is displayed in the 3D viewer in the program.

Controls

  • WASD and left mouse button: Move camera
  • Mouse wheel: Zoom in or out
  • Right mouse button: Rotate camera
  • Shift: Move the camera faster
  • Control: Move the camera more slowly

Textures

File system

Same as the model file system.

Ripping textures

  • Open the file bin or txd with the texture you want to rip. You can also open the .farc file that contains the file.
  • Right click on the texture you want to rip and select Export.
  • Save the file as .dds or .png.
  • If you want to rip each texture at the same time:
    • Right-click on the texture bin and select Export All.
    • Select a folder to save all textures.

Modifying textures

  • Right-click the texture you want to replace and select Replace.
  • Select a file with .dds or .png extension.

Texture viewer

When you click on a texture, the texture is displayed in the viewer in the program.

Controls

  • Left and right arrow keys: Switch between sub-textures
  • Upper and lower arrow keys: Switch between cube map sides

Motions

File system

Motion files are divided into two types:

  • .bin files with multiple motions which are only available in DT, AC, F, and FT.
  • .mot files that are divided which are only available in F 2nd and X.

The location of the motion files depends on the game:

  • DT, AC, F, and FT store files in the rom\rob folder.
  • F Vita stores files in the rom\rob.psarc file.
  • F 2nd and X store files in the rom\data.psarc file.

Motion files are in the .farc files that start with the mot_ prefix.

F 2nd and X motion combine tool

Before you can port F 2nd or X motion files to other games, you need to combine the divided ones into a single file.

  • The program has a menu called Tools. Select Combine divided .mot files into one.
  • The .mot file you need to select is the root one of the divided motion files. The split files include the suffix _div_##.mot but the root one does not.
  • You can save the combined file after selecting the root file.

IMPORTANT NOTE: Remember to do this in the folders where the configuration is made.

Porting motions

  1. First way: Open a file and replace it with another

    • Open the motion file you want to replace. You can also open the .farc file that contains the file.
    • If you are changing the main motion set file:
      • Right-click the motion file and select Replace.
      • Select a .bin or .mot file.
    • If you want to change a motion in the file:
      • Right-click the motion you want to replace and select Replace.
      • Select a .mot file.
  2. Second way: Open the file and save it in the folder where the configuration is made

    • Open the motion file you want to port. You can also open the .farc file that contains the file.
    • Save the file you opened in one of the configuration folders of the game you are porting to.

IMPORTANT NOTE: Make sure the motion you are replacing has the same number of motions in the target file.

Sprites

File system

The location of the sprite files depends on the game:

  • DT, AC, F, and FT store files in the rom\2d folder.
  • F Vita stores files in the rom\2d.psarc file.
  • F 2nd and X (across all platforms) store files in the rom\data.psarc file.

Sprite files are in .farc files that start with the spr_ prefix.

Ripping sprites

  • Open the .bin or .spr file that you want to rip. You can also open the .farc file that contains the file.
  • Right click on sprite set file and select Export All.
  • Select a folder to save all sprites.

Modifying sprites

  • Open the .bin or .spr file that you want to modify. You can also open the .farc file that contains the file.
  • What we are going to modify here is the sprite sheets and they are located under the Texture Set node.
  • Export the sprite sheet as .png where the sprite you want to modify is located.
  • You should invert it when modifying, but don't forget to invert it again before putting it back into the file. Alternatively, you can use the options that allow you to replace/export flipped.
  • After you are done making changes, replace the sprite sheet with the .png you edited.
  • There may be a drastic increase in file size after saving, but that is nothing to worry about.