mask, diffuse and material - how do they work and how can I make them using Gimp?

Discussion in 'Mod Support' started by cascadian, November 19, 2016.

  1. cascadian

    cascadian Member

    Messages:
    54
    Likes Received:
    93
    I've been following this guide https://drive.google.com/drive/folders/0B_RXrYUHtKK_bjlieXhxbkZLajA
    and have everything working for my units except the textures. All the guides I could find explain the process using photoshop and an extension called Super PNG, which I don't have access to. Anyways, when I run the mask.png etc files through my papatran batch file, I get an error stating "--texture-mode incompatable with image input file
    1 error" and thus that is where I'm at right now. From what I gather my images are relatively correct, its likely that the exporting is off. If someone has used Gimp in the past to create mask/diffuse/material stuff, I'd love to learn the details.
  2. stuart98

    stuart98 Post Master General

    Messages:
    6,008
    Likes Received:
    3,888
  3. Killerkiwijuice

    Killerkiwijuice Post Master General

    Messages:
    3,878
    Likes Received:
    3,621
    Do you have a link to the images? I've never seen that error either.
  4. cascadian

    cascadian Member

    Messages:
    54
    Likes Received:
    93
    and this is my batch file
    cd C:\Program Files (x86)\Steam\steamApps\common\Planetary Annihilation Titans\bin_x64\tools\
    set diffuse=%oamal%diffuse
    set material=%oamal%material
    set mask=%oamal%mask
    papatran --texture-mode strip -o "C:\Users\Cameron\Desktop\boxbot\oamal_diffuse.papa" "C:\Users\Cameron\Desktop\oamal_diffuse.PNG"
    papatran --texture-mode strip -o "C:\Users\Cameron\Desktop\boxbot\oamal_material.papa" "C:\Users\Cameron\Desktop\oamal_material.PNG"
    papatran --texture-mode strip -o "C:\Users\Cameron\Desktop\boxbot\oamal_mask.papa" "C:\Users\Cameron\Desktop\oamal_mask.PNG"
    pause

    Attached Files:

  5. cascadian

    cascadian Member

    Messages:
    54
    Likes Received:
    93

    Attached Files:

  6. Killerkiwijuice

    Killerkiwijuice Post Master General

    Messages:
    3,878
    Likes Received:
    3,621
    Try changing "strip" to "include". Strip is for models.

    Also the alpha layer should not be its own file, which is why superPNG is required (I don't think there is any alternative). The diffuse needs an alpha channel, maybe this will help https://docs.gimp.org/en/gimp-using-web-transparency.html
  7. cascadian

    cascadian Member

    Messages:
    54
    Likes Received:
    93
    from those files I sent, would it be possible for you to do the super png export and batch conversion?

    with "strip" changed to "include", I get another error
    : "could not find resource-root setting"
  8. Killerkiwijuice

    Killerkiwijuice Post Master General

    Messages:
    3,878
    Likes Received:
    3,621
    do you have a deafult.settings file in your png directory?
  9. cascadian

    cascadian Member

    Messages:
    54
    Likes Received:
    93
    default.settings ? yep. I thought maybe my size value was off but that doesn't seem to matter
  10. Killerkiwijuice

    Killerkiwijuice Post Master General

    Messages:
    3,878
    Likes Received:
    3,621
    Oh, it's because you're running papatran from an entirely separate folder. You need to copy it to the png folder then change the "cd" command to be in that folder. Papatran is trying to find default.settings in the tools folder.
  11. cascadian

    cascadian Member

    Messages:
    54
    Likes Received:
    93
    I've tried copying papatran into the png folder as well as putting the settings file into tools, but the same error keeps popping up. Would the file name matter at all? I just have my batch labeled batch.bat
  12. Killerkiwijuice

    Killerkiwijuice Post Master General

    Messages:
    3,878
    Likes Received:
    3,621
    Based on your bat file, the default.settings file and papatran should be on your desktop. You need to cd to the desktop then run the batch file. And no, the name doesn't matter.
  13. cascadian

    cascadian Member

    Messages:
    54
    Likes Received:
    93
    [​IMG] http://i.imgur.com/3YyHSBS.jpg

    This is what I've got so far, and can't figure out why it wont work. "default" is default.settings, I just changed it to read with notepad for the image.
  14. stuart98

    stuart98 Post Master General

    Messages:
    6,008
    Likes Received:
    3,888
    @cascadian That default.settings was pulled from a directory where it was supposed to inherit from a higher tree. Go higher along the tree.

    EDIT: Use this:
    resource-root: /pa
    srgb-texname-expression: diffuse|skybox
    texture-format-alpha: dxt5
    texture-format-noalpha: dxt1
  15. Killerkiwijuice

    Killerkiwijuice Post Master General

    Messages:
    3,878
    Likes Received:
    3,621
    you're probably right but the text should only be texture-max-size: n

    the other stuff is unnecessary for simple textures

    these files are really weird because they seem to be like a hybrid between binary and readable text
  16. cascadian

    cascadian Member

    Messages:
    54
    Likes Received:
    93
    Well this works! I don't really know why it does, but I'm happy with it.
    stuart98 and Killerkiwijuice like this.
  17. Killerkiwijuice

    Killerkiwijuice Post Master General

    Messages:
    3,878
    Likes Received:
    3,621
    how big is the output file?
    stuart98 likes this.
  18. cascadian

    cascadian Member

    Messages:
    54
    Likes Received:
    93
    43kb
    stuart98 likes this.

Share This Page