[WIP] Papa texture editor v0.4.1

Discussion in 'Work-In-Progress Mods' started by DeathByDenim, February 7, 2014.

  1. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,325
    Likes Received:
    2,118
    Textures are hidden in papa files, the format of which was unknown until a few days ago.
    But now it's known, so I started building a papa editor. Version 0.4.1 is up on GitHub. Binaries are available for Linux, Mac and Windows.

    Use File -> Open to open a directory containing textures.
    You can export whatever texture is displayed through File -> Export. A whole slew of image formats are supported thanks to Qt4, but you will probably want to save as PNG, since that has transparency support.

    The import menu item only works for A8R8G8B8 (i.e. skyboxes) and X8R8G8B8 (some particle effects). DXT1 editing works too, but is highly experimental.

    Version 0.1: Initial release
    Version 0.2: Lots of polishing
    Version 0.3: Bugfix for A8R8G8B8 and X8R8G8B8 and minimaps. This may have caused edge effect with skyboxes. Also, the last export directory wasn't saved properly.
    Version 0.3.1: Bugfix for DXT1 and DXT5. Colour channels were switched apparenty. Thanks for @WwAiRtRhIiOnR for pointing that out.
    Version 0.3.2: Attempt at fix DLL error on Windows.
    Version 0.4: Fix for crashing on (32-bit?) Windows when loading DXT5 textures. Also you can now supply a directory from the command-line. Thanks to @deltablu26 for finding that one.
    Version 0.4.1: Fix for a bug introduced by the previous bugfix. DXT5 textures were being corrupted.
    Last edited: October 15, 2014
  2. lokiCML

    lokiCML Post Master General

    Messages:
    1,975
    Likes Received:
    954
    Great utility, there is something wrong with the zip file. Windows is saying it's invalid, cannot open and is empty. Try opening it with 7-zip and built in Windows zip function.;):)
    Last edited: February 7, 2014
  3. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,325
    Likes Received:
    2,118
    Erm, it works fine for me.
    Code:
    jarno@grimlock:~ $ unzip -t papatextureeditor_win.zip 
    Archive:  papatextureeditor_win.zip
        testing: papatextureeditor.exe    OK
        testing: libgcc_s_dw2-1.dll       OK
        testing: mingwm10.dll             OK
        testing: QtCore4.dll              OK
        testing: QtGui4.dll               OK
    No errors detected in compressed data of papatextureeditor_win.zip.
    
    Maybe the download got corrupted? It should have an MD5 of 9bc52598fe9b3434aa575787567a5ff9
  4. lokiCML

    lokiCML Post Master General

    Messages:
    1,975
    Likes Received:
    954
    The download is corrupted it has a hash of 6c59c1b92a7471cd2afcf594f3cdc819.:(
    Thank you
  5. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,325
    Likes Received:
    2,118
    So, redownloading fixed it, right?
  6. lokiCML

    lokiCML Post Master General

    Messages:
    1,975
    Likes Received:
    954
    No, getting a different hash now. 56770a4180902547b1162002e1f683df
  7. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    Unzips fine for me. (Windows 7)
  8. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,325
    Likes Received:
    2,118
    Well, that sounds like something is messing with your Internet connection... GitHub has always worked fine for me. You could try downloading it from a different computer if you can.
  9. lokiCML

    lokiCML Post Master General

    Messages:
    1,975
    Likes Received:
    954
    Could be that my college is doing something. I'm in the dorms but they seem not to block anything.
  10. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,325
    Likes Received:
    2,118
    Oh, nuts. There is a bug in the DXT5 loading routine. I will only load the colour red and display is as grey. I've fixed it and also added a routine for loading X8R8G8B8 textures, which I forgot about earlier. I've updated the Linux and Windows binaries. Mac will follow later.

    Sorry about that.

    EDIT: Mac also updated now.
    Last edited: February 7, 2014
    maxpowerz likes this.
  11. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    Use this link to download the windows binaries, If clicking the link doesn't work right click and "save as"

    <<<When Downloading On Git Hub>>>
    Left click the link for the zip file,
    Then Right click on the Veiw Raw link and "save as".

    0.jpg


    1.jpg

    It should be about 5.4meg

    Edit.
    If you right click the link to the zip file in the first image and save that one it doesn't work,
    it downloads a webpage and saves it with the file name, it doesn't save the zip file.

    I had this issue too.

    Double edit,,
    the reason why lokiCML was getting different hash's was because the file he was downloading was the webpage in the second image.
    Last edited: February 8, 2014
    lokiCML likes this.
  12. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    @DeathByDenim
    Can you plz put a build number in there somewhere :)
    Then i know if i'm using an outdated version.

    Edit.
    Maybe bottom left in the corner of the main window..
    Under the PNG list.
    Last edited: February 8, 2014
  13. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,325
    Likes Received:
    2,118
    Meh, the outdated version is simply the one that doesn't work so well. ;)

    But yeah, getting there. I just wanted the texture extraction part out there first so people could play with the textures. (And then I found a bug)
    maxpowerz likes this.
  14. lokiCML

    lokiCML Post Master General

    Messages:
    1,975
    Likes Received:
    954
    Thank you, maxpowerz
    maxpowerz likes this.
  15. allister

    allister Active Member

    Messages:
    115
    Likes Received:
    175
    This is the reason I have been checking this modding forum daily. For a papa texture editor. Now I can extract those UV textures and render some sick nasty PA scenes. In the future when I'm not busy, though, you might find them on reddit. Thanks a lot DeathByDenim.

    I've been messing around with the Delta Commander lately. It's kind of a pain to get the exact texture you want because of the way PA uses masks, materials, blah blah blah to skin a model (to support team colors of course). Made my own simple specular and bump maps for him too.

    [​IMG]

    [​IMG]

    Still working on this though: cleaning up the texture to reduce the pixelation you see and I'm not sure how to do the eyes (which consist of like 15 pixels each). Also, thanks to raevn for his Blender papa model importer/exporter.
  16. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,325
    Likes Received:
    2,118
    So, I've updated the binaries to version 0.1. It's now possible to save to A8R8G8B8 and X8R8G8B8 directly from the Papa Texture Editor. That is, you can now edit skyboxes without a loss in image quality due to papatran by default saving as DXT5. (Though you can possible change that for papatran by editing default.settings).
    I've even included a help button!
    LavaSnake likes this.
  17. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Does it actually help you though?
  18. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,325
    Likes Received:
    2,118
    Not really. It just insults you intelligence as any good help file should do. :)
    But really, it just explains the menu options and that's it.
    LavaSnake, lokiCML, maxpowerz and 2 others like this.
  19. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Rats. What it really needs is a nice, demeaning help file.

    Here's an example help file you can use:
    DeathByDenim likes this.
  20. superouman

    superouman Post Master General

    Messages:
    1,006
    Likes Received:
    1,139
    So, i am stuck again after 2 hours. This is how i understand how to convert a png to papa in the texture editor, i open a a8r8g8b8 papa file, i import the png files and save each papa file.
    However, it doesn't work. Also, when i copy paste already existing a8r8g8b8 papa textures elsewhere to import my pngs, the displayed path of the textures stays the same /pa/terrain/sky/textures/
    What does the text in red mean? Incorrect png file path? Wrong picture format?
    The saved papa file with the red path display a black texture in PA.

    [​IMG]

    Also, i edited default.setting conversion format to a8r8g8b8 but :
    [​IMG]

    So, basically, i am probably doing many things wrong.

Share This Page