1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

.dds Editing With Paint.Net causing Dark-Lit Textures [Solved]

Discussion in 'Modding' started by Captain_Brian, Oct 31, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Captain_Brian

    Captain_Brian Apprentice Engineer

    Messages:
    253
    Could someone help me here? What's the proper settings in Paint.net in order to save .dds files?

    I've tried DXT1, 3, and 5, as well as with "Generate Mip Maps" but I just can't get it to work.

    What are the right settings for Paint.net?

    (I'm trying to modify the oxygen generator model texture and icon in both DX9 and DX11.)

    Thanks!
     
  2. Digi

    Digi Senior Engineer

    Messages:
    2,393
    I had that as well, I believe it's because 'generate mip maps' needs to be off for the _add...

    This could also happen if your AO is fully black (red channel in _add).

    And almost all textures use alpha for something so you should save something that has alpha, so just save DXT5.
     
    • Like Like x 1
  3. Captain_Brian

    Captain_Brian Apprentice Engineer

    Messages:
    253
    Thanks for the help!

    Does paint.net destroy the mipmaps of .dds files it opens?

    I'm asking cause I opened up that original texture in GIMP and it had like 8 different layers with the same texture different sizes. When I open it up in paint.net it is just the single, largest layer. Is this a problem? Or are those different layers not needed?
     
  4. Harag

    Harag Junior Engineer

    Messages:
    913
    Paint.net only loads the highest resolution and generates new mipmaps when you tick the corresponding option in the save-as dialog for .dds files.

    There are several other possible causes. If the texture is all black:
    • Do you have a normal map (_ns under Dx9, _ng under Dx11)? Is it a tangent space normal map? Use fake_ns.dds / fake_ng.dds if you don't require a normal map or glossiness.
    • Your AO channel should be white (the red channel in _add, only used by Dx11).
    • Mipmaps only play into this if they are generated wrong. For example texconv sets the RGB channels to black for an A-channel value of 0 if you don't tell it to process RGB and A separately. In other tools this option usually is called "Save color of transparent pixels".
    If the diffuse color map is only somewhat darker under Dx11 than in Paint.net that's probably because you didn't use a .dds subformat that tells Dx11 that the texture is in sRGB colorspace. This is new with Dx11 and most tools don't support it well, if at all.

    What I do is I export to .png and then run those images through Microsoft's texconv command-line tool:
    Code:
    texconv -f BC7_UNORM_SRGB -if TRIANGLE_DITHER_DIFFUSION -sepalpha texture_cm.png
    texconv -f BC7_UNORM -if TRIANGLE_DITHER_DIFFUSION -sepalpha texture_ng.png
    texconv -f BC7_UNORM -if TRIANGLE_DITHER_DIFFUSION -sepalpha texture_add.png
    texconv -f BC3_UNORM -fl 9.1 -sepalpha texture_de.png
    texconv -f BC3_UNORM -fl 9.1 -sepalpha texture_ns.png
     
    Last edited: Nov 1, 2015
    • Like Like x 1
  5. Captain_Brian

    Captain_Brian Apprentice Engineer

    Messages:
    253
    I got it fixed, thanks! I was missing all the other .dds files other than the _me.dds. >_<

    Have a new problem though, for some reason the purple background bleeds through with any type of transparency. How do you do soft edges properly?

    [​IMG]
     
  6. Harag

    Harag Junior Engineer

    Messages:
    913
    Just to make sure you know how _me textures are used by the game here is a visual explanation. If you don't want the text to be re-colored don't include it in the re-color mask.
     
    • Like Like x 1
  7. Captain_Brian

    Captain_Brian Apprentice Engineer

    Messages:
    253
    I'm not sure how that translates to paint.net unfortunately. I don't have an alpha layer, do I need to generate one?

    Also, my texture doesn't show up at all in DX11. When I try to open the _add, _cam, and _ng, they all say invalid format in both paint.net and GIMP. (This is the original oxygen tank files that I'm trying to edit here.)
     
  8. Harag

    Harag Junior Engineer

    Messages:
    913
    Paint.net has minimal tools to edit the alpha channel separately. In Gimp you can do this:

    [​IMG]

    And as I said: Most tools have difficulties handling the Dx11 subformats. Both Paint.net and Gimp have no support at all. That's why I use .png as an intermediary format which I then run through texconv. texconv can also convert from .dds to .png, by the way.

    EDIT: Also note that all the BCx subformats apply lossy compression to the image (just like .jpg does). So every import-export-roundtrip through Gimp degrades the texture quality further. It's best to keep your source material in a loss-less format like .png.
     
    Last edited: Nov 1, 2015
    • Like Like x 1
  9. Captain_Brian

    Captain_Brian Apprentice Engineer

    Messages:
    253
    THANK YOU!!!

    This has just about fixed everything for me, it looks great in-game now!

    The only problem I have now is that the green lights that indicate how full the tank is aren't glowing in the dark anymore. Any idea on what is causing this? It is doing it in both DX9 and DX11...


    Here is a screenshot of what I mean:

    [​IMG]
     
    Last edited: Nov 1, 2015
  10. Captain_Brian

    Captain_Brian Apprentice Engineer

    Messages:
    253
    I've made sure all of the Emissive1 though Emissive4 textures are pointing at the original "Textures\Models\Cubes\OxygenStorage_*.dds" textures, but it doesn't seem to do anything...


    EDIT:

    Looks like it's working in DX9, but not in DX11, so I'm getting close... :/
     
    Last edited: Nov 1, 2015
  11. Captain_Brian

    Captain_Brian Apprentice Engineer

    Messages:
    253
    Still can't get it to work for DX11...
     
  12. Tristavius

    Tristavius Senior Engineer

    Messages:
    1,368
    In DX9, emissive is set in the Alpha channel of the _ME. For those lights you would want a non-re-coloured emissive, so set the area to be something towards white #FFFFFF (or even all the way to white, though it may be a little strong).

    In DX11, emissive is set by the Green channel of the _ADD. At the moment I imagine the RGB of your _ADD is probably all red (#FF0000)? That's certainly the default for 'No AO, No Emissive'. To add the emissive you need to colour the appropriate areas with some green as well. Red + Green = Yellow. In this case though we probably don't want quite 100% green as that will be a very strong emissive, so try something around 255,166,0 (#FFA600) and adjust as needed.
     
    • Like Like x 1
  13. Captain_Brian

    Captain_Brian Apprentice Engineer

    Messages:
    253
  14. Harag

    Harag Junior Engineer

    Messages:
    913
    Isn't it Emissive0 through Emissive3? It shouldn't matter what textures those 4 materials have. The game replaces them anyway.
     
  15. Tristavius

    Tristavius Senior Engineer

    Messages:
    1,368
    Good question; I'd always thought that setting the Material names only overwrote the colour as needed, as far as I'm aware you still need the texture (case in point being the Jump Drive where the circular emissive area actually has a bit of texture to it rather than a flat colour). Could well be right though!
     
  16. Digi

    Digi Senior Engineer

    Messages:
    2,393
    And I think it's Emissive 1 to 4, the oxygen storage model does have Emissive0 but that's used on the control panel.

    For paint.net I have plugins that help, Extract Channel (effects->color) and Alpha Mask (which lets you import an alpha mask from a file or from the clipboard) and I have no issues with DX11, the DX9 ones are kinda annoying with the purpleness...
     
  17. Harag

    Harag Junior Engineer

    Messages:
    913
    Last edited: Nov 4, 2015
Thread Status:
This last post in this thread was made more than 31 days old.