Salk

Selphadur's KotOR Texture Redux

Recommended Posts

Hello!

I just thought about informing the local denizens of Deadlystream about a great modification that has recently been released which upscales through ESRGAN a huge number of in-game textures. A new version, according to the author is in the works and will add 750 more, making the upscaling practically apply to each single texture used in the game. I have tested the results myself and it's impressive.

Cheers!

  • Like 3

Share this post


Link to post
Share on other sites
1 hour ago, Sith Holocron said:

Not seeing any before and after pictures on that page. If you've used it, perhaps you have some to share?

Before:

Aqual2.png.3f5f1db26549fea1a7327362b416d733.png

After:

Aqual.PNG.619254536989cce79947af5ec4a8b0e8.PNG

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

In the absence of higher-resolution textures, these are pretty good. They are a particular improvement for the random NPCs who seldom have any recent texture mods done for them.

  • Like 3

Share this post


Link to post
Share on other sites
1 hour ago, Mutilator57 said:

In the absence of higher-resolution textures, these are pretty good. They are a particular improvement for the random NPCs who seldom have any recent texture mods done for them.

While I like the idea to preserve the original look by remastering the visuals it's - at least in my eyes - not enough anymore. Kotor is getting pretty old by today's standards and remaking textures is the only real option when you look at how detailed Dark Hope did those.

  • Like 2

Share this post


Link to post
Share on other sites

Hello everyone!

I am original author of this mod.

I would like to inform that the final version was released.

I agree that Kotor is ageing game and probably even four times upscaled vanilla textures may be not enough, but keep in mind that it has around 2300 textures (GUI, effects and etc excluded) and it is very huge amount even when making wth the help of AI, not to mention making those from scratch (figuring UV mapping, creating new textures, testing and etc) :)

And yes, alphas are intact, as I did not upscale those with AI (AI does not upscale those correctly even if you tweak it to do so). And I did not use any automatic transfering of alphas (there are already problems in some mods using this method when alpha must be 100% black, but somehow during this transfer it becomes 98% black and then transparent models occur in-game). I upscaled alphas using bicubic filter and transfered to upscaled textures, all by hand, texture by texture. :)

On the bright side with this mod keeps game's original look with way more sharper textures. :)

Regarding before and after pictures, well due to jpg compression most people won't even see the difference in those pictures (as not everyone has monitors precise enough in color reproduction and etc.), but I may add some as I finally finished the mod. :)

Take care!

And Merry Christmas!

Selphadur

 

P.S. Thank you Salk for sharing this here! :)

P.P.S. Regarding TXI info. I just discarded .tpc format as it was giving too many issues (problems with mipmaps, seams, transparency; don't know if it was just a problem of a tool, but took too much time to transfer .txi info anyway). When making .tga you don't need any .txi info as game provides it by itself.

Edited by Selphadur
fixed typos, added P.P.S.
  • Like 2

Share this post


Link to post
Share on other sites

Great news about the final release!

Barring completely new textures created from scratch I believe this project is the best visual enhancement that could be brought to KotOR.

Once more, thanks Selphadur, and Merry Xmas!

  • Like 1

Share this post


Link to post
Share on other sites
28 minutes ago, Salk said:

Great news about the final release!

Barring completely new textures created from scratch I believe this project is the best visual enhancement that could be brought to KotOR.

Once more, thanks Selphadur, and Merry Xmas!

Merry Christmas to you too, Salk :) 

  • Like 1

Share this post


Link to post
Share on other sites

Happy holidays to all.

A question to those that use this mod: Which textures - in your humble opinion - benefit the most here?  In your answer, please exclude textures that you've seen done better elsewhere.  I'm merely interested in the best of the best here.

If you do include pictures, please have both a before and after screenshot to better illustrate your point/s.

  • Like 1

Share this post


Link to post
Share on other sites

@Sith Holocron No pics at the moment, but the textures that benefit the most are armors, robes (clothes generally, I suppose) and alien textures. Human faces show little improvement, and module/area textures aren't always noticeably better.

  • Like 1

Share this post


