[REFERENCE] papadump.exe & papatran.exe

Discussion in 'Mod Discussions' started by Raevn, June 20, 2013.

  1. Nicb1

    Nicb1 Post Master General

    Messages:
    1,026
    Likes Received:
    1,310
    I've been having a similar issue to what stuart described in one of his earlier posts where I get the "could not find resource-root setting" error. I have the default.settings file in the same location as papatran and the png texture which I am attempting to convert, so i'm not exactly sure what i'm doing wrong here.

    Any help would be greatly appreciated.

    EDIT:
    Never mind turns out I had the wrong .settings file in my papatran directory.
    Last edited: February 6, 2015
  2. mikeyh

    mikeyh Post Master General

    Messages:
    1,954
    Likes Received:
    1,670
  3. Anonemous2

    Anonemous2 New Member

    Messages:
    10
    Likes Received:
    12
    Hello, I hope this thread is still active...
    I'm working on my first PA mod, which will add new biomes for the system editor. Part of that process requires new textures, which must be converted into a .papa file. After navigating to my tools directory inside PA with cmd prompt, and then executing the following command...
    papatran.exe --texture-mode include -o {filename.papa} {europa_tile_diffuse.png}

    ....it produces this error:
    {europa_tile_diffuse.png}: unrecognized extension
    1 error


    Should I be using a different command?
  4. cdrkf

    cdrkf Post Master General

    Messages:
    5,750
    Likes Received:
    4,831
    I don't think Mikeyh is about these days, but I think one of the other experienced moders like @Nicb1 might be able to give you a hand...
  5. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,363
    Likes Received:
    2,144
    I think you took the curly braces too literally. Try
    Code:
    papatran.exe --texture-mode include -o filename.papa europa_tile_diffuse.png
  6. Anonemous2

    Anonemous2 New Member

    Messages:
    10
    Likes Received:
    12
    Thanks for the rapid reply! However, now I get this error:
    europa_tile_diffuse.png: could not load: invalid filter
    1 error

    Fortunately, .pngs CAN be used for my planets. I don't know if there are any adverse effects as such, but at least I can continue work. Here's what I have so-far:

    EuropaV1.PNG
  7. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,363
    Likes Received:
    2,144
    Wow, that looks awesome!

    I'm not sure what the invalid filter means. What are the png and default.settings you are using?

    The adverse effects of using pngs is that they are about 30 times larger, so that will balloon the size of your mod. Also, the papa files will already be in a graphics card compatible format (DXT5).
    Anonemous2 likes this.
  8. Anonemous2

    Anonemous2 New Member

    Messages:
    10
    Likes Received:
    12
    Here's my default.settings, and the .png;
    resource-root: /pa
    srgb-texname-expression: diffuse|skybox
    texture-format-alpha: dxt5
    texture-format-noalpha: dxt1

    Attached Files:

  9. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,363
    Likes Received:
    2,144
    Thanks!

    I just tried it out. It looks like papatran does not approve of interlaced PNGs. I got the same error as you, so I opened the PNG in Gimp and saved it as a non-interlaced PNG. Then it works. Don't ask me why. :)
    lulamae likes this.
  10. Anonemous2

    Anonemous2 New Member

    Messages:
    10
    Likes Received:
    12
    It worked, Thanks!
    HOWEVER I still require some assistance... now my textures have pink outlines, like the normal map is 'showing' through,
    toxicV1.PNG
    which is strange considering I'm using unaltered normal maps, straight from game. :confused:

    In case it's because of my .png save settings here they are:
    toxicDecalV1.PNG
    Any ideas could help...

    EDIT:
    Nope, was a problem with that particular texture. Loaded it up with gimp, and there that pink outline was. Not sure how corel kept doing it, but switching to gimp seemed to stop it from appearing.

    Attached Files:

    Last edited: August 10, 2018
    DeathByDenim likes this.
  11. cdrkf

    cdrkf Post Master General

    Messages:
    5,750
    Likes Received:
    4,831
    Were you working in cmyk in Corel maybe? Or possibly a non default colour palette?
    Anonemous2 likes this.
  12. Anonemous2

    Anonemous2 New Member

    Messages:
    10
    Likes Received:
    12
    So I now can create textures and apply them to biomes, and they show up correctly :D.
    CSGs however don't want to play nice. I've tried several times to get them to appear correctly, and with a texture. This is all I can get;
    pubble.PNG
    Not sure what's happening, since this is what I 'fed' to papatran;
    puddlerendered.PNG

    Any clues?

    EDIT:
    Here's how I tried getting my model in;
    1) build model in Blender
    2) UV unwarp
    3) apply texture, then export as .fbx
    4) use 'papatran.exe --texture-mode reference -o' to convert into .papa
    5) set brush to spawn in biome

    EDIT #2:
    Found this really helpful:
    https://forums.uberent.com/threads/tutorial-making-custom-csg-and-features.72845/
    And got my CSGs working (sort-of), well except for the one I showed here. PA just doesn't like the model for some reason.
    Last edited: August 12, 2018
    Nicb1 likes this.
  13. Nicb1

    Nicb1 Post Master General

    Messages:
    1,026
    Likes Received:
    1,310
    Not sure if this will help but in the past I've had to export models using 3ds max rather than Blender. Found that when you export models as FBX in blender it acts up a bit. So you're best off importing it to 3ds max then exporting it using that(The conversion software doesnt seem to like it). Let me know if you're able to give this a shot and if it works out.

    If you don't have any of the max software just send me the model in a pm or something and I can try do it for you (Assuming my copy of 3ds is still valid).
  14. acesoyster

    acesoyster Active Member

    Messages:
    114
    Likes Received:
    179
    If you can run the papa through papadump I can probably spot the issue. My models used to do that a lot until we worked out that you need the second UV channel for CSG.
    flubbateios likes this.
  15. Anonemous2

    Anonemous2 New Member

    Messages:
    10
    Likes Received:
    12
    Unfortunately, I do not have 3DS Max, Although you can try it yourself; I've included my CSG saved inside a zip.


    After Here's the papadump output (after I went back and added the second UVlayer and reconverted it):
    output.PNG

    Attached Files:

  16. acesoyster

    acesoyster Active Member

    Messages:
    114
    Likes Received:
    179
    I’ll have to have a look when I am back at my normal computer. I recognise the problem I just can’t rememebr what I did to fix it
    flubbateios likes this.
  17. Anonemous2

    Anonemous2 New Member

    Messages:
    10
    Likes Received:
    12
    I've moved on to other CSGs in the mean time, and I've had more success, but the shading is glitchy. Once again, I ask if you guys know how to fix this;
    shaderglitch.PNG

    Attached Files:

  18. acesoyster

    acesoyster Active Member

    Messages:
    114
    Likes Received:
    179
    That shading looks to me to be due to an odd normal map texture. There are a couple of other things that can mess with shadows, but given the CSG, I think the first thing to check is that your normal map is similar to the normal map from vanilla CSG. It should be mostly blue with touchess of other colour on details.
    Anonemous2 likes this.
  19. Anonemous2

    Anonemous2 New Member

    Messages:
    10
    Likes Received:
    12
    Thanks, that worked!
    I was using transparent pink for the normal map before, as that is what I saw being used by PA's CSGs.
    Now I just need to find a way of generating normal maps....
  20. acesoyster

    acesoyster Active Member

    Messages:
    114
    Likes Received:
    179
    Yeah, if I didn’t have a photoshop licence for other work I would be a bit scuppered on that one. I’m sure other tools must exist though
    flubbateios likes this.

Share This Page