JADERLINK RE4 UHD SCENARIO SMD TOOL
Nov 22, 2023 6:51:07 GMT 10
Mr.Curious and UNKNOWN MODDER like this
Post by JADERLINK on Nov 22, 2023 6:51:07 GMT 10
Extract and repack RE4 UHD scenario smd file using only an .OBJ file
Note: the topic is being translated by google translator, because I only know Portuguese Brazil.
SourceCode: github.com/JADERLINK/RE4-UHD-SCENARIO-SMD-TOOL
Download: github.com/JADERLINK/RE4-UHD-SCENARIO-SMD-TOOL/releases
The content below is a translation of the README.md file of the source code.
Programs designed to extract and repack scenarios using only an .OBJ file
## Tutorial
Editing SMD Scenarios - Tutorial By JADERLINK
Editing R100 SMD Scenario - Tutorial By JADERLINK
## Updates
Update: B.1.0.09
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 file will be normalized to avoid errors.
The program, when generating the .obj file, will no longer have non-significant zeros in the numbers, a change made to generate smaller files.
Update: B.1.0.0.8
Fixed bug when loading the .idxmaterial file;
Update: B.1.0.0.7
The program now supports extracting and creating .SMD with .BIN files above the vertex limit;
Attention: .BINs with vertices above the limit only work correctly if they are used within Scenario .SMD files;
Use above the vertex limit is permitted, but use with caution.
In other situations, the limit is still valid;
Update: B.1.0.0.6
Fixed bug in which the normals of models that have rotation were not rotated, so, if you are using an .obj from previous versions, recalculate the normals;
Fixed a bug that, when extracting vertex colors, was being placed incorrectly in the obj file;
Update: B.1.0.0.5
Fixed bug where MTL file with PACK_ID with IDs that contained letters, the letters were not considered.
Update: B.1.0.0.4
Error occurred, when having material without the main texture "map_Kd", it will be filled with Pack ID00000000 and texture ID 000;
Now, if the number of vertices is greater than the file limit, the program will warn you. (The SMD file will not be created);
Update: B.1.0.0.3
Fixed bug that deformed the 3d model mesh, "quad" faces were being created incorrectly;
Update: B.1.0.0.2
Added compatibility with other 3D editors that do not support special #: characters, such as 3dsMax;
Also added a check on the name of the groups, so if the name is wrong, the program will warn you;
Files from the previous version are compatible with this version;
Update: B.1.0.0.1
* Added support for R100, now you can extract this scene divided into 7 SMD, in a single .obj file, use "R100.r100extract"; (See more formations below);
* Added .Smd file "magic" check;
* In the ".idxuhdscenario" and ".idxuhdsmd" files, the "Magic" and "ExtraParameterAmount" fields were added, which will only appear if they are used.
* The default "Magic" is 0x0040;
* Fixed the extraction of the "vertexColors" field in the .obj file;
* Files from the previous version are compatible with this version.
## RE4_UHD_SCENARIO_SMD_TOOL.exe
Program designed to extract and repackage .SMD scene files from re4 Uhd;
##Extract:
Use the bat: "RE4_UHD_SCENARIO_SMD_TOOL Extract all scenario SMD.bat"
In this example I will use the file: r204_04.SMD
When extracting, the following files will be generated:
* r204_04.scenario.idxuhdscenario // important configuration file, for repack using .obj;
* r204_04.scenario.idxuhdsmd // important settings file, for repack using .bin files
* r204_04.scenario.obj // content of the entire scenario, this is the file you will edit;
* r204_04.scenario.mtl // file that accompanies the .obj;
* r204_04.scenario.idxmaterial // content of materials (alternative to using .mtl);
* r204_04.scenario.idxuhdtpl // represents the .tpl file, present in .smd;
* r204_04\ //folder containing .bin and .tpl files;
##Repack:
There are two ways to repack.
* using the .idxuhdscenario file, the repack will be done using the .obj file;
* using the .idxuhdsmd file, the repack will be done with the .bin files from the "r204_04" folder;
## Repack with .idxuhdscenario
Use the bat: "RE4_UHD_SCENARIO_SMD_TOOL Repack all with idxuhdscenario.bat"
In this example I will use the file: "r204_04.scenario.idxuhdscenario"
that will request the files:
* r204_04.scenario.obj (required)
* r204_04.scenario.mtl OR r204_04.scenario.idxmaterial + r204_04.scenario.idxuhdtpl
When repacking, the following files will be generated:
* r204_04.SMD (this is the file to be placed in .udas);
* r204_04.scenario.Repack.idxmaterial
* r204_04.scenario.Repack.idxuhdtpl
* r204_04.scenario.Repack.idxuhdsmd
* r204_04\ //folder containing the new .bin files and the new .tpl; (warning: it overwrites files);
## Repack with .idxuhdsmd
Use the bat: "RE4_UHD_SCENARIO_SMD_TOOL Repack all with idxuhdsmd.bat"
In this example I will use the file: "r204_04.scenario.idxuhdsmd"
that will request the files:
* the .bin and .tpl files from the "r204_04" folder;
When repacking, the following files will be generated:
* r204_04.SMD (this is the file to be placed in .udas);
Note: this is the old method, in which bins are edited individually, however repacking with .idxuhdscenario creates new modified bins, and a new .idxuhdsmd, which can be used to do this repack; this option is for if you want to place a .bin in the .smd that the program cannot create.
## About r204_04.scenario.obj
This file is where the entire scenario is, in it the BIN files are separated by groups, in which the nomenclature must be respected:
Example:
UHDSCENARIO#SMD_000#SMX_000#TYPE_08#BIN_000#
UHDSCENARIO#SMD_001#SMX_001#TYPE_08#BIN_001#
Being:
* The group name must begin with "UHDSCENARIO", and be divided by #
* The order of the fields cannot be changed;
* SMD_000 this is the ID of the Entry/Line position in the .SMD, the numbering is in decimal
* SMX_000 this is the SMX ID, see the .SMX file, the numbering is in decimal
* TYPE_08 I don't know what it is, the numbering is in hexadecimal.
* BIN_000 this is the id of the bin that will be used, for repeated bins, only the first will be considered, (the next one with the same id, the same model as the first will be used).
* the group name must end with # (because after saving the file, Blender puts more text at the end of the group name)
----> In Update B.1.0.0.2, the name of objects/groups can also be:
UHDSCENARIO_SMD_000_SMX_000_TYPE_08_BIN_000_
UHDSCENARIO_SMD_001_SMX_001_TYPE_08_BIN_001_
----> About group checks:
* In Repack, if the text "The group name is wrong;" appears on the right side of the group name, it means that the group name is wrong, and your SMD file will be wrong;
* And if the right side says "Warning: Group not used;" this group is being ignored by my program, if, in fact, you would like to use it, you must fix the group name;
**Editing the .obj file in Blender**
In the .obj importer, check the "Split By Group" box on the right side of the screen.
With the imported file, each object represents a .BIN file
Note: if you have a problem with transparent textures turning black, use this plugin: github.com/JADERLINK/Blender_Transparency_Fix_Plugin
**When saving the file**
Check the "Triangulated Mesh" and "Object Groups" and "Colors" boxes.
in the .obj file the name of the groups will have "_Mesh" at the end of the name (that's why in the editor the group name ends with # to avoid problems)
## About .idxuhdscenario / .idxuhdsmd
Below is the list of most important commands present in the file:
* SmdAmount:106 // represents the amount of Entry/Line in .Smd (you can change it, but in some scenarios it may crash the game)
* SmdFileName:r204_04.SMD // this is the name of the Smd file that will be generated
* BinFolder:r204_04 // this is the name of the folder where the .bin and .tpl files are saved;
UseIdxMaterial:false // if activated, the .idxmaterial file will be used instead of the .mtl to perform the repack (field only in idxuhdscenario);
* EnableVertexColor:false // if activated creates bins with the "Vertex Color" field, but the .obj does not have adequate support for this (field only in idxuhdscenario);
BinAmount:106 // number of bins files that will be placed in .smd (field only in idxuhdsmd);
* the other commands that start with numbers are self-describing (the number is the Smd ID)
* the "_position*" field is divided by 100, in relation to the original value;
* the "_objectStatus" field refers to the "TYPE" field in the .obj;
# about .idxmaterial and .idxuhdtpl
See about residentevilmodding.boards.net/thread/18547/jaderlink-uhd-bin-tool
# about .r100extract and r100extract
To extract the scenario, place the necessary .Smd files next to .r100extract;
Note: in the tutorial topic there is a tutorial on how to edit r100;
#Print
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-SCENARIO-SMD-TOOL
Download: github.com/JADERLINK/RE4-UHD-SCENARIO-SMD-TOOL/releases
The content below is a translation of the README.md file of the source code.
Programs designed to extract and repack scenarios using only an .OBJ file
## Tutorial
Editing SMD Scenarios - Tutorial By JADERLINK
Editing R100 SMD Scenario - Tutorial By JADERLINK
## Updates
Update: B.1.0.09
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 file will be normalized to avoid errors.
The program, when generating the .obj file, will no longer have non-significant zeros in the numbers, a change made to generate smaller files.
Update: B.1.0.0.8
Fixed bug when loading the .idxmaterial file;
Update: B.1.0.0.7
The program now supports extracting and creating .SMD with .BIN files above the vertex limit;
Attention: .BINs with vertices above the limit only work correctly if they are used within Scenario .SMD files;
Use above the vertex limit is permitted, but use with caution.
In other situations, the limit is still valid;
Update: B.1.0.0.6
Fixed bug in which the normals of models that have rotation were not rotated, so, if you are using an .obj from previous versions, recalculate the normals;
Fixed a bug that, when extracting vertex colors, was being placed incorrectly in the obj file;
Update: B.1.0.0.5
Fixed bug where MTL file with PACK_ID with IDs that contained letters, the letters were not considered.
Update: B.1.0.0.4
Error occurred, when having material without the main texture "map_Kd", it will be filled with Pack ID00000000 and texture ID 000;
Now, if the number of vertices is greater than the file limit, the program will warn you. (The SMD file will not be created);
Update: B.1.0.0.3
Fixed bug that deformed the 3d model mesh, "quad" faces were being created incorrectly;
Update: B.1.0.0.2
Added compatibility with other 3D editors that do not support special #: characters, such as 3dsMax;
Also added a check on the name of the groups, so if the name is wrong, the program will warn you;
Files from the previous version are compatible with this version;
Update: B.1.0.0.1
* Added support for R100, now you can extract this scene divided into 7 SMD, in a single .obj file, use "R100.r100extract"; (See more formations below);
* Added .Smd file "magic" check;
* In the ".idxuhdscenario" and ".idxuhdsmd" files, the "Magic" and "ExtraParameterAmount" fields were added, which will only appear if they are used.
* The default "Magic" is 0x0040;
* Fixed the extraction of the "vertexColors" field in the .obj file;
* Files from the previous version are compatible with this version.
## RE4_UHD_SCENARIO_SMD_TOOL.exe
Program designed to extract and repackage .SMD scene files from re4 Uhd;
##Extract:
Use the bat: "RE4_UHD_SCENARIO_SMD_TOOL Extract all scenario SMD.bat"
In this example I will use the file: r204_04.SMD
When extracting, the following files will be generated:
* r204_04.scenario.idxuhdscenario // important configuration file, for repack using .obj;
* r204_04.scenario.idxuhdsmd // important settings file, for repack using .bin files
* r204_04.scenario.obj // content of the entire scenario, this is the file you will edit;
* r204_04.scenario.mtl // file that accompanies the .obj;
* r204_04.scenario.idxmaterial // content of materials (alternative to using .mtl);
* r204_04.scenario.idxuhdtpl // represents the .tpl file, present in .smd;
* r204_04\ //folder containing .bin and .tpl files;
##Repack:
There are two ways to repack.
* using the .idxuhdscenario file, the repack will be done using the .obj file;
* using the .idxuhdsmd file, the repack will be done with the .bin files from the "r204_04" folder;
## Repack with .idxuhdscenario
Use the bat: "RE4_UHD_SCENARIO_SMD_TOOL Repack all with idxuhdscenario.bat"
In this example I will use the file: "r204_04.scenario.idxuhdscenario"
that will request the files:
* r204_04.scenario.obj (required)
* r204_04.scenario.mtl OR r204_04.scenario.idxmaterial + r204_04.scenario.idxuhdtpl
When repacking, the following files will be generated:
* r204_04.SMD (this is the file to be placed in .udas);
* r204_04.scenario.Repack.idxmaterial
* r204_04.scenario.Repack.idxuhdtpl
* r204_04.scenario.Repack.idxuhdsmd
* r204_04\ //folder containing the new .bin files and the new .tpl; (warning: it overwrites files);
## Repack with .idxuhdsmd
Use the bat: "RE4_UHD_SCENARIO_SMD_TOOL Repack all with idxuhdsmd.bat"
In this example I will use the file: "r204_04.scenario.idxuhdsmd"
that will request the files:
* the .bin and .tpl files from the "r204_04" folder;
When repacking, the following files will be generated:
* r204_04.SMD (this is the file to be placed in .udas);
Note: this is the old method, in which bins are edited individually, however repacking with .idxuhdscenario creates new modified bins, and a new .idxuhdsmd, which can be used to do this repack; this option is for if you want to place a .bin in the .smd that the program cannot create.
## About r204_04.scenario.obj
This file is where the entire scenario is, in it the BIN files are separated by groups, in which the nomenclature must be respected:
Example:
UHDSCENARIO#SMD_000#SMX_000#TYPE_08#BIN_000#
UHDSCENARIO#SMD_001#SMX_001#TYPE_08#BIN_001#
Being:
* The group name must begin with "UHDSCENARIO", and be divided by #
* The order of the fields cannot be changed;
* SMD_000 this is the ID of the Entry/Line position in the .SMD, the numbering is in decimal
* SMX_000 this is the SMX ID, see the .SMX file, the numbering is in decimal
* TYPE_08 I don't know what it is, the numbering is in hexadecimal.
* BIN_000 this is the id of the bin that will be used, for repeated bins, only the first will be considered, (the next one with the same id, the same model as the first will be used).
* the group name must end with # (because after saving the file, Blender puts more text at the end of the group name)
----> In Update B.1.0.0.2, the name of objects/groups can also be:
UHDSCENARIO_SMD_000_SMX_000_TYPE_08_BIN_000_
UHDSCENARIO_SMD_001_SMX_001_TYPE_08_BIN_001_
----> About group checks:
* In Repack, if the text "The group name is wrong;" appears on the right side of the group name, it means that the group name is wrong, and your SMD file will be wrong;
* And if the right side says "Warning: Group not used;" this group is being ignored by my program, if, in fact, you would like to use it, you must fix the group name;
**Editing the .obj file in Blender**
In the .obj importer, check the "Split By Group" box on the right side of the screen.
With the imported file, each object represents a .BIN file
Note: if you have a problem with transparent textures turning black, use this plugin: github.com/JADERLINK/Blender_Transparency_Fix_Plugin
**When saving the file**
Check the "Triangulated Mesh" and "Object Groups" and "Colors" boxes.
in the .obj file the name of the groups will have "_Mesh" at the end of the name (that's why in the editor the group name ends with # to avoid problems)
## About .idxuhdscenario / .idxuhdsmd
Below is the list of most important commands present in the file:
* SmdAmount:106 // represents the amount of Entry/Line in .Smd (you can change it, but in some scenarios it may crash the game)
* SmdFileName:r204_04.SMD // this is the name of the Smd file that will be generated
* BinFolder:r204_04 // this is the name of the folder where the .bin and .tpl files are saved;
UseIdxMaterial:false // if activated, the .idxmaterial file will be used instead of the .mtl to perform the repack (field only in idxuhdscenario);
* EnableVertexColor:false // if activated creates bins with the "Vertex Color" field, but the .obj does not have adequate support for this (field only in idxuhdscenario);
BinAmount:106 // number of bins files that will be placed in .smd (field only in idxuhdsmd);
* the other commands that start with numbers are self-describing (the number is the Smd ID)
* the "_position*" field is divided by 100, in relation to the original value;
* the "_objectStatus" field refers to the "TYPE" field in the .obj;
# about .idxmaterial and .idxuhdtpl
See about residentevilmodding.boards.net/thread/18547/jaderlink-uhd-bin-tool
# about .r100extract and r100extract
To extract the scenario, place the necessary .Smd files next to .r100extract;
Note: in the tutorial topic there is a tutorial on how to edit r100;
By: JADERLINK
2024-03-30