Link to post
Share on other sites
On 12/24/2019 at 8:02 AM, Selphadur said:

Regarding TXI info. I just discarded .tpc format as it was giving too many issues (problems with mipmaps, seams, transparency; don't know if it was just a problem of a tool, but took too much time to transfer .txi info anyway). When making .tga you don't need any .txi info as game provides it by itself.

A TGA doesn't have any TXI data on it, no. The TPC format packages both image (TGA) and text (TXI) data. If you only install the TGA part and leave the TXI part out, in most cases that will cause a problem. Usually the result is a texture being rendered transparent instead of whatever it was supposed to do with the alpha channel.

There are a few cases in which the game doesn't need to read shader data from the texture, but those are the exception.

Share this post


Link to post
Share on other sites

Adding what JC have elaborated earlier -

3 hours ago, JCarter426 said:

If you only install the TGA part and leave the TXI part out, in most cases that will cause a problem. Usually the result is a texture being rendered transparent instead of whatever it was supposed to do with the alpha channel.

Such as player's armour. With textures like PMB-- and PFB-- [and pretty much everything that has B modeltype in the appearance.2da] they will need the TXI to properly show the environment map or transparency state controlled by the texture's alpha channel, and I'm quite sure that the area textures needs them too. Though, with exception -

3 hours ago, JCarter426 said:

There are a few cases in which the game doesn't need to read shader data from the texture...

such as Mandalorians and pretty much every droids that has F modeltype [full body model], their envmap column by default appointed to CM_Baremetal, therefore, the game handles them independently. Another stuffs that don't need additional TXI is customized lightmaps [still, with vanilla naming convention], as each of their TXIs are stored in the game files [BIFs \ lightmaps--.bif \ Extra Texture Info].

If you don't feel like making the TXIs from scratch, feel free to grab and include them with your mod from this modder's resource, @Selphadur. Though that only covers creatures and armour, but will prevent some problems from occurring, at the very least.

Share this post


Link to post
Share on other sites
7 hours ago, JCarter426 said:

A TGA doesn't have any TXI data on it, no. The TPC format packages both image (TGA) and text (TXI) data. If you only install the TGA part and leave the TXI part out, in most cases that will cause a problem. Usually the result is a texture being rendered transparent instead of whatever it was supposed to do with the alpha channel.

There are a few cases in which the game doesn't need to read shader data from the texture, but those are the exception.

It does not give any problems. When you use only .tga file without included .txi info game uses it's default texture info for the named texture. Regarding .tpc, it has terrible issues with mipmaps and seams.

4 hours ago, ebmar said:

Adding what JC have elaborated earlier -

Such as player's armour. With textures like PMB-- and PFB-- [and pretty much everything that has B modeltype in the appearance.2da] they will need the TXI to properly show the environment map or transparency state controlled by the texture's alpha channel, and I'm quite sure that the area textures needs them too. Though, with exception -

such as Mandalorians and pretty much every droids that has F modeltype [full body model], their envmap column by default appointed to CM_Baremetal, therefore, the game handles them independently. Another stuffs that don't need additional TXI is customized lightmaps [still, with vanilla naming convention], as each of their TXIs are stored in the game files [BIFs \ lightmaps--.bif \ Extra Texture Info].

If you don't feel like making the TXIs from scratch, feel free to grab and include them with your mod from this modder's resource, @Selphadur. Though that only covers creatures and armour, but will prevent some problems from occurring, at the very least.

If you write .tpc file without .txi info then yes there is a lot of problems.

Writing only .tga without adding any .txi info I am yet to see any problems. Transparency, specularity, envmaps and etc are handled well. Using .tpc with included .txi info on the other hand gave a lot of problems.

Share this post


Link to post
Share on other sites
1 hour ago, Selphadur said:

Writing only .tga without adding any .txi info I am yet to see any problems. Transparency, specularity, envmaps and etc are handled well. Using .tpc with included .txi info on the other hand gave a lot of problems.

That doesn't quite track.  If you're overriding the TPC texture with your TGA texture, you've also overridden the embedded TXI instructions in that replaced TPC. Therefore, there are no instructions for the game to interpret.  It certainly seems to me that you need to include TXI files for each texture that you replace if TXI information was present in the TPC file.

Share this post


Link to post
Share on other sites
34 minutes ago, Sith Holocron said:

That doesn't quite track.  If you're overriding the TPC texture with your TGA texture, you've also overridden the embedded TXI instructions in that replaced TPC. Therefore, there are no instructions for the game to interpret.  It certainly seems to me that you need to include TXI files for each texture that you replace if TXI information was present in the TPC file.

Well you can check out for yourself. I am on a fresh playthrough and using my mod with only .tga without any additional .txi info. Everything seems to work fine (skyboxes, characters, weapons, level textures and etc.). Everything has it specular maps, transparency and etc. It seems game has that info hard coded anyway. Not to mention a lot of .txi info you must search via HEX in KOTOR tool as in text area it shows incomprehensive characters (when you check via HEX you can see that info, like mipmap 0 or envmap texture and etc.). I had way more problems when transfering .txi info using KOTOR tool (be it from provided text area or via HEX) and compressing to .tpc than simply using .tga without any added .txi info. I think game when it does not have any provided .txi info in override it checks default (vanilla) textures and uses that info on top of .tga files in override.

 

Edited by Selphadur

Share this post


Link to post
Share on other sites

@Selphadur, it's an Override folder not a Partial Override folder. It doesn't refer to the replaced TPC because it is replaced. And the TXI info is encoded in the TPC...

Share this post


Link to post
Share on other sites
34 minutes ago, Sith Holocron said:

@Selphadur, it's an Override folder not a Partial Override folder. It doesn't refer to the replaced TPC because it is replaced. And the TXI info is encoded in the TPC...

And yet it somehow works. 

I do agree if you put .tpc format it overrides .txi (and if you put no .txi info in it so it won't have any). But it seems if you just put .tga files it works no problem.

Ofcourse if I see any problems due to this I will add that .txi info, but so far nobody reported anything and I did not see any problems yet. Just because you can put .txi for every texture does not mean you have to do it. If using .tga does not overwrite .txi info and just .tpc files do I don't see a problem then.

Edited by Selphadur

Share this post


Link to post
Share on other sites

I can confirm that replacing *.TPC with *.TGA without *.TXI works. I've got the impression that if you don't provide *.TXI the game will read that information from corresponding *.TPC.

You can check it yourself with mods like this one. It has only *.tga files for saber blades, but *.txi instructions (blending additive and decal 1) are applied to them anyway.

  • Like 1

Share this post


Link to post
Share on other sites

Like I said, sometimes it does. However, there's no guarantee of that in every scenario, and numerous users have reported problems with textures missing the shader data.

14 hours ago, Selphadur said:

Regarding .tpc, it has terrible issues with mipmaps and seams.

11 hours ago, Selphadur said:

Not to mention a lot of .txi info you must search via HEX in KOTOR tool as in text area it shows incomprehensive characters (when you check via HEX you can see that info, like mipmap 0 or envmap texture and etc.). I had way more problems when transfering .txi info using KOTOR tool (be it from provided text area or via HEX) and compressing to .tpc than simply using .tga without any added .txi info.

That's not a problem with the TPC format, that's a problem with how KOTOR Tool reads and writes it. There are better tools for that like xoreos, tga2tpc, and KOTOR Stuff.

Share this post


Link to post
Share on other sites
10 hours ago, JCarter426 said:

Like I said, sometimes it does. However, there's no guarantee of that in every scenario, and numerous users have reported problems with textures missing the shader data.

That's not a problem with the TPC format, that's a problem with how KOTOR Tool reads and writes it. There are better tools for that like xoreos, tga2tpc, and KOTOR Stuff.

 tga2tpc was causing issues of seams and mipmaps (and transparency in some cases). Don't know why and how, but it messes up mipmaps. Not to mention every 20 or so textures it crashes. Did not know about KOTOR Stuff.

But again, I am yet to see any shader problems only using .tga.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.