Home Technical Talk

DDS Compression issue

polycounter lvl 19
Offline / Send Message
kodde polycounter lvl 19
Hey guys.

Another issue for you today.
I'm playing around in MentalMill making CGFX-shaders. Anyway, I'm trying to save a specular map texture from Photoshop with the DDS-plugin. I'm setting it to DXT1 preset and it produces green/purple artifacts even though I only have black/white tones.

There's another issue as well. Which DDS-preset do I use to save a 1 channel compressed specularmap? Using RGB channels to produce a grayscale image seems wasteful.

Thanks!

Replies

  • Eric Chadwick
    DXT1 is particularly bad at saving grayscale, since the green channel is stored in a slightly higher color depth than the other two channels. So you'll get green & purple artifacts here and there.

    If you don't mind the filesize, L8 is a pretty good choice for single-channel grayscale. You could also try packing four grayscale maps together in a single bitmap and use DXT5 format.
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    So I cannot use the same compression as DXT1 och DXT5 but only with one channel? I've tried the L8 as you mentioned, I was mostly just curious if there was a more optimal way.

    Thanks
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Why not just have coloured specular? It looks way better... :)
  • Neox
    Offline / Send Message
    Neox godlike master sticky
    or are you using the alpha of your diffuse for anything specific?
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    I don't actually have any real scenario to use this yet. Setting it up for test purposes when working with MentalMill.

    MoP> I'm asking purely out of curiosity. Not used to working that much with DDS-textures yet.

    Neox> Yeah I see what you are hinting at, finding a spare channeling in a texture map I'm already using. Let's say I'm using the alpha of the diffuse for transparency, and I won't be needing a colored specular. How would you tackle that scenario?

    Thanks
  • Eric Chadwick
    Use the alpha of another map. :)

    You could use RGB for the colored spec, and the alpha for spec power (width).

    Actually, DXT5_nm is a format where you only use the Green and Alpha channels, leaving the other two blank. Something like that might float your boat.
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    Cool.

    Thanks for the info. I will try this later when I'm at work.
Sign In or Register to comment.