Model Exporting¶
Note
Exporting requires basic knowledge of how to use Blender.
Blender Add-on¶
Make sure you have the GBFR Blender Tools Add-on installed.
Exporting¶
Warning
Exporting still has some issues and you are likely to encounter many issues.
- Make sure you create a folder to export to, and place a copy of the model's original
.minfoin that folder.- Do not place any of the other
.skeletonor.mmeshfiles in this folder, they will be overridden!
- Do not place any of the other
- Ensure your model is set up according to the Exporting Checklist.
- Go to
FileExportGranblue Fantasy Relink (.mmesh) - Name the model to the same name as the
.minfo(i.e. Should bepl1400.mmeshforpl1400.minfo) - Press the
Exportbutton and wait. - Done! Your exported model's generated
.minfo,.mmesh, and.skeletonfiles can be found in the_Exported_Minfofolder created where you exported to.
Info
To check for errors in the export you can re-import the exported file.
Exporting Textures¶
By this point you must be wondering how to export textures for the game without using granite. This is done by editing the Material Set (.mmat) file, located in model/<model_prefix>/<model_id>/vars/<number>.mmat (each number represents a different material variation, used for color packs).
- Get FlatBuffers / flatc, which you should already have if you already imported models. Extract it.
- Get the FlatBuffer MMat schema. Schemas are used to tell
flatchow to read and write the material files. - Run the following command to convert the
.mmatfile into a human readable.jsonfile:
Tip
<path_to_fbs_file> should be the path to the .fbs file and <path_to_mmat_file> should be the path to the .mmat file.
- You should now have a
.jsonfile next to the original.mmatfile. Open it in a text editor (preferably something like Notepad++). - Scroll down to
granite_params. Remove the entire section. This will force the game not to use texture streaming and use local files instead.
Example section to remove
Now, inside the texture_maps section, you will see all the textures associated to each material map. As you've removed the granite section, your textures will need to be put in the following folders (if they aren't already there):
- 4k:
texture/4k/{name}.texture - 2k:
texture/2k/{name}.texture
These textures files are simply .wtb files with a different extension. Follow this simple guide to create .wtb files. Change your .wtb extension to .texture once that's done.
Note
DDS files are required beforehand.
Finally, to convert your material .json file into .mmat:
Rename the newly created .bin file extension to .mmat.
Exporting Checklist¶
This list is subject to change as model exporting changes and is more fully understood.
- The model must have an armature and a mesh.
- The model can only have 1 Mesh object, you must join all meshes together.
- Each material must be assigned a material index using the addon's Tool Shelf Panel. These indices correspond with the materials list found in the model's
.mmatfiles. - The mesh cannot have any vertices with zero vertex group weights assigned to it. Use the
Select Zero Weightsbutton in the GBFR tool shelf panel to select them. It is up to you to deal with them via weight painting, deleting, etc. - The armature's bone names must match to the GBFR Bone Index names if they are to be animated. Use an original game model to see the naming scheme of humanoid bones (TODO: Create viewable bone name list).
- The armature must be pointed upwards on the Z-Axis. Remember to
CTRL+A > All Transformsto apply all transforms on the Armature. - Models can only have 1 UV Map.
- The GBFR Model format has a limit of 65535 total vertex group weights. Your model should have a reasonable amount of bones to accomodate this, if not merge the bones down.
- Bone collection/group names can only contain alphanumeric characters, no special characters (i.e. Japanese characters)
Other¶
Known Export Issues, Requirements, and Fixes
Issues & Fixes¶
- Parts of the model are invisible in game:
- Each material must be assigned a material index using the addon's Tool Shelf Panel. These indices correspond with the materials list found in the model's
.mmatfiles.
- Each material must be assigned a material index using the addon's Tool Shelf Panel. These indices correspond with the materials list found in the model's
- Parts of the model are transparent in game:
- Your mesh's normals are there are inverted, flip / recalculate your normals for affected areas.
Old issues that should now be fixed automatically¶
- Model's Geometry Explodes:
- This is caused due to having any loose vertices/edges. To fix this, select the mesh and press the
Delete Loose Verts & Edgesbutton in the GBFR panel.
- This is caused due to having any loose vertices/edges. To fix this, select the mesh and press the
- UVs look weird/distorted:
- You must split the geometry along all outer Edges of the UV islands. Press the
Split Vertices:Along UV Islands.
- You must split the geometry along all outer Edges of the UV islands. Press the
- Model is rotated 90 degrees forward:
- Exported All Transforms for the model and Armature must be applied before export. Select all objects and press
CTRL+A > All Transformsto do this.
- Exported All Transforms for the model and Armature must be applied before export. Select all objects and press
- Parts of the mesh are stretching and not really following the bones:
- You need to limit your total Vertex Group weights to
3, thenNormalize Allyour weights your weights.- This is automatically applied by the exporter on export. If it didn't work, parts of your mesh are missing weights, you can't have any geometry with 0 weight.
- You need to limit your total Vertex Group weights to
Other¶
- You can add bones to the armatures, but there is no guaruntee they will animate properly.