Home Technical Talk

dxt1 compression alternatives?

polycount sponsor
Offline / Send Message
malcolm polycount sponsor
The nvidia dxt compressor looks like junk if you give it a texture which is not really bright, unfortunately I need to give it textures and they come out horribly colour banded. Giving it the same texture which has been pre brightened gives a very nice result. Does anyone know of any dxt compressor alternatives, or am I missing a setting in the dxt1 compression settings?

Replies

  • CheapAlert
    Offline / Send Message
    CheapAlert polycounter lvl 18
    tried dxt3 and dxt5?
  • Eric Chadwick
    DXT sucks at compressing subtle variations.

    According to a PowerVR guy (the originators of the DXT format) "the RGB accuracy of all the DXTn variants is identical. Unfortunately, one series of graphics chips unpacked DXT1 into a 16 bit representation instead of the 24/32 bit it actually required." IIRC the only difference between 1/3/5 is how they handle alpha, DXT1 being the smallest because it has so little alpha to store.

    Different compression libraries may use different methods to figure out what colors to store vs. toss out. You might try ATI's Compressionator. You can set it to show a difference image between compressed and uncompressed, so you can see the effects of various settings.

    I thought this thread from DirectXdev mailing list was insightful.
    http://discussms.hosting.lsoft.com/SCRIP...;D=1&P=2460
    ... basically there's nothing you can do about it.

    Although you could also try adding some dithering before compressing, see if that helps.
  • CheapAlert
    Offline / Send Message
    CheapAlert polycounter lvl 18
    [ QUOTE ]
    According to a PowerVR guy (the originators of the DXT format)

    [/ QUOTE ]

    I hate to nitpick, but s3 did it first. Also, PowerVR's later Kyro cards could only do DXT1.
  • Eric Chadwick
    Oops, thanks.

    Hey any idea why PowerVR's tile-based sort never made it big? Their alpha sorting rocked so hard.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Yeah it's weird, it not subtle changes that are causing the banding it's actually the value of the pixel relative to the 255 range, the brighter the pixel is the better the compression works. Looks nifty for colour maps, chokes on dark lightmaps, bright light maps look nifty as well. For those interested in the format>

    dxt1 = colour map no alpha
    dxt3 = colour map black and white alpha
    dxt5 = colour map gradient alpha

    all compress the same quality but adding the different alphas increase the size of the file. Surprisingly next gen consoles do not seem to support palletized textures like the ps2 did so you are left with banded shite when baking lighting.
  • Eric Chadwick
    Try dithering the source image. Or better yet, convert the lightmap to 16bit, level it to a full bright range, compress, then use a shader instruction to multiply the DXT back down. Learnt that in that goofy "gloss" thread. Gives you more precision.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Eric it's funny you should mention that as we just implemented that tech on Friday. We are actually going to bracket the lighting per environment so we don't waste any bit depth if the lighting does not get bright enough or dark enough.
  • Eric Chadwick
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Problem solved, bracketing the lighting removed the banding.
Sign In or Register to comment.