Post by JADERLINK on Nov 13, 2023 4:32:40 GMT 10
Program designed to extract and repack .bin/.tpl files from re4 Uhd;
Note: the topic is being translated by google translator, because I only know Portuguese Brazil.
SourceCode: github.com/JADERLINK/RE4-UHD-BIN-TOOL
Download: github.com/JADERLINK/RE4-UHD-BIN-TOOL/releases
The content below is a translation of the README.md file of the source code.
Program designed to extract and repackage .bin/.tpl files from re4 Uhd;
Note1: the program does not support colors by vertices (.obj and .smd do not support this);
Note2: The Morph field is not supported (this functionality was not implemented in the program);
Note3: This README.md file is incomplete. I will add more information in the future;
Update: B.1.0.07
Now, when extracting the .bin file the "normals" will be normalized instead of being divided by a standard value, so it is now possible to extract the .bin files generated by the percia tool without errors.
When repacking, the normals of the .obj and .smd files will be normalized to avoid errors.
The program, when generating .obj and .smd files, will no longer have non-significant zeros in the numbers, a change made to generate smaller files.
Update: B.1.0.0.6
Fixed bug when loading the .idxmaterial file;
Update: B.1.0.0.5
The program now supports extracting and creating .BIN files above the vertex limit;
Attention: .BINs with vertices above the limit only work correctly if they are used within Scenario .SMD files;
In other situations, the limit is still valid;
Update: B.1.0.0.4
Fixed bug where MTL file with PACK_ID with IDs that contained letters, the letters were not considered.
Update: B.1.0.0.3
Error occurred, when having material without the main texture "map_Kd", it will be filled in as Pack ID 00000000 and Texture ID 000;
Now, if the number of vertices is greater than the file limit, the program will warn you. (The BIN file will not be created);
Update: B.1.0.0.2
Fixed bug that deformed the 3d model mesh, "quad" faces were being created incorrectly;
Update: B.1.0.0.1
* bug fixes: when generating the .mtl file with a .tpl that is not the correct one for the .bin, the program was crashing, this has been corrected, now if there is a missing reference in the .tpl file, the .mtl file will be filled in " 00000000/0000.null", this means that the .tpl provided is not the .bin in question;
* In the repack, when reading the dimensions of the images, each image will now be read only once, instead of several times as was done in the previous version.
*Note: This version is compatible with files from the previous version.
## JADERLINK_UHD_BIN_TOOL.exe
Program responsible for extracting and recompiling .bin/.tpl files;
Below are the program's "inputs" and "outputs":
Note: the program can receive one or two files as parameters;
* JADERLINK_UHD_BIN_TOOL.exe "file.BIN"
Extract the bin file and generate the files: file.obj, file.smd, file.idxmaterial and file.idxuhdbin;
If there is a .tpl file in the folder with the same name as the bin, it will be considered as if the file had also been passed as a parameter;
* JADERLINK_UHD_BIN_TOOL.exe "file.TPL"
Extract the tpl file and it will generate the file: file.idxuhdtpl;
* JADERLINK_UHD_BIN_TOOL.exe "file.BIN" "file.TPL"
Will generates the files mentioned above plus the file: file.mtl;
* JADERLINK_UHD_BIN_TOOL.exe "file.OBJ"
Repacks the .bin file, requests the .idxuhdbin file of the same name, the .mtl file of the same name and optionally the .idxuhdtpl file in the same folder
Note: you can pass the .mtl or .idxuhdtpl/.tpl file as a second parameter, the result of the operation is the same as mentioned above;
Note2: operations with the .mtl involved require that the same mtl folder have the textures it references;
* JADERLINK_UHD_BIN_TOOL.exe "file.OBJ" "file.idxmaterial"
Repacks the .bin file, using the .obj and .idxmaterial files, only requests the .idxuhdbin file in the same folder;
* JADERLINK_UHD_BIN_TOOL.exe "file.SMD"
Same explanation as the .obj file, but now doing the repack using the .smd file;
* JADERLINK_UHD_BIN_TOOL.exe "file.SMD" "file.idxmaterial"
The same as I explained above.
* JADERLINK_UHD_BIN_TOOL.exe "file.MTL"
"Extracts" the .mtl file creates the files: File.Repack.idxmaterial and File.Repack.idxuhdtpl
Note: you can pass the .tpl/.idxuhdtpl file as a second parameter, which it will use as a reference to order the textures in the tpl;
Note2: operations with the .mtl involved require that the same mtl folder have the textures it references;
* JADERLINK_UHD_BIN_TOOL.exe "file.tpl" "file.idxmaterial"
Creates the .mtl file;
* JADERLINK_UHD_BIN_TOOL.exe "file.idxuhdtpl" "file.idxmaterial"
It also creates the .mtl file;
## Explanation of what each file is for:
* .BIN: this is the game's 3d model.
* .TPL: this is a file that stores the reference of the textures used in the model.
* .OBJ: 3d model that can be edited in a 3d editor;
* .MTL: file that contains the materials to be loaded into the 3d editor;
* .SMD: (StudioModel Data) 3d model that can be edited in a 3d editor (with support for bones);
* .IDXUHDBIN: file required to recompile the .bin file
* .IDXUHDTPL: is editable version of the .TPL file;
* .IDXMATERIAL: is the file that contains the materials present in .bin (can be edited);
## .IDXUHDBIN file
(I will post information about this file here in the future)
## .IDXUHDTPL file
Can be used to edit/create .tpl files
(I will include information about this file here in the future)
## .IDXMATERIAL file
Can be used to edit bin materials without using the .mtl file
(I will include information about this file here in the future)
## .MTL file
It is used to load the textures in the 3D editor, it can also be used to recompile the materials, or directly the .bin file;
(I will include information about this file here in the future)
## Bone order 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 (search for the program on the re4 forum)
## 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.
Also remember that the textures must be in the folder with the name of your .PACK file and this folder must be next to the .mtl file;
**By: JADERLINK**
**2024-03-30**
Note: the topic is being translated by google translator, because I only know Portuguese Brazil.
SourceCode: github.com/JADERLINK/RE4-UHD-BIN-TOOL
Download: github.com/JADERLINK/RE4-UHD-BIN-TOOL/releases
The content below is a translation of the README.md file of the source code.
Program designed to extract and repackage .bin/.tpl files from re4 Uhd;
Note1: the program does not support colors by vertices (.obj and .smd do not support this);
Note2: The Morph field is not supported (this functionality was not implemented in the program);
Note3: This README.md file is incomplete. I will add more information in the future;
Update: B.1.0.07
Now, when extracting the .bin file the "normals" will be normalized instead of being divided by a standard value, so it is now possible to extract the .bin files generated by the percia tool without errors.
When repacking, the normals of the .obj and .smd files will be normalized to avoid errors.
The program, when generating .obj and .smd files, will no longer have non-significant zeros in the numbers, a change made to generate smaller files.
Update: B.1.0.0.6
Fixed bug when loading the .idxmaterial file;
Update: B.1.0.0.5
The program now supports extracting and creating .BIN files above the vertex limit;
Attention: .BINs with vertices above the limit only work correctly if they are used within Scenario .SMD files;
In other situations, the limit is still valid;
Update: B.1.0.0.4
Fixed bug where MTL file with PACK_ID with IDs that contained letters, the letters were not considered.
Update: B.1.0.0.3
Error occurred, when having material without the main texture "map_Kd", it will be filled in as Pack ID 00000000 and Texture ID 000;
Now, if the number of vertices is greater than the file limit, the program will warn you. (The BIN file will not be created);
Update: B.1.0.0.2
Fixed bug that deformed the 3d model mesh, "quad" faces were being created incorrectly;
Update: B.1.0.0.1
* bug fixes: when generating the .mtl file with a .tpl that is not the correct one for the .bin, the program was crashing, this has been corrected, now if there is a missing reference in the .tpl file, the .mtl file will be filled in " 00000000/0000.null", this means that the .tpl provided is not the .bin in question;
* In the repack, when reading the dimensions of the images, each image will now be read only once, instead of several times as was done in the previous version.
*Note: This version is compatible with files from the previous version.
## JADERLINK_UHD_BIN_TOOL.exe
Program responsible for extracting and recompiling .bin/.tpl files;
Below are the program's "inputs" and "outputs":
Note: the program can receive one or two files as parameters;
* JADERLINK_UHD_BIN_TOOL.exe "file.BIN"
Extract the bin file and generate the files: file.obj, file.smd, file.idxmaterial and file.idxuhdbin;
If there is a .tpl file in the folder with the same name as the bin, it will be considered as if the file had also been passed as a parameter;
* JADERLINK_UHD_BIN_TOOL.exe "file.TPL"
Extract the tpl file and it will generate the file: file.idxuhdtpl;
* JADERLINK_UHD_BIN_TOOL.exe "file.BIN" "file.TPL"
Will generates the files mentioned above plus the file: file.mtl;
* JADERLINK_UHD_BIN_TOOL.exe "file.OBJ"
Repacks the .bin file, requests the .idxuhdbin file of the same name, the .mtl file of the same name and optionally the .idxuhdtpl file in the same folder
Note: you can pass the .mtl or .idxuhdtpl/.tpl file as a second parameter, the result of the operation is the same as mentioned above;
Note2: operations with the .mtl involved require that the same mtl folder have the textures it references;
* JADERLINK_UHD_BIN_TOOL.exe "file.OBJ" "file.idxmaterial"
Repacks the .bin file, using the .obj and .idxmaterial files, only requests the .idxuhdbin file in the same folder;
* JADERLINK_UHD_BIN_TOOL.exe "file.SMD"
Same explanation as the .obj file, but now doing the repack using the .smd file;
* JADERLINK_UHD_BIN_TOOL.exe "file.SMD" "file.idxmaterial"
The same as I explained above.
* JADERLINK_UHD_BIN_TOOL.exe "file.MTL"
"Extracts" the .mtl file creates the files: File.Repack.idxmaterial and File.Repack.idxuhdtpl
Note: you can pass the .tpl/.idxuhdtpl file as a second parameter, which it will use as a reference to order the textures in the tpl;
Note2: operations with the .mtl involved require that the same mtl folder have the textures it references;
* JADERLINK_UHD_BIN_TOOL.exe "file.tpl" "file.idxmaterial"
Creates the .mtl file;
* JADERLINK_UHD_BIN_TOOL.exe "file.idxuhdtpl" "file.idxmaterial"
It also creates the .mtl file;
## Explanation of what each file is for:
* .BIN: this is the game's 3d model.
* .TPL: this is a file that stores the reference of the textures used in the model.
* .OBJ: 3d model that can be edited in a 3d editor;
* .MTL: file that contains the materials to be loaded into the 3d editor;
* .SMD: (StudioModel Data) 3d model that can be edited in a 3d editor (with support for bones);
* .IDXUHDBIN: file required to recompile the .bin file
* .IDXUHDTPL: is editable version of the .TPL file;
* .IDXMATERIAL: is the file that contains the materials present in .bin (can be edited);
## .IDXUHDBIN file
(I will post information about this file here in the future)
## .IDXUHDTPL file
Can be used to edit/create .tpl files
(I will include information about this file here in the future)
## .IDXMATERIAL file
Can be used to edit bin materials without using the .mtl file
(I will include information about this file here in the future)
## .MTL file
It is used to load the textures in the 3D editor, it can also be used to recompile the materials, or directly the .bin file;
(I will include information about this file here in the future)
## Bone order 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 (search for the program on the re4 forum)
## 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.
Also remember that the textures must be in the folder with the name of your .PACK file and this folder must be next to the .mtl file;
**By: JADERLINK**
**2024-03-30**