Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Kresimir Kis, posted on February 18, 2002




Image Description, by Kresimir Kis



If some of you are yet to implement texture compression in your OpenGL engines, here is something that may help you decide whether it is worth the effort. This project was created for evaluation of different texture compression methods exposed through OpenGL ARB & S3TC extensions. Besides displaying 5 different compression modes it also allows blending operations for alpha channel degradation comparison.

The app was tested on two systems:
  • C333, Win95, RivaTNT,
  • D850, WinMe, GeForce2MX.
  • RivaTNT does not support any compression extensions, therefore you'll get unsupported viewports everywhere but RAW. GeForce class card should be able to operate with both extensions.

    Feedback from Radeon and other WinOS users is appreciated.

    To keep the download small, I do not provide any textures besides those needed by the app itself. The ZIP file comes with the VC++6.0 project ready to compile, but be aware, the code is entirely procedural-based and quite a mess.

    Further information and download:
    http://free-zg.hinet.hr/KishBros/


    [prev]
    Image of the Day Gallery
    www.flipcode.com

    [next]

     
    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
     
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
     
    Nai Tandu

    February 18, 2002, 02:31 PM

    nice work!

    looks rahter psychedelic!

     
    337

    February 18, 2002, 03:35 PM

    you know what he is trying to do right? it has nothing to do with pretty colors. anyhow, that is a nice demo, I guess the only use for most texture compression is if everything is moving so fast you cannot see it. well, it saves me some work.

     
    The Digital Bean

    February 18, 2002, 03:36 PM

    Nice work Kresimir. Its truly amazing how bad some texture compression algorithms are...

     
    Octopussy

    February 18, 2002, 03:41 PM

    Nice work ! This IOTD is really interesting.. a cool bench I will not have to do and a good tutorial on texture compression . Thank you :-)

    I was not knowing about ARB24 & ARB32 compression but the first seems to be really messy !..

    I'm going to download your source right now.

    Alexis.

     
    Roch Denis

    February 18, 2002, 03:47 PM

    Well I dont have anywhere to post screenshots but on my Radeon 7500, all compressions work flawlessly, I cant even tell they're compressed at all. Only ARB_32 has a bug in it, it displays only half the texture.

    Well all in all it seems that texture compression either a) Got better on later generation b) Is very good on ATI cards.

     
    Politik

    February 18, 2002, 03:55 PM

    yeah, either that or it isnt really compressing.

     
    Roch Denis

    February 18, 2002, 04:07 PM

    Good point, might be a bug in his program.

     
    bgl

    February 18, 2002, 05:42 PM

    Exactly how these compressors work is documented on MSDN. That should tell you a lot about which format is good for what, and what artifacts to expect.

    DXT1 with no alpha has as good color resolution as any of the other compressed formats.

    DXT1 with alpha only supports cut-out, and suffers more color degradation than the others.

    DXT5 has the color resolution of DXT1 with no alpha, and also gets a separate alpha channel, but spends twice the amount of bits to do it.

    DXT3 is something in-between.

    You should know that:

    1) The reason to use texture compression is either because you're texture fetch bound, and thus reduce the required memory traffic, or because you're texture footprint bound, and want to run on a card with less memory than what you're using.

    2) The run-time compression done by the driver is not as high quality as you can achieve if you use a separate compression plug-in to compress the textures offline.

    3) These compression formats are linear in intensity, with rather severe quantization of color changes. Thus, a smooth texture with mostly the same colors (like the above) is going to look much better than a texture with various diagonal lines of different colors.

     
    Thowllly

    February 18, 2002, 05:47 PM

    What you are viewing is the alpha test screen. The blue color is the texture, the cyan color is the background. arb24 is uncompressed, but it looks 'messy' because it doesn't have an alpha channel. Arb32 is also uncompressed. DXT1 looks strange because it only supports 1 bit alpha.

     
    Thowllly

    February 18, 2002, 05:49 PM

    hmm, didn't see bgl's post when I posted...

     
    Olio

    February 18, 2002, 06:35 PM

    I get unsupported viewports everywhere with my GeForce 256 Pro. :-(

     
    Diane Youdale

    February 18, 2002, 11:51 PM

    Radeon AIW only dislays the bottom half of ARB32, all the others are pretty good.

     
    Luke Philpot

    February 19, 2002, 02:40 AM

    Sweet! My new 3d engine (GrafittiEngine) needs compression... what a better time to come!

     
    Daxx909

    February 19, 2002, 08:09 AM

    >you know what he is trying to do right? it has nothing to do with pretty colors.

    LOL, ROFLOL! :-)

     
    Kreshimir Kish

    February 19, 2002, 09:09 AM

    Could you please check the supported extensions dialog - F1 key.
    Search for the 'ARB_texture_compression' and 'EXT_texture_compression_s3tc'. If they are not in the list, then it might be a driver problem. Try downloading a newer driver.

    If they ARE in the list... Then I am doing something wrong here.

     
    Kreshimir Kish

    February 19, 2002, 09:17 AM

    Are there any error messages during texture loading, or does everything proceed smoothly?

    What is the size of the textures in compressed viewports?
    This is the best way to determine if they are trully compressed.
    ARB24 and DXT1 should be 6 times smaller than RAW.
    ARB32, DXT3 and DXT5 should be 4 times smaller than RAW.

    If there are no error messages during loading, then this is very strange. It means that all the compression methods are executed successfully but for some reason the driver returns the original uncompressed texture as the compressed one.

     
    Bob Nemeth

    February 19, 2002, 10:21 AM

    I'm getting the same sort of results... all 6 textures look very good and load without error. Eventhough I can definitely see a difference in the compressed images, it certainly is NOT anywhere near as bad as your screenshot. Actually, I would say that the compression/image quality ratio is quite good.

    Video card is a GeForce 256.

    Just my $0.02

     
    This thread contains 17 messages.
     
     
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.