Author Topic: Textures_Tpa.erf  (Read 945 times)

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Textures_Tpa.erf
« Reply #15 on: April 18, 2011, 03:43:07 pm »


               

Bannor Bloodfist wrote...

It works, why screw with it at all?

Why force someone to modify main game components for absolutely NO GAIN at all?

It doesnt allow to override folder to work as it should. Then builder advice peoples to modify their erf files in texturepacks folder or delete them. (Yes they should use a hak instead, but tell this to those no-hak builders)

You can already add ANY texture you want to a mod by usign a hak file.  Anything in the hak can easily override any main game component by the same name.

Yes you can via hak. But if you want to create override you will end up with the same issues as I did.

As the game engine is already looking for the texturepacks folder, there is no reason to delete it.  Just because it contain's .erf files and you THINK all .erf's should go into the nwnerf folder, doesn't make it so.  This is one thing I would leave absolutely alone.

LOL where you get this from?

Don't delete things just because you don't understand now they work or why they are there.

LOL

Don't modify main game components unless you are actually making a valuable change that makes the game easier to play/use etc.  In this case, there is no need to move things.  By moving these dds and plt files into the main game components, you will overwrite the version that is already there and remove the ability of the player to choose graphic level.  You also force them to download a HUGE pack of stuff that they already have (or should have unless they also deleted something that they didn't understand why it was there).

Yes I already thought about these arguments, thats why I wont do it and why I am asking if its a good idea, so you are saying that it isnt, right?
               
               

               
            

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
Textures_Tpa.erf
« Reply #16 on: April 18, 2011, 04:06:08 pm »


               

ShaDoOoW wrote...

There is a question if this is needed anymore. If just wouldnt be easier to put 64mb textures into core datas (and we can now) and delete texturepacks folder...


To be honest, it's not worth bothering about at all. The texture packs combined come to about 350mb, which compared to the overall install size of NWN means it's a pretty insignificant amount of space you'd save by merging them into the main bifs. Actually, you'd only save about 100mb max of that as the images increase in size quadratically, meaning the highest res texture packs should be approximately 4x the file size of the mid resolution ones, and 16x the size of the lowest res textures.
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Textures_Tpa.erf
« Reply #17 on: April 18, 2011, 04:29:49 pm »


               NWN is quirky in the priority/load order.  This was made even more problematic by PW owners that insisted they needed a hak to override the override folder to prevent folks from cheating their PW's.

It sorta makes sense to have the hak take priority, and for those that refuse to face reality, by forcing folks to actually use the override folder instead of a hak, they are actually screwing up play on every OTHER pw that a person might wish to visit.

The override folder was intended to allow a single player to override his own version of the game without affecting anyone else.  It has uses for Tony k ai, or the OHS (my personal favorite), neither of which would affect a PW system at all.  

A hackless PW can not offer new tilesets, new creatures, new items, etc, it can onliy modify main OC/SoU/HotU resources.  IT can't view the work done by hundreds of CC authors out there...

What really gets me, is those PW owners that claim they are hackless, yet still use CEP... a hak is a hak is a hak, doesn't matter where it comes from.

PW's have the ability to test for missing haks and tell folks where they need to get them from fairly easily.  They can even create a portal area where ANY player with stock NWN content can log on without haks, and learn why they might wish to go get haks to further their gaming experience then be "ported" into a section of the world that does require those new haks.

But folks are generally stubborn, and I don't mean that negatively necessarily, as I am fairly stubborn myself as I won't use haks unless it truly is inspiring or really new/useful content.  There is a LOT of that available out there though, so I don't feel that my requirements are that hard to fill.  When I can't find say, a specific tileset that I want, I create it or modify an existing one to meet whatever those specific requirements might be.

My primary reason for NOT using the override folder, is that I use the override to allow me to develop tilesets without having to use a hak (with constant updating) while I am creating/fixing that tileset.  Once it IS complete, I hak it up, and post it to the vault for others to share.  Then clear out the override and start on the next tileset.

I also have back override folders of various names containing the 1.69 content, the OHS, TonyK etc, that I just rename when I need them/want them to play in a specific setting.

My main complaint about how the override is handled, specifically how a TGA will NOT override any dds of the same name that is in system resources.  So I am forced to rename something, convert it to DDS and add it to a hak to get the new texture in game.  Annoying yes, but it can be accomplished.


