Post by JADERLINK on Jan 1, 2024 5:25:19 GMT 10
Extract and repack ps2 re4 BIN files
Note: the topic is being translated by google translator, because I only know Portuguese Brazil.
SourceCode: github.com/JADERLINK/RE4-PS2-BIN-TOOL
Download: github.com/JADERLINK/RE4-PS2-BIN-TOOL/releases
The content below is a translation of the README.md file of the source code.
This is the code resulting from research on the .bin files of ps2 re4, carried out by Jaderlink in conjunction with HardRain.
You can consider that the program is in the final phase of development in terms of usability. You can edit all of the game's BINs, with support for OBJ and SMD files (bone weight support) and it also recognizes the texture IDs in the MTL file;
Update: B.1.4.0.0
Now "Extract" and "Repack" are done only by one program, I improved how the texture indexes are assigned to the model, which can be done using the MTL file, or the "ixdmaterial" file;
"Bones" names are now named after the "Bone" ID;
RE4_PS2_BIN_TOOL.exe
Program designed to either extract or recompile the BIN file;
Extract:
When passing a BIN file as a parameter to the program, the program will generate the following files:
* .OBJ and .SMD: contains the content of the 3d model.
* .MTL: file that accompanies the .obj is used to load textures into the models, however the textures must be extracted from the .TPL, and enumerated from zero.
(Note: Now this file is used in BIN file Repack)
* .IDXBIN: is the file that contains the content that is not in the .obj or .smd, but is necessary to recompile the .BIN;
* .IDXMATERIAL: file that contains the model materials, this file can be used when recompiling the BIN file;
Repack:
To create a new .BIN file from the contents of the .OBJ or .SMD
- The program receives as input an .obj or .smd file, and must also have an .idxbin and .MTL file in the same folder with the same name as the supplied file.
- If you pass an .idxmaterial file as a second parameter, this file will be used instead of the .MTL file.
- The MTL file is where the IDs of the textures used in each material are defined;
Materials/Textures in MTL
Now, the MTL file is where the IDs (TPL indexes) of the textures used in the BIN file are defined;
Now, the texture name has to be just a number that is the texture ID;
The MTL file expects these textures to be in a folder with the same name as the BIN file that was extracted;
To extract the textures from the TPL file, use the RE4-PS2-TPL-TOOL program from version B.1.1.0.0;
Order of bones in the .SMD file
To fix the order of the bone IDs in the smd files, after being exported from Blender or other model editing software, use the program: GC_GC_Skeleton_Changer.exe
Loading textures into the .SMD file
In Blender to load the .SMD model with the textures, in a new "project", first import the .obj file for it to load the textures, delete the imported .obj model, now import the .smd model, now it will be loaded with the textures.
Old HardRain thread:
residentevilmodding.boards.net/thread/17490/re4-ps2-model-converter-tool
BY: JADERLINK
2023-12-31
Note: the topic is being translated by google translator, because I only know Portuguese Brazil.
SourceCode: github.com/JADERLINK/RE4-PS2-BIN-TOOL
Download: github.com/JADERLINK/RE4-PS2-BIN-TOOL/releases
The content below is a translation of the README.md file of the source code.
This is the code resulting from research on the .bin files of ps2 re4, carried out by Jaderlink in conjunction with HardRain.
You can consider that the program is in the final phase of development in terms of usability. You can edit all of the game's BINs, with support for OBJ and SMD files (bone weight support) and it also recognizes the texture IDs in the MTL file;
Update: B.1.4.0.0
Now "Extract" and "Repack" are done only by one program, I improved how the texture indexes are assigned to the model, which can be done using the MTL file, or the "ixdmaterial" file;
"Bones" names are now named after the "Bone" ID;
RE4_PS2_BIN_TOOL.exe
Program designed to either extract or recompile the BIN file;
Extract:
When passing a BIN file as a parameter to the program, the program will generate the following files:
* .OBJ and .SMD: contains the content of the 3d model.
* .MTL: file that accompanies the .obj is used to load textures into the models, however the textures must be extracted from the .TPL, and enumerated from zero.
(Note: Now this file is used in BIN file Repack)
* .IDXBIN: is the file that contains the content that is not in the .obj or .smd, but is necessary to recompile the .BIN;
* .IDXMATERIAL: file that contains the model materials, this file can be used when recompiling the BIN file;
Repack:
To create a new .BIN file from the contents of the .OBJ or .SMD
- The program receives as input an .obj or .smd file, and must also have an .idxbin and .MTL file in the same folder with the same name as the supplied file.
- If you pass an .idxmaterial file as a second parameter, this file will be used instead of the .MTL file.
- The MTL file is where the IDs of the textures used in each material are defined;
Materials/Textures in MTL
Now, the MTL file is where the IDs (TPL indexes) of the textures used in the BIN file are defined;
Now, the texture name has to be just a number that is the texture ID;
The MTL file expects these textures to be in a folder with the same name as the BIN file that was extracted;
To extract the textures from the TPL file, use the RE4-PS2-TPL-TOOL program from version B.1.1.0.0;
Order of bones in the .SMD file
To fix the order of the bone IDs in the smd files, after being exported from Blender or other model editing software, use the program: GC_GC_Skeleton_Changer.exe
Loading textures into the .SMD file
In Blender to load the .SMD model with the textures, in a new "project", first import the .obj file for it to load the textures, delete the imported .obj model, now import the .smd model, now it will be loaded with the textures.
Old HardRain thread:
residentevilmodding.boards.net/thread/17490/re4-ps2-model-converter-tool
BY: JADERLINK
2023-12-31