Skip to content

Upside down TGA Textures

I dont know where to put it.
I often have this problem when making CC. (Legacy from original NWN)
Would it be possible to fix it?

Comments

  • ZwerkulesZwerkules Member Posts: 112
    Save the tga with a program that allows you to deactivate compression such as gimp and it is fixed.
  • Sunssarathi2029Sunssarathi2029 Member Posts: 32
    Thanks
  • SymphonySymphony Member, Developer Posts: 142
    @Sunssarathi2029 I'm not sure what Legacy from Original NWN means, if you are bringing stuff from NWN into NWN EE, no conversions should be necessary.

    @Zwerkules is right, you cannot save TGA's as "Run Length Encoded", this compression shortens the files, since they do not expand to full size again during gameplay. This gives them rainbow static, and then they end earlier then expected.

    In Gimp, the export options for TGA's allow you to turn off this RLE compression.

    However, if you have upside-down TGA's, that is because Neverwinter Nights "paints" the TGA colors into the game from the "bottom left". TGA's come in two different flavors, "bottom left read" and "top left read". That is, the FIRST pixel in the file "belongs" in the bottom or top left of the rectangle the game is drawing for the texture. It still "writes" from left to write, but think about there being two ways to read a book, from the last line to the top, or from the top line to the bottom, left to right each line.

    This became a big issue for the NWN community, and many many many Community content materials, such as wall/floor textures are upside-down and were never noticed because they only caused minor errors. Or, the textures were read upside-down and then the models in the game were given upside-down UV's to fix it.

    "TOP LEFT" read TGA's I think have become more popular in the TGA universe, so many programs save to Top Left format without even asking you which one you want. GIMP allows you to select either one.

    Neverwinter Nights uses "BOTTOM LEFT READ", so make sure you save your TGA's as Bottom Left.

    If you've ever seen anyone talk about the TGA flipper in the community, particularly about using it twice, that is because it was made to stage TGA's for NWN use and saves them as "bottom left" no matter which kind they started with. However, this is a necessary side-effect of the program (you have to save a TGA as one or the other). I think the original design of the TGA flipper was to flip the TGA's that were made with a community made DDS-TGA converter.

    The community made converter, I think, thought the DDS files were top-left read (they are also Bottom Left), or, were using DDS files that were upside-down anyways because they were converting top-left TGA's into DDS's with Bioware's tool. I am not sure, but others using the converter found it was giving them upside-down TGA's, and someone made a tool to flip them right-side up (so they could then be edited, used in override, and eventually converted back into DDS).



    This is a confusing issue, you're certainly not the first to have this problem, but the Take-Away should be that you need to use a program that let's you choose TGA's to be non-RLE and Bottom Left Read when you save them. I strongly recommend the new GIMP 2.10.
  • TarotRedhandTarotRedhand Member Posts: 1,481
    Unsurprisingly there is a windows program written specifically to fix this little problem called TGA_Flipper. It not only flips the texture back the right way up but also strips out a number of things NwN doesn't like including RLE compression.

    TR
  • TarotRedhandTarotRedhand Member Posts: 1,481
    @Symphony said
    If you've ever seen anyone talk about the TGA flipper in the community, particularly about using it twice, that is because it was made to stage TGA's

    I use it like that because as I said in my previous post it gets rid of the things that NwN doesn't like and not just RLE compression and fixing whether the texture is left or right handed.

    TR
  • DordledumDordledum Member Posts: 243
    Unsurprisingly there is a windows program written specifically to fix this little problem called TGA_Flipper. It not only flips the texture back the right way up but also strips out a number of things NwN doesn't like including RLE compression.

    TR

    TGA Flipper saved my portrait files, thanks to this thread and the link!
Sign In or Register to comment.