Author Topic: Problem reskinning a tileset  (Read 494 times)

Legacy_Lovelamb

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +0/-0
Problem reskinning a tileset
« on: September 29, 2012, 11:47:11 am »


               Hi. There are a few things beyond my comprehension here and I'm hoping someone can tell me more about this or point me in the right direction.

First, the only texture files i can find with nwnexplorer for the illithid interior (some of them belong to Underdark tileset) are 64x64 .tga files. They seem too small compared to the kind of textures I see in game. The textures I am trying to use are 256x256. When I make my textures 64x64, they look poor. Don't know if this is of consequence to the problem.

Second, I replace the textures (ttu01_rock3.tga , tii01_grate.tga and ttu01_lith.tga) by placing my own in the override folder and the changes are visible in the toolset and in game. But if I place those same textures in a new hak file and add it to the top of my hak list, the textures in game revert back to the default ones, whether the new textures remain in override or not. So my hak with those same textures (the new ones) is stopping them from appearing. It's as if my hak overwrites what's in the override, but with the wrong thing. How can this be? I've emptied my override folder to test this, the only thing I have inside are these .tga files. My module uses CEP and several other haks. I can't ask people to put the textures in override to play it...
               
               

               


                     Modifié par Lovelamb, 29 septembre 2012 - 03:49 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Problem reskinning a tileset
« Reply #1 on: September 29, 2012, 03:48:48 pm »


               <blushing...>

Normally I'd take a bit more time helping, but I'm insanely busy at the mo :-/

The texture is probably being overridden like mine were (egg-on-my-face thread)

If someone doesn't explain it more fully, I'll expand on it later...

<...like a boy>
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Problem reskinning a tileset
« Reply #2 on: September 29, 2012, 03:49:31 pm »


               simple answer. Those textures exist in game as a resource in the dds type of file structure. That entire tileset re-used existing game textures from other tilesets.

TGA will override, but ONLY in the main override folder, otherwise a .HAK file has full priority and an existing .DDS file of same name in game resources will actually override a .HAK .TGA type of file.

The game is slightly "buggy" that way, but it was by design except for the DDS bit, that was an accident that was never fixed. .HAK's overriding the override folder was a change that was implemented early in the patch system for PW owners, because gamers found a way, back then, to override the server files by placing changed files into their local override folder. Now, with .HAK, the .HAK takes priority, other than default, bioware, textures.

Edit:  Dang it Rolo, you post too darned fast, never give a guy a chance... but my answer stands, although maybe a bit more of a direct answer than what you posted in that long thread  'Image
               
               

               


                     Modifié par Bannor Bloodfist, 29 septembre 2012 - 02:52 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Problem reskinning a tileset
« Reply #3 on: September 29, 2012, 04:26:37 pm »


               <trying to pretend...>

Stoopid forums :-(

<...he didn't double post>
               
               

               


                     Modifié par Rolo Kipp, 29 septembre 2012 - 03:27 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Problem reskinning a tileset
« Reply #4 on: September 29, 2012, 04:27:13 pm »


               <trying to pretend...>

Hey! I'm quicker than someone! <snail?>
*sticks tongue out at bird* But you're always more in depth, BB. :-)
I have a "site:social.bioware.com Bannor" search bookmarked when I want to reference something :-)

Says it all. Except that I'm faster =)

<...he's smug when he's really just happy>
               
               

               


                     Modifié par Rolo Kipp, 29 septembre 2012 - 03:28 .
                     
                  


            

Legacy_Lovelamb

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +0/-0
Problem reskinning a tileset
« Reply #5 on: September 29, 2012, 04:48:27 pm »


               

Bannor Bloodfist wrote...

TGA will override, but ONLY in the main override folder, otherwise a .HAK file has full priority and an existing .DDS file of same name in game resources will actually override a .HAK .TGA type of file.

That's strange... So the game was reading the textures from the .DDS files that I couldn't find.

Thank you guys, now I know it's not a conspiracy.
               
               

               


                     Modifié par Lovelamb, 29 septembre 2012 - 03:48 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Problem reskinning a tileset
« Reply #6 on: September 29, 2012, 05:14:56 pm »


               NWNExplorer Reborn can help you find resources, but, and this is a big BUTT, NWN resources are not necessarily ordered as you might expect.  

The game works by patch level.  When you open the resource list in NWNExplorer, you see, NWN, NWNpatch-bahblah etc... NWNSOU, NWNSOUPatch-BlahBlah, NWNHotUPatch-BlahBlah, then 1.69 patch etc.  EACH of those has sub-folders, each of those sub-folders may or may not have additional sub-folders.  Regardless though, NWN the game, takes the resources in reverse order.  Path 1.69 overrides 1.67 which overrides Hotu, which Overrides SoU, which overrides the Main NWN.

So, you have to start your searches backwards, and can easily get lost attempting to find stuff.

