I did some investigation into texture editing today, and I’d like to share my findings with the community!

To anyone reading this halfway through 2020, keep in mind that this was written almost two years ago when people were just starting to figure out texture editing for the game. It has not been updated since.

Setup

Texture files are stored in the chunk packages. You can use World Chunk Tool to unpack the chunks.

Tex files aren’t editable (not on my setup anyways), so you’ll need the TEX/DDS tool to convert between them and DDS.

I use Nvidia Photoshop Tools to edit DDS files. You can use the same TEX/DDS tool to convert them back to Tex.

Theory

Tex files contain 2-dimensional color maps (they are basically normal images.) They are applied to a 3-dimensional model, in the way you might wrap a (3d) bike with (2d) wrapping paper.

I do not know where the 3d model is defined, but it is probably in the mod3 file (which is not readable). I also do not know how the Tex file is actually wrapped onto the 3d model. The code for this is probably in the mod3 file, but may be at the end of the mrl3 file as well.

It seems that most armors use primarily the BML Tex file, and all other Tex files are more or less unimportant. Armors with transparency (some of which do not have BML files) work somewhat differently in the mod3 file, and editing their other Tex files is not at all straightforward. (There are a lot of purple rainbows.)

The mrl3 file is basically an array with links to various Tex files. Many of these files are just the Tex files for the specific armor, but there are also links to skin files. We’ll discuss mrl3 editing in the Abrasive Retexturing section and afterwards. There is also some illegible stuff at the end of the array, but the array elements are easily readable with a hex editor.

The combination of the mrl3 and mod3 files is actually enough to “transmog” armor, since the mod3 has the model and the mrl3 links to all the textures. As a result, in order to give armorA the appearance of armorB, we copy the mod3/mrl3 files from armorB to the nativePC directory for armorA, and rename them. (The client-side transmog mod does this, but also unnecessarily copies the Tex files.)

pl022 is Girros armor. pl001 is Leather armor.

There are some other metadata files (like .ctc and .evbd), as well as a “sound” folder next to the “mod” folder. I recommend copying these as well, for the only reason that I don’t know what they do.

Retexturing And Removal

To retexture an armor or remove parts of it, we only have to edit the BML Tex file (I have not tested non-BML armors, they’re too scary.) We use the TEX/DDS tool to convert to and from DDS, which is what Photoshop accepts.

Let’s run through an example. We’re going to retexture and remove part of the Leather Gloves. The BML Tex file is located at {extracted folder from World Chunk Tool}/pl/f_equip/pl001_0000/arm/mod/f_arm001_0000_BML.tex . We drop it on the TEX/DDS converter and get a DDS file.

To keep everything organized, let’s move the DDS file to its proper nativePC folder: {MHW}/nativePC/pl/f_equip/pl001_0000/arm/mod/ . Now, we'll edit it in Photoshop.

Here are the open/save settings for DDS with the Nvidia plugin:

When you open a file, open the channels window and add an Alpha channel if there is not one already. If you had to add the alpha channel, make it entirely white.

This is the default glove appearance.

To remove parts of an armor, simply run over them with a black brush on the alpha channel. Here I recklessly removed most of the glove (for proof of concept!)

Observe how the glove has mostly disappeared.

To retexture an armor, simply edit the file on the RGB channel. Here I made everything blue and left a message on the glove.

You can see “here” backwards on the outside of the glove.

In order for the game to use the new texture, you will need to turn it back into a Tex file. Save the DDS file with the settings shown above, and then drop it on the TEX/DDS converter. We already moved the DDS to the proper nativePC directory, so that’s all we need to do. To make the game reload the texture, you can switch between armors a few times (let me know if you have a better method).

Abrasive Retexturing

There’s another way to retexture, which gives unpredictable high-variance results (threat 3 tempered investigations anyone?). Recall that the game knows what texture file to load by reading the mrl3 file. We can change the links in the mrl3 file directly, and the game will read a different texture file. What makes this unpredictable is that the wrapping method for the mod3 file is unique for (almost) every armor, so you are kind of sticking a square peg in a circular hole if you tell the Girros pants model to use the Zorah pants texture. But let’s do it anyways.

First, copy the Girros mrl3 file from {chunk}/pl/f_equip/pl022_0000/leg/mod/f_leg022_0000.mrl3 to {MHW}/nativePC/pl/f_equip/pl022_0000/leg/mod/f_leg022_000.mrl3 . Now open it up in your favorite hex editor (PLEASE use a hex editor, you will suffer trying to do anything moderately complex with a text editor. I use HxD.) At offset 148 you will see hex characters that translate to pl\f_equip\pl022_0000\leg\mod\f_leg022_0000_BML . 22 is the "code" for Girros armor, and 38 is for Zorah armor. Let's change this text to pl\f_equip\pl038_0000\leg\mod\f_leg038_0000_BML .

Note that this has the same effect as if we were to copy the Zorah BML.tex and paste it on the Girros BML.tex. However, this is a bit faster and also avoids having to rewrite BML.tex.

NativePC

Links like pl\f_equip\pl022_0000\leg\mod\f_leg022_0000_BML refer to files in the chunk package. So when opening the mrl3 file, the game will simply read these links out of the chunk package. However, if we have this file in nativePC, the game will read it from nativePC first. As a result, you can stick arbitrary files in nativePC and link them via mrl3 edits, even if they're not in the game itself. This method is highly effective for managing multiple versions of armor edits, since you only need to change the mrl3 link. Here, I took a completely unrelated image (it's 1024x1024), saved it as DDS, and then linked it via mrl3 (changing the same line as in the last section):

When editing mrl3, make sure to pad with 0x0 (null) characters so that the next item starts at the same location as before.

Skin Rendering

The Girros Greaves cover the entire lower body. What would happen if we made some of its texture map transparent? You might expect that underlying skin would be exposed. Instead, we get this:

In case you can’t see it, the armor is see-through and the inside is hollow.

It turns out that when you equip armor, the skin rendering is actually handled by the armor piece. Thus the links to skin files in the mrl3 serve to tell partially-covering armor (eg. Dober Armor) how to render the area that isn’t covered.

I ran into a roadblock here because I couldn’t figure out how to edit the mrl3 to render skin. I think that the mod3 file reads specific array elements from the mrl3 file and applies them according to code in the mod3 file. As a result, you can’t just add links to skin files in the mrl3, and you also can’t take pre-existing links and make them skin files (since the mod3 treats those links as for other purposes, or maybe even ignores them). You can, though, change the skin textures for partially-covering armor by switching the links (like what we did for Zorah), but my results were quite ugly.

Here’s a good problem for you budding modders: how can we make the above Girros edit work?

Conclusion

The modding community is still young and has a lot of potential. Hopefully this will help the community’s understanding of texture editing and enable us to make even better edits!

Please let me know if you have any corrections or additions to make; in the end everything I’ve discovered here has been through blackbox testing.

Retweet this article!