Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
eArmada8 committed Apr 25, 2024
1 parent e2b7ffc commit b26a7da
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ Overwrite existing files without prompting.
### ys8_it3_import_assets.py
Double click the python script and it will search the current folder for all .it3 files with exported folders, and import the meshes and textures in the folder back into the it3 file. This script requires a working it3 file already be present as it does not reconstruct the entire file; only the known relevant sections. The remaining parts of the file (the skeleton and any animation data, etc) are copied unaltered from the intact it3 file. By default, it will apply c77 compression to the relevant blocks.

Meshes are attached to existing VPAX/VP11 blocks, and are found using the name of the block followed by an underscore (which matches the output from ys8_it3_export_assets.py). For example, if the import script finds a VPAX block in the `c005_ps4_main2`, it will search for meshes with the following names: `meshes/c005_ps4_main2_*.vb`. It will replace *all* the meshes associated with that node within the .it3 with *all* the meshes that it finds. Therefore, if the .it3 has `c005_ps4_main2_00` through `c005_ps4_main2_02` for example, deleting `c005_ps4_main2_01.vb` will remove it from the VPAX, and a new mesh `c005_ps4_main2_03.vb` if found, will be added to the block. A new BBOX and MAT6 (bounding box and material section, respectively) will replace the old block.

If all the submeshes of a mesh node are deleted, then the script will insert a blank invisible mesh in its place so that the node remains intact. This is required to prevent crashes, and also allow for mesh importation in the future (if the VPAX block is removed, the script will not know to look for meshes in the future under that node).

*Every submesh* must have its own .material file with a valid material to be included into MAT6; submeshes without .material files will be ignored by the import script. If two or more submeshes use identical submeshes, only one copy will be inserted into MAT6. Note that each unique material needs a unique name; a second material with the same name will not be inserted after the first, even if settings within are different. We do not know the values for most of the materials; however, the UV wrapping variables have been identified and are the 3rd and 4th texture flags (each texture has 4 flags underneath the texture name). The values are 0: REPEAT, 1: CLAMP_TO_EDGE, 2: MIRRORED_REPEAT.

If there is a .bonemap file (same format as .vgmap, should be the name of the node - so `c005_ps4_main2.bonemap`, not `c005_ps4_main2_00.bonemap`), then a new BON3 section will be written to change the bone palette of the *entire mesh node*. (For example, if a new submesh `c005_ps4_main2_03` is added and requires a new bone map, then `c005_ps4_main2_00` and every other submesh *must* also use that new bone map).

If there is a .rty2 file for the mesh node, that will be inserted into the .it3 file in place of the original (otherwise the original will be copied over). This is mainly useful for changing material variants, which apply to the entire mesh; this is not a setting that can be applied on a submesh-level.

It will make a backup of the original, then overwrite the original. It will not overwrite backups; for example if "model.it3.bak" already exists, then it will write the backup to "model.it3.bak1", then to "model.it3.bak2", and so on.

**Command line arguments:**
Expand Down

0 comments on commit b26a7da

Please sign in to comment.