Now, the Game engine searches in this order, .HAK from your hak folder, THEN nwn\\override THEN the various main game resources located in the various .BIF files think of them as .HAK files with higher priority.  Taking all of that into account, vid/texture resources are handled following that order, but also use an extra control bit.  If a GAME resource (patch file, SoU, HotU, Main NWN) file has the same name as a file located in override or hak, AND if that resource is a DDS (texture) type of resource then the Game version takes control over any .TGA of same filename.  IE:  DDS overrides .TGA regardless of location.  Now, if you have a .DDS in ANY .HAK attached to the mod, then the version in your .HAK will override the main game resource, but if all you have in your .HAK is a .TGA, then the main game resource takes control.  I am not sure where .PLT falls in the texture resource lists so I can't answer that possible question.

I run into the same sort of problem inside of 3ds, since 3ds does NOT recognize BIoware .DDS files, I must have a .TGA to work with when developing.  I just remember to remove the .TGA unless mine is actually different than the game version.  If it IS different, I make sure to rename it in the .MDL and actual filename, so that it does NOT attempt to override any real game resource file.

Plain as butter?  <warning, slippery sloped question there>
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Problem reskinning a tileset
« Reply #7 on: September 29, 2012, 05:37:05 pm »


               

Lovelamb wrote...
First, the only texture files i can find with nwnexplorer for the illithid interior (some of them belong to Underdark tileset) are 64x64 .tga files. They seem too small compared to the kind of textures I see in game. The textures I am trying to use are 256x256. When I make my textures 64x64, they look poor. Don't know if this is of consequence to the problem.

The second half of this blog entry will help with that: Finding a texture for a model quickly and finding the best version of its texture
               
               

               
            

Legacy_Lovelamb

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +0/-0
Problem reskinning a tileset
« Reply #8 on: September 29, 2012, 06:44:29 pm »


               Oh... It seems like my search wasn't reaching the correct texture folders. Maybe it was an upper/lower case issue.

Now I see all the textures and can convert files to .dds. There's nothing more to stop me from "working on my module". *gets lost creating custom content*
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Problem reskinning a tileset
« Reply #9 on: September 29, 2012, 07:27:56 pm »


               

Lovelamb wrote...

Oh... It seems like my search wasn't reaching the correct texture folders. Maybe it was an upper/lower case issue.

Now I see all the textures and can convert files to .dds. There's nothing more to stop me from "working on my module". *gets lost creating custom content*


Word of advice/warning regarding coverting to dds.  Unless you are creating a CUSTOM .TGA to begin with, do NOT re-convert.  IE, if you export a dds/tga from game resources, NEVER re-convert to .DDS.  You are recompressing an already compressed file, and will lose an enourmous amount of detail, and make your custom content look very poor.

So, if exporting a .DDS from game resources, and you rename it, it will work fine, but if you export as .TGA, you are taking the compressed format and exporting that instead.  Then re-compressing back to DDS you will damage the tile.
               
               

               
            

Legacy_Just a ghost

  • Full Member
  • ***
  • Posts: 244
  • Karma: +0/-0
Problem reskinning a tileset
« Reply #10 on: September 30, 2012, 08:08:54 am »


               That's very good to know, Bannor. Just to be sure I understand you completely:

DDS texture -> NWN Explorer, Export as TGA = Edit and keep in your hak as TGA, don't DDS
TGA texture -> NWN Explorer, export = Edit and do as you please
Original texture = Edit and do as you please
               
               

               


                     Modifié par Just a ghost, 30 septembre 2012 - 07:10 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Problem reskinning a tileset
« Reply #11 on: September 30, 2012, 10:28:45 am »


               

Just a ghost wrote...

That's very good to know, Bannor. Just to be sure I understand you completely:

DDS texture -> NWN Explorer, Export as TGA = Edit and keep in your hak as TGA, don't DDS
TGA texture -> NWN Explorer, export = Edit and do as you please
Original texture = Edit and do as you please



Sorta:

DDS texture -> NWN Explorer, Export as TGA = Edit and keep in your hak as TGA, don't DDS (Rename or it won't work, which means you also have to adjust all .MDL files to reflect the new name)
TGA texture -> NWN Explorer, export = Edit and do as you please (If placed in .hak it will work, if placed in override it only works locally, even on a server, so players must have files in their override as well.)
Original texture = Edit and do as you please.  (Correct)

Basically, any orignal Bioware DDS that you export in any fashion and modify, needs to be renamed for it to work correctly if you are expecting it to override anything from main game resources.  IE, export the normal grass texture, doesn't matter what you pick DDS or TGA, if you wish that to be different than the original, you can edit as you please, but you must rename it and adjust any .MDL files that you wish to change to reflect the new .DDS

IF the TGA you export also exists in DDS form in Bioware resources, you MUST replace the DDS by having it in your .HAK in DDS form. (DDS in override does not appear to always work in my experience).

If you export and convert ANY DDS to TGA, do NOT go back and recompress unless you recognize that you will have a lower quality DDS from that point forward.  Each decompress/recompress cycle loses more data due to the lossy algorithyms used in DDS compression.

For some reason, Textures in haks may or may not override original named textures in game.  Not sure why this happens but it can happen.  At least it did with several different things that we tried in CTP when creating new tilesets and using original Bioware.  That is why ALL of our tilesets ended up with completely renamed texture files.  That and the fact that some folks like to just override a texture with a hak version.  Works, but it affects ALL areas/tilesets/placeables etc that might use that original Bioware texture.  That is why CTP only released 2 tilesets that were reskins without renames... IE just overrides of textures.