Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Exporting

SutandoTsukai181 edited this page Jun 23, 2021 · 1 revision

This article contains info about exporting XFBINs from Blender.


Exporting XFBINs

Before trying to export anything from Blender, make sure that the XFBIN hierarchy is the same as the Full Hierarchy example in the Glossary.

An important thing to note is that exporting to a completely new XFBIN is currently disabled, as there could be a lot of missing data that cannot be imported/exported from Blender to an XFBIN.

Instead, to export from Blender, an existing XFBIN should be selected. That XFBIN will be overwritten, so make sure you backup the file you want to export over, before exporting.

To open the export window, from the menu bar, go to File -> Export -> XFBIN Model Container and a file dialog will open. Browse to and select the XFBIN file you want to overwrite and click Export XFBIN.

There are some options you can choose when exporting, displayed on the right side of the file browser window. To understand what each option does, hover with the mouse cursor over the checkbox and the description will be displayed.

Some of the exporter options will be explained below.


Collection to Export

The Collection option in the export window decides which collection is going to be exported. Each collection is treated as a single XFBIN, as mentioned in the Glossary.

Collection


Inject to Existing XFBIN

This option is enabled by default, and cannot be disabled. It exists just to explain that an existing XFBIN must be used.

When a Blender collection is injected to an XFBIN, every armature in the collection will be added to the XFBIN as a new clump with the armature's name. If a clump with the same name exists, it will be overwritten. For actual usage, the armature should have the same name as the clump (having the [C] suffix is okay as it will be removed from the name before exporting), because usually you will want to replace an existing model with the same name so that the game can use it.

Inject


Export Meshes

To export meshes, the following option has to be enabled (enabled by default).

Export meshes

Only meshes that are placed correctly according to the XFBIN hierarchy will be exported. If this option is disabled, the original meshes inside the existing XFBIN's clump will be used instead.

Additionally, only meshes that are referenced in the Clump Properties' Models or Model Groups lists will be exported. If you did not modify the clump properties, and did not add new NUDs (Empty objects), then all of the models that were imported will get exported.


Export Specific Meshes

If you only want to export some meshes, and not others, this option can be used:

Export specific meshes

When this option is enabled, only the selected meshes will be exported, while the rest of the meshes will be copied from the existing XFBIN's clump, like in the following example:

Selected models


Export Bones

To export bones, the following option has to be enabled (enabled by default).

Export bones

When exporting bones, the bones of the armature will replace the coords of the clump. All existing coords will be removed, as the bones have to be exported as a full hierarchy.


Export Textures

Textures cannot be directly imported/exported with the script. However, there are alternative ways to replace/add textures, using the Export textures option in the exporter window:

Export textures

This option has to be enabled for the textures to be exported, after following these guides:


Inject to Existing Clump

If this option is enabled, the meshes and bones will be injected to each clump in the XFBIN, instead of completely replaced.

This means that if an armature/mesh/bone was not present in the original XFBIN, it will not be exported. However, this also means that the existing XFBIN's structure will not change, which should prevent some issues related to XFBINs that contain unsupported data chunks.

An example usage would be exporting stages, as the stage collision boxes cannot be imported to Blender, and will not be exported. If this option is enabled, stages can be exported while preserving the original collision boxes.

Inject