Anyway, in direct response to your question about moving those files from texturepacks, my answer would be NO, don't bother.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Textures_Tpa.erf
« Reply #18 on: April 18, 2011, 08:29:16 pm »


               KK totally agree with your last post.

I just thought that the current behavior is not right because overrides like colored heads, or nude characrer models doen't work. And the TGA over DDS might be the same issue BTW, those TGA in override might override DDS of the same name, but since that DDS exists in texturepacks and those are loaded after override... It would make sense...
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Textures_Tpa.erf
« Reply #19 on: April 19, 2011, 12:21:20 am »


               Nope, DDS takes priority over TGA regardless if the vid card supports DDS.  Try it, place a NEW, different TGA in same folder as DDS with same name, but make the TGA different.  It will be the DDS that gets used.

I have NOT tested by trying to replace a new DDS of same name as what is located in texturepacks folder.  Eventually I will I guess, but it has not been a priority for me, since I always use renamed textures anyway.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Textures_Tpa.erf
« Reply #20 on: April 19, 2011, 12:49:27 am »


               Strange. My NWN copy doesnt do what are you saying about TGA-DDS.

I downloaded platinum-haired nymph texture. TGA only. I put it into override. Worked fine.

Then I grabbed default brown-haired one from core NWN datas and put it into textures_Tpa.erf, then she was brown haired again. Which confirmed my suspections of the texturespacks folder and load priority behavior.

Then I get back the textures_Tpa backup you sent me and extracted the c_nymph.dss that is not contained in core NWN datas, just in this texturepack. And then I put it into override folder where I still had a silver haired nymph in TGA. And the nymph was silver again.

Note that I always restarted NWN when I made any change in override/textures_tpa.erf

How I turn using DDS textures on?

EDIT: got Nvidia 9800GT videocard
               
               

               


                     Modifié par ShaDoOoW, 18 avril 2011 - 11:52 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Textures_Tpa.erf
« Reply #21 on: April 19, 2011, 01:31:29 am »


               you are talking two different things at the same time.

1) dds overrides tga and 2) texturepack folder overrides override.

Not sure exactly why you are even attempting this, I mean, modifying the texturepack files was already vastly discussed above as a bad move.

Regardless I have never been able to get TGA to override dds.  No matter what I try to do.

DDS is enabled via vid card drivers.  It can also be disabled via those drivers, or the drivers may need to be backdated etc to get DDS to work.

There are many haks on the vault that provide TGA versions of textures because some vid cards don't recognize the Bioware version of DDS (which is not the industry standard, the headers are different and newer vid cards have issues with the old style headers that Bioware DDS uses.

Anyway, what I mean by DDS overriding TGA is simple.

Take a DDS, say your c_nymph.dds, rename it to my_nymph, now extract it to tga version.  and recolor the tga version it to be something different.  Place BOTH files in override.with whatever mdl file uses them.  The toolset AND game, will both use the DDS version to display it to you.

Again, the only reason I know this for sure is that I use the override folder for development, and I ALWAYS use renamed textures.  Both dds and tga.  Sometimes, I have had to change something in the texture, and that means I may have left an older version of DDS in the override folder even though I have an updated/newer version in TGA form.  The DDS file is the one that is always displayed.
               
               

               
            

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
Textures_Tpa.erf
« Reply #22 on: April 19, 2011, 02:58:52 am »


               

Regardless I have never been able to get TGA to override dds. No matter what I try to do.


Actually, the override folder is a specific special case regarding the texture packs.

.dds textures take priority over .tga textures almost everywhere. However a .tga in override will over a .dds in the texture packs, whilst a .dds in override will not have any effect. I'd hazard a guess that the engine converts any .tga textures found in override to .dds in memory on the fly, and as this conversion is done after loading in all resources, these converted versions take priority over the originals, even though the originals are higher in the heirarchy...

...if that makes any sense at all.

The fact that it's possible to overwrite standard textures at all from override seems to be something of a side effect rather than an intended feature: the system was set up to explicitly give the texture packs priority. So it's not a great surprise that custom .plt textures, which undergo a different process to create the final image used, can't be tricked into taking precedence this way - though it is damn annoying.

