Skip to content

Trouble with Creating a Custom HakFile to Override Existing Tilesets with Texture Maps

Hello everyone.

I have been working on using ai programs to upscale textures from existing tilesets to make higher res textures and then create texture maps from those, and then put them together into a hak to override textures from the original hak. However, I've gotten stuck. I used Esrgan to upscale the textures Zwerkules medieval city tileset, as he kindly provided a version with uncompiled models, and then I used Materialize to create diffuse, normal, height, metallic, and gloss maps. Then I converted these into DDS files and MTR files with NWN Crunch (Which also converts the gloss and metallic maps to roughness and specular maps), turned them into a Hak file, and then tried importing them into the toolset with the original hak. However, the maps only seem to be applied when I exclude the roughness map and then everything looks very shiny and plastic. I am a noob so I am kind of learning by trial and error here, but I carefully read through the wiki and it seems like roughness maps are supported. I have looked at haks from other custom content creators, like Pstemarie's Dark Ages project, and found that they all exclude roughness maps, but with the prior mentioned project it does not look shiny or plastic.

Any help on how to solve this problem would be much appreciated!

Comments

  • TarotRedhandTarotRedhand Member Posts: 1,481
    edited July 2021
    First things first, read this post I made just over a month ago and check the size of the filenames you are generating.

    Another thought, your roughness map is greyscale isn't it? Or to put it another way it should only use a single colour channel. To see how many channels each map should have look at this page on the wiki -

    Standard material inputs

    Another thing, try using TGA files in the first instance. Once you have them working you can always use crunch to convert to DDS.
    I have looked at haks from other custom content creators, like Pstemarie's Dark Ages project, and found that they all exclude roughness maps

    You obviously haven't looked at what I have been doing then as I use roughness maps in my 3 "Experiment" projects. For example see Further PBR Tileset Experiments (EE Only). I chose that one because I include full usage instructions on the project page.

    TR
    Post edited by TarotRedhand on
    Esoterik
  • EsoterikEsoterik Member Posts: 7
    edited July 2021
    Ah thank you for the help! I did look at your project (That's where I got the idea to try this) but I didn't think to check out the hak file when troubleshooting. I'm pretty new to this so any help is appreciated! I am noticing that ShaderMap is much easier to use for generating maps.

    16 characters feature is turning out to be a problem, so far I've had to exclude all maps for files that originally had 15 or 16 characters. Not sure if there's any workaround for this when working with existing content. Do you think renaming the offending texture files to a shorter filename, and then importing them into the uncompiled models they are used in would work?
  • TarotRedhandTarotRedhand Member Posts: 1,481
    edited July 2021
    16 characters feature is turning out to be a problem, so far I've had to exclude all maps for files that originally had 15 or 16 characters. Not sure if there's any workaround for this when working with existing content.

    Actually quite a simple one. First save the name of the original texture in a text file. Next rename the texture file to 14 characters or less. Generate the maps and the mtr file, then use the saved name to rename the .mtr file. Works just fine. NwN EE matches the name to the one in the .mdl but uses the files specified in the .mtr file.

    One other thing with tileset haks. Don't bother trying to create maps for the minimap images. There's no point even if they worked in game the actual images are too small pixel wise to generate meaningful maps.

    TR
    Esoterik
  • EsoterikEsoterik Member Posts: 7
    Oh thank you! That will save me a lot of trouble!
  • TarotRedhandTarotRedhand Member Posts: 1,481
    One other little tip. Because I couldn't find a filename counting program that works with win 10 (there used to be a number of them due to CD writing limitations) to double-check a large number of files, I realised there was one hidden in plain sight. NwHak itself. Just open it as though for a new hak and drag and drop the files you want to check into it. Scanning through the list of files in the "new hak", the ones with too long filenames really stand out. Once finished, just close NwHak and say no to the do you want to save dialogue.

    TR
  • EsoterikEsoterik Member Posts: 7
    Yes that's what I've found too! Haha, of course, so far I keep running into barriers. Like, for some reason the textures don't load on most of the buildings, and after placing a few buildings down the game crashes. On the first issue, I'm not sure yet, on the second, my bet is that 2k texture upscaling is overkill for the system. Still was fun to try haha. Really, my suspicion is that textures past 500 by 500 don't really show a noticeable difference on tilesets, especially with PRB textures. At some point I might try upscaling to 1K.

    I seem to be swapping between projects whenever I get frustrated by something. Right now I'm working on PLTs because I noticed that there haven't been really any improvements to player armor since EE.
  • TarotRedhandTarotRedhand Member Posts: 1,481
    Have you looked at these plt kits -

    Lisa's Surcoat & Tabard Custom Texture Templates with these as an example Lisa's 'The Dragon & The Unicorn were Fighting for the Crown...' and this kit too Lisa's Military Shirt Custom Texture Templates with these as an example Lisa's Military Shirts

    If you are looking for heraldic devices, grab my TR’s Custom Shield Designs. There are a lot in it. Actually, it would be nice if someone were to use that kit to create some large shields and post them (with credits of course) on the vault.

    Happy experimenting.

    TR
  • EsoterikEsoterik Member Posts: 7
    Oh those look pretty good! So far what I've done is upscale the PLTs for Feanor's Medieval Armory. When I implemented in game though most the textures didn't appear. My best guess so far is that either the 2DA files are out of date or that some are linking to armor pieces that might have changed with EE.

    Of course, when I encountered that I got frustrated and started working on upscaling and adding PBR textures to upscaled versions of the head textures. I ran into the problem that many weren't appearing, but what I figured out is that when uncompiled some of the models had broken links to textures. I figured out the easiest fix was to open up the model files in Notepad++ and just type in the correct texture name.

    So, now I'm just trying to get to PBR to make them look better than worse, although I suspect what they really need are model changes.

    I might take a look at Xaltar's Head & Underwear Packs.

    I will take a look at your shields if I get around to shields. I'm also planning to try adding your PBR textures to some models. Some textures, like chain mail, just do not look very good when upscaled. However, I'm a huge history nerd, so I want to see if I can find a riveted chain mail texture. Don't worry though, I intend to provide full credits where due when if I ever get anything good enough to post on the vault.

    The really cool thing I'm finding with these texture upscaling models is that often they are able to figure out what the texture should look like at a higher resolution, often adding detail that would take a long time to do manually.
  • TarotRedhandTarotRedhand Member Posts: 1,481
    It's either 1k or 2k (can't remember which but) there is at least one chainmail texture in the Large Public Domain Fancy Mapped Texture Pack. Specifically the download is part of the "Addition - 5 Armour Textures - Chain, Scale, Leather, Iron and Steel".

    TR
  • EsoterikEsoterik Member Posts: 7
    edited July 2021
    Yeah I downloaded that one before. I'm going to try adding it to the armor textures. I really like the iron and steel textures to use on plate mail and such. I figure I can then use upscaling to upscale cloth textures because I found the upscaling works really well on that.
Sign In or Register to comment.