Jump to content


Member Since 11 Jun 2017
Offline Last Active Nov 17 2017 03:21 PM

Posts I've Made

In Topic: [TOOL] KotOR Stuff

10 August 2017 - 01:17 PM

I am pretty sure that you could use imagemagick for making a script that does the same thing as that workaround. Inagemagick works well in Cygwin under Windows or in Linux/OS X.

In Topic: [TOOL] KotOR Stuff

10 August 2017 - 11:21 AM

That is what I thought too.

In Topic: [TOOL] KotOR Stuff

10 August 2017 - 11:07 AM

As far as cubemaps are concerned, the TXI uses the Alpha layer of the texture to determine what is shiny and what is not. Without an Alpha layer, the texture with a cubemap applied to it either by the TXI or Appearance.2da will apply it to the entire object.
As far as what the TXI functions are, I only know of very few. There is, however, a topic on this forum devoted to listing them all that may be of some assistance.

It would surprise me if the presence of the "cube map" TXI-attribute implies that the alpha is a "shininess" map. I am pretty sure that I have seen specific attributes for that and, until now, I didn't know what they did. I will examine this when I get back to my computer.

I would appreciate a link to that forum thread. I tried to search for it but it is difficult on the phone.

In Topic: [TOOL] KotOR Stuff

10 August 2017 - 10:16 AM

There's likely a few solutions to add TGA support to your tool.

That looks really interesting, perhaps I should make a fork of CSharpImageLibrary, adding TPC support, and then use that in the tpc tool. It even has DXT compression done. :)

In Topic: [TOOL] KotOR Stuff

10 August 2017 - 08:46 AM

Interesting. I thought that since normal maps are stored in separate files, reflection maps and such would also be stored in separate files. I will think about how to handle this. Most likely, I will make an option to extract the alpha channel as a separate gray scale image and then add the possibility to provide two PNGs to create a new TPC file.


For now, this work-around in Photoshop might work:

  1. Open the converted PNG
  2. Menu: Layer->Layer Mask->From Transparency
  3. Alt-LeftClick the mask
  4. Ctrl-a Ctrl-x to cut the mask out. This will make the mask completely white, meaning that you can see all that info that the alpha channel was hiding
  5. Menu: Layer->New->Layer
  6. Ctrl-v to paste the mask into the new layer
  7. Edit the image and alpha layers to your hearts content
  8. With the alpha layer selected, ctrl-a ctrl-c
  9. Alt-LeftClick the mask of the image layer
  10. Ctrl-v to paste in the edited alpha channel
  11. Hide the "alpha" layer
  12. Save as PNG
  13. Use the tpc tool to create a new TPC file based on the new PNG file

I am not 100% certain that this will be perfectly accurate, but I think that it should work even if it is a bit clunky. Also, the tpc tool still can't create DXT-compressed images.


@sELFiNDUCEDcOMA about the GUI

Yes, that is one of the main points of this exercise: The code is structured so that there are libraries that handle the file formats and separate console applications for the tools I provide. Anyone could use the same libraries in their own GUI application directly, or call the console applications when needed. Many options are available. :D



The TXI can say many things. Most, as I understand it, has nothing to do with the alpha channel. Is there a list somewhere that explains what the various TXI attributes do? I have guessed many, but it would be nice to build a comprehensive list in a public space.