Home Technical Talk

how do you make dds

polycounter lvl 12
Offline / Send Message
JostVice polycounter lvl 12
right, i've run into a problem where I don't know how to use the nvidia plugin for photoshop. I don't know why, but it generates a texture with incorrect color... I can still generate normal maps from a diffuse (so that you generate each mipmap's normal map) but I can't make normal dds, for diffuse or color, they are always wrong. I guess I changed some setting but I've tried playing with the settings with no success :(

another problem I have is, how are you mean to export the alpha channel? it keeps telling me that there are too many channels to export, doesn't even let me select the dds format

or do you know of any other way to make dds files? I got told GIMP does it correctly

Replies

  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 19
    "Too many channels" issue has to do with you having multiple layers if I'm not mistaking. Flatten your image first. I haven't found a workaround for this. T_T
  • dejawolf
    Options
    Offline / Send Message
    dejawolf polycounter lvl 18
    no, it has to do with you having too many channels. by default, if you remove the background layer, your image has an alpha map now, even if it doesn't have an alpha map in the channels tab. adding an alpha map in the channels tab as well, causes there to be 2 alpha map, and therefore you have too many channels.
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 19
    Ah cool. Didn't know. Thanks.
  • JostVice
    Options
    Offline / Send Message
    JostVice polycounter lvl 12
    heh, thanks dejawolf, works great now, but what if you want to have a background, for example, if you want to avoid a black border around your alpha, that is not possible?
  • JostVice
    Options
    Offline / Send Message
    JostVice polycounter lvl 12
    Right, I see now, thanks dejawolf! But there isn't any way on having the background you want and specifying manually the alpha channel? you would need backgrounds with color if you want to avoid bleeding over the alpha's edge, no?
  • Jeremy Lindstrom
    Options
    Offline / Send Message
    Jeremy Lindstrom polycounter lvl 18
    if you have a green leaf on a green background with a black and white alpha I don't see the issue. You can do this. the black and white 'alpha' dictates what gets drawn not the color of your image.
  • Eric Chadwick
    Options
    Offline / Send Message
    Might be because you're using DXT1? Its alpha isn't really an alpha... the black pixels of the alpha channel get burned into the color part of your texture, to save on file size. Which then can make a black halo if it's filtered incorrectly.
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    Its an error that happens before the export ever happens. the plugin fails to launch if it finds 5 or more channels.
    And as deja mentioned it has to do with having a document with just layers, and no layer at the bottom of the stack called background and locked (like is a default photoshop doc)

    However in that case if you apply a layer mask to layer zero that gets exported as your alpha channel, however you may not get exactly what you paint there. Best to just flatten the image, and export then undo two steps, or make a new PSD with a background layer, the group and copy all your other layers over.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Select your bottom layer
    in photoshop file menu>layer>new>layer from background
    You need a background layer your you get that error as mentioned above.
  • dejawolf
    Options
    Offline / Send Message
    dejawolf polycounter lvl 18
    JostVice wrote: »
    Right, I see now, thanks dejawolf! But there isn't any way on having the background you want and specifying manually the alpha channel? you would need backgrounds with color if you want to avoid bleeding over the alpha's edge, no?

    i think photoshop should have an option when you create a new document to have a background layer. As long as you have a background layer, you can add an extra alpha channel in the channels tab. then you can have the background colour you want.
  • JostVice
    Options
    Offline / Send Message
    JostVice polycounter lvl 12
    right, thanks guys. I have another bug, DXT5 is giving me these weird artifacts and i'm not sure what has gone wrong here:

    6f1cafdc8558768d4273083d1361d.png

    I tried saving a clear gradient from black to transparent and that exported without problems, so the problem seems to happen when you have colour and other things going on. Anyone has any clues?
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 19
    I'm guessing these are from Nvidias Photoshop plugin?
    There are other options you could try if the Nvidia Photoshop plugin is borked. I think ATI's Compressonator is quite nice. Unfortunately not contained within Photoshop, but nice none the less.
  • chronic
    Options
    Offline / Send Message
    chronic polycounter lvl 10
    i like nvidia's texture tools 2
    http://developer.nvidia.com/object/texture_tools.html

    its a command line app - runs on the gpu through CUDA - only downside is it only runs on certain supported hardware.

    you can integrate alot of cool command line apps like this into photoshop using some quick javascript and easily accessable through the File>Scripts menu.
  • chronic
    Options
    Offline / Send Message
    chronic polycounter lvl 10
    Here are two example scripts:
    wont work if you don't have nvcompress.exe's file-path in your PATH ENV Variable
    put the files here \Adobe Photoshop CS*\Presets\Scripts
    run from File>Scripts

    for color: SaveDDS_c.js
    for normals: SaveDDS_n.js

    How it works:

    it saves a temporary copy of the current document as a .tga
    it opens that temporary .tga and executes a .bat script on it containing the nvcompress commands.
    it will spit out the .dds into the same folder the original file is in.
    cleans up the temp files.

    you can edit the command line options inside the script pretty easy
    currently its set to DXT5 with mipmaps

    see the command line options here:
    http://code.google.com/p/nvidia-texture-tools/wiki/CommandLineTools

    If anyone wants to take this script and expand/improve feel free to run with it.
  • Eric Chadwick
    Options
    Offline / Send Message
    Thanks for sharing Leo!

    btw, added your lcNextGenShader to the wiki, hope that's cool with you.
Sign In or Register to comment.