That said, Bannor's explanation is pretty much spot on for how things ought to work - there's just a few more weird things going on underneath the hood that only really come to light when you quite deliberately break them ':bandit:' Although if your graphics card doesn't support TGA then I can't really give any clue as to what might happen in the override case.
               
               

               


                     Modifié par _six, 19 avril 2011 - 02:08 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Textures_Tpa.erf
« Reply #23 on: April 19, 2011, 04:17:19 am »


               Bannor, why I am doing this or solving this is because I started to patching NWN core data files and thats an unexplored place and I am experiencing various issues. Not just that PLT files arent working in BIFs but also any textures and I am trying to find a way how to ensure that everyone that downloads the project I am working on will see the same. And after few tests I tracked both these issues to the single cause -> texturepacks.

Also note that I dont want to mess with override folder because thats reserved for users. And hak-packs are not option too since it wouldnt work in modules created without a hak I created.

Anyway I tried your test and since you have right I tried few more tests that also confirmed _six know-how, but I tried to mess with BIFs too and I found this pattern:

if there is a DDS in texturepacks
and
there is not a TGA of the same name in any other texture pack
then
TGA in override will override it no matter if DDS of the same name exists in override too

but if there is TGA of the same name in any texturepacks (which doesnt happen by default) it will use always DDS from texturepacks

Now if there isn't DDS in texturepacks which will happen with any CUSTOM texture! then:
DDS from override take precedence over TGA of the same name in override

And now take in consideration also BIF files:

if there is DDS in texturepacks, it won't use TGA texture from BIFs ever.
If there is not DDS in texturepacks then:
- if there is TGA in override then TGA from override is used
- if there is both TGA and DDS or just DDS in override then DDS from override is used
- if there is non of them in override DDS from BIFs will be used unless video card doesnt support DDSs in which case TGA will be used

And the last is my problem. I want to patch the game with new textures and I want to put them into BIFs. Now because of texturespacks it doesn't work and I got only two options: 1) distribute my own version of the xp2_gui.erf texture pack file which is loaded after textures_tpa.erf or add high res textures into BIFs and delete the texturepacks in patch instalation.

And now when I ran these tests I start to think that if I would do that it would make many things easier. I dont really understand your issue with TGA/DDS however so I dont know if this would solved it. If you want to use TGA why dont you delete the DDS or otherwise if both textures are the same whats the problem?'<img'>

EDIT: there is also third option, I could use a so called patch-hak, which have higher priority then texturepacks, but then if user would put TGA texture that is contained in my patch.hak into override, then it wouldnt worked again. SO I would just created another bloody texturepack.
               
               

               


                     Modifié par ShaDoOoW, 19 avril 2011 - 03:30 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Textures_Tpa.erf
« Reply #24 on: April 19, 2011, 04:32:24 am »


               BTW I will probably need a TGA to DDS converter, the one from vault (http://nwvault.ign.c...r.Detail&id=111) screwed my texture however, what do you guys using for this?
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Textures_Tpa.erf
« Reply #25 on: April 19, 2011, 12:48:18 pm »


               I use that one or one called processtextures, by dark_brood but that file is no longer available on the vault as it was another instance of someone hosting it on their own website that is now dead.  It still used the Janus tool inside of it anyway, it just gave a dos batch file command line option to handle more than one texture at a time.

Anyway, I doubt it was the dds conversion that caused the issue, likely it was something wrong with the tga itself.

Texture files have embedded information in the header (first part of the file) that can cause issues.  I know that PaintShopPro causes severe issues with the TGA files it saves, but if you open that TGA inside another image editing program and then just re-export/save it again as a TGA it clears the problems.  Of course, this is assuming that the texture itself is workable.

Gimp can fix it, so can SnagitPro, and acdsee photomanager's edit util.  All will save the tga with the proper header information.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Textures_Tpa.erf
« Reply #26 on: April 19, 2011, 05:46:27 pm »


               That DDS converter from Janus can't be right.

Even when I resaved that texture it was still totally messed up. So I made a few tests and found out that if I get a default texture from BIFs without any changes and convert it, it is still bugged. Also decompile from high res DDS and compile back did the same... ':sick:'

EDIT: this one http://nwvault.ign.c...r.Detail&id=108 worked ':wizard:'
               
               

               


                     Modifié par ShaDoOoW, 19 avril 2011 - 04:49 .