Textures with .papa format

Discussion in 'Mod Discussions' started by someonewhoisnobody, February 6, 2014.

  1. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    When the .papa format was announced there was a little talk of packing your own textures but little talk about looking at the existing textures and this was made. However this seamed to be the end of it.

    Is there a way to unpack the textures into a usable picture format?
  2. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    That was made within the last week. DeathByDenim has been reverse engineering the format and is getting really close.
  3. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    I pointed out the extra OpenGL texture formats and DeathByDenim fully reversed engineered the papa format earlier today,
    Soon a papa texture editor/extractor will be made..
    LavaSnake and cptconundrum like this.
  4. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    Papa texture editor made by DeathByDenim

    Edit.
    linked directly to Denim's editor :)
    Last edited: February 6, 2014
  5. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    U mean the one I linked in my post?
  6. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    Looks like it, yep. What exactly are you trying to accomplish? From what I read, denim figured out how to read and write textures as papa files.
  7. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    I wasn't aware that he finished it. Last time I checked he was still working on TF_DXT5
  8. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    He still is from what I see and he only can read so far, but not write. But the key points are reversed from what I understand. Should only be a matter of time until it completely works hopefully.
  9. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Working on it. Patience! ;)
    someonewhoisnobody and allister like this.
  10. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    why the need to write a program to save edited papa data?
    We have papatrans.exe..
    Someone could just use that to re-save image as papa after it is extracted from a papa and edited.

    Maybe extracting it via denim's editor then re-save using papatrans via cmdline would be easiest option.

    Edit fixed my touchscreen typo's
    Last edited: February 7, 2014
  11. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Heh, cool. That actually works:
    Code:
    jarno@weasel:~/Games/PA/media$ ~/Games/PA/tools/papatran -o test.papa pa/terrain/ice/textures/test.png
    jarno@weasel:~/Games/PA/media$ ~/Games/PA/tools/papadump test.papa
    1 texture:
    0:
    name: "/pa/terrain/ice/textures/test.png"
    format: TF_DXT5
    width: 256
    height: 256
    mips: 8
    srgb: 0
    0 vertex buffers.
    0 index buffers.
    0 materials.
    0 meshes.
    0 skeletons.
    0 models.
    0 animations.
    
    I'm not sure how you control the texture format though. Or if that even matters. The texture I put in was DXT1 originally, but converted to PNG.
    cola_colin and maxpowerz like this.
  12. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Hmm is there an easy way to get rid of the mex model? Basically I want it to be a flat square again to display the texture on it.
  13. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    In what software?
    Blender, 3ds Max, or a 3d model Veiwer?

    I have uploaded a 2 vertice square converted into a papa file if you want to use that to replace a model in PA and see what the texture looks like on a flat surface.
    Just put the square.papa inside the unit folder of the unit you want to replace, and edit the unit's .json to point to the square.papa and leave the original texture on it ( im sure the .json for each unit has both model and texture .papa's linked in there.)


    You could also use a hex editor to take the data of the flat square and replace the data inside a different papa,
    Example would be a PAPA file that has both textures and model inside.
    I haven't seen one yet but i'm guessing it's possible as the PAPA header seems to suggest it could handle having both model and texture data inside the one file.

    Attached Files:

    cola_colin likes this.
  14. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    In what software? In PA of course.

    From what I tried it seems that the model defines what textures it uses.
    So i.e. a dump on the metal model papa includes a reference to the metal textures.
    The json only seemed to have the model in it.
    Maybe I am wrong, I'll try soon.
  15. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    I found the texture for you..
    Pain in the butt thing is the metal splat seem's to be linked into 3 .json files, but anyways i found the texture :D

    pa\terrain\generic\metal_decal_01.papa

    metal spot.jpg
  16. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    I'll see if i can modify a .json and add in the link and location of the metal_decal_01.papa and change the metal splat mex model for the square one i posted earlier.

    Hopefully it will load the square model with the metal decal on it like your hoping for :D
  17. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I could have told you the location of the texture. The issue is that I need to replace the model and reference my own textures with it. It's not that important though, all I'll do is put in a cat girl again.
    cptconundrum likes this.

Share This Page