How to import and export textures

From Nexus Mods Wiki
Revision as of 12:30, 29 December 2018 by Pickysaurus (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a guide by UberGrainy to import and export BM, NM (BC1, BC5U, BC7) textures in Monster Hunter: World.

Original post on the Nexus Mods Forums.

Finding textures

Unpack the files using this. Look for the TEX files you want to edit. You can use this tool to preview them and see what they might be.

Alternatively, install this and run the game. When in-game, bring up the menu and under Direct 3D 11, click Render Mod Tools. This will open a window where you can refresh to list all current textures loaded. Try using this in as isolated an area as possible (ie. character creation screen, because it has no background). You can then dump the texture to Monster Hunter World/SK_Res/ in the dump folder.

Note that if you use the second method, you should use Vuze's texture quality fix, to ensure that you get max resolution textures.

Converting TEX to DDS

If the TEX is BC1 (usually BM files), you can usually use this. If it's BC7 (usually GUI files), you can use this. If it's not supported by the above tools, you'll need to use the preview tool in the above section, and experiment with compression type and size until it "looks correct".

Textures with transparencies tend to currently not convert properly (they come out looking like rainbow trash). Normal maps are usually BC5U (ATI2) and squished vertically. Invert them after you open them. Don't forget to invert back when exporting.

In the top left, where it says "0xOFFSET", you can enter values to shift the image, so that you don't have to later. Offsets are almost always 100, 108, 110 or 118. Pay attention to the top left/right of the texture. There will be a little box or distortion that helps you figure out if you've aligned the texture correctly or not.

If the texture is garbled, you're either using the wrong DDS header (I think it's always BC1, BC5 or BC7) or the wrong offset. Once you get both of these correct, it should also ungarble the texture. I usually use offset 100 as a base when testing headers.

Alternatively. if you used Kaldaien's tool, you should already have the texture in DDS format.

Importing DDS into Photoshop and editing it

You can use GIMP, but I don't know how. For Photoshop, wou will need this. Open the texture (don't import mipmaps as layers).

If you converted directly from TEX without playing with the offset, textures will have the right side cut off and appearing on the left. You'll have to fix this manually (just paste the left onto the right and move it up a little).

Edit the texture as you see fit. There are two ways to edit transparencies, either with layer transparency or by creating an alpha channel and defining opacity via black (invisible) and white (visible).

Exporting DDS

Under Texture Type dropdown, select the type you need. Normal Map if it's a normal map, Color if it has no transparencies, and Color + Alpha if it does have transparencies. Try to export as BC1 or BC7. Normal map needs to be exported as BC5 (it's BC5U, although it doesn't say it).

As long as it's not a normal map, it doesn't seem to need to be the same DDS format as the original, but you'll need to export it in a format that one of the currently available tools can convert back to TEX without imploding. So far I've only tested this with importing a BC1 and exporting as BC7 with alpha, and it worked. If it doesn't work refer to the old version of the guide below for more details..

If you used BC7, drag drop the exported DDS onto the BC7 converter. Otherwise do the same with the BC1 converter. It should spit out a TEX file. Place this TEX file where the game is looking for the original texture (match the folder structure under Monster Hunter World/NativePC/) and the game should load it.

Normal Maps

I think normal maps need to be the same resolution (note how the vertical res is half horizontal). After exporting them as BC5, you can drag them on top of the BC7 converter 0.2, and it should convert to TEX. However, it may appeared garbled in-game. To fix this, you need to copy paste the start of the original NM TEX file, onto the edited one that you made.

The part you need to copy paste is usually obvious. There'll be a bunch of bytes like 7F 7F 00 00 00 00 00 00 7F 7F 00 00 00 00 00 00, and then suddenly other data. Copy paste everything before the other data, and then try to mimic the structure of the bytes in your edited version by copy pasting the data over. You'll have to overwrite the start of your edited NM (the header won't be the same size as the original).

The file size of your edited TEX should be slightly smaller. If you copy paste it correctly, the file sizes should match, and it should display correctly in-game.

RMT maps

I haven't quite figured these out yet, but I think each color channel corresponds to a type of shading. Shininess, reflection, etc. Metallic stuff is usually colored yellow-green.

Skin map alpha channel

The alpha channel on the skin map seems to be some kind of specular map. The darker it is, the higher phong shading the skin seems to have.