Retexturing an Object Without Converting It
This tutorial explains how to change an object’s texture(s) without converting it to the .e or .3ds format.
Some object editing can only be done by converting a .bin file to another format, but simply replacing one texture with another can be a very quick process because the .bin file can be edited directly.
Find the .bin file. If it’s an original object it’ll in obj.crf or mesh.crf and will need to be extracted.
Also remember that a newer version could be in a mod package like the Enhancement Pack.
If you’re working with an AI mesh and you change the name of the edited .bin file, you will also need to extract the original .cal file and rename it to match.
Open it in a hex editor (plain text editors, like notepad, are not recommended - they’re not capable of making some kinds of changes)
The program
XVI32 is being used for this tutorial.
Explanation of .bin Files
Here is an example of what you will see, with the object’s current textures highlighted.
-
Example: the highlighted character’s text is “A” and the hex value of “A” is 41. The value on its own doesn’t mean anything to the Dark Engine - it’s just a part of a block of data.
The texture filenames are near the start of the file
Changing a texture filename
ALWAYS be in
overwrite mode when editing these files. The mode is shown in status bar in the bottom left of the window. The
Insert key toggles it just like in many programs, but in this case overwrite is the default.
Example 1
In this example the new filename is the same length as the original. Bedding8.png becomes newbed01.dds
Example 2
In this example the new filename is longer, which is where the overwrite mode becomes very important.
Just like example 1, select the first of the original filename characters and type over it. Some of the blank spaces after the original filename will get overwritten, but, being in overwrite mode, the remaining characters in the file will not be disturbed.
-
Example 3
In this example the new filename is shorter. Bedding8.png becomes bed7.gif
Type over the old filename as in the other examples. The remaining part of the original filename will still be there.
-
To fully remove the old filename, go to the panel on the left. The hexadecimal values for each of the unwanted characters should be changed to 00.
-
Only change the hex values to 00. DO NOT delete them or type spaces in the text pane.
Once again the remaining characters are undisturbed (because the program is in overwrite mode)
The End
Advantages
Quick and simple process
No need to convert the object, so no need to open up other programs and deal with temporary files.
Converting an object can sometimes cause errors, with material settings being lost and sometimes polygon errors. Some objects can’t be converted at all due to complexity.
Disadvantages
Takes a bit of getting used to.
This doesn’t allow textures to be remapped.
If two materials use the same texture and you only want to change one of them, you have to use trial and error.
It is the opinion of the author that the advantages far outweigh the disadvantages.
— Magus R Soul 2020/01/11 17:44