ARB_texture_compression rocks!

Well, this post is not a question.

I just figured out how cool texture compression is.

My test program has loaded 11!!! 2048x2048 textures with all mipmap levels and 1 texture 512x512x2 bytes, at 1024x768 resolution with 32 bit frame buffer and 32 depth buffer! - and the program run on a GF1 DDR with 32 MB videoram without any big performance hit! It runs very smooth at ~200 fps (ok I have not much geometry in the scene, but anyway)

Uncompressed, it would be 246 MB!!! of data (GL_RGBA8 format)

With compressed textures, high-resolution textures can be applied to every surface even on consumer cards like my GF1.

And its very easy to use and has only 1 drawback, if you are not precompressing your textures, the loading takes quite long. But its worth it. If you haven’t used it yet, give it a try!

-Lev

Lev - Yeah you are right. It absolutely rocks, especially because it’s so easy to use.
I can see that you have gotten 8x compression on your textures. I found it to compress at different levels depending on the texture… is that correct? But it is allways 4,6 or 8x.

Nvidia got Photoshop plugins to precompress on their website.
Also on Nvidia’s page, you’ll find a really nice doc about texcomp. It also shows you how to use the new functions to get back the compressed texture so that you can save them back to file - for quick future loads.

Very nice indeed.

How do you load a pre-compressed texture? i.e. tell gl thats it’s compressed, without making it do the compression again.

cheers.

Nutty

hm, loading precompressed textures means:

  1. cannot take advantage of the newest texture compression algorithm without recompressing textures.

  2. cannot just open the file and edit it in a graphics editing app.

  3. cannot use gluBuild2DMipmaps, so must precompress and save all mipmap levels.

  4. cannot change the resolution of the texture very easily. With textures that are not precomressed you just can call gluScaleImage and scale down the base texture (mipmap level 0), which allows configuration for slower/less video memory hardware.

  5. The loading is faster.

for me (1+2+3+4) >> (5), so I won’t precompress textures. For other apps, the importance of these factors may vary, so precompressing may be considered.

-Lev

To load a precompressed texture, use glCompressedTexImage2DARB. The <internalformat> argument specifies which texture compression algorithm was used.

Does anyone of you know if the TGA format supports RLE compressed 32bit files?

Photoshop doesn’t seem to support it, only 24bit.

yes it does

-Lev

Know any progs that supports it then?

ImageRobot doesn’t either.

Paint shop pro does, for example.

-Lev

Originally posted by Lev:
[b]hm, loading precompressed textures means:

  1. cannot take advantage of the newest texture compression algorithm without recompressing textures.
  1. cannot just open the file and edit it in a graphics editing app.
  1. cannot use gluBuild2DMipmaps, so must precompress and save all mipmap levels.
  1. cannot change the resolution of the texture very easily. With textures that are not precomressed you just can call gluScaleImage and scale down the base texture (mipmap level 0), which allows configuration for slower/less video memory hardware.
  1. The loading is faster.

for me (1+2+3+4) >> (5), so I won’t precompress textures. For other apps, the importance of these factors may vary, so precompressing may be considered.

-Lev[/b]

hm, while developping, yes, but if you finished your program, the 1 and 2 are not important, and 5 is very nice indeed… on the other side, 3 and 4, i dont really need them, so for shipping out, i will possibly store all pix as compressed ones, other new feature: they wont steal your textures, cause most cant do anythign with them ( ok, you could load it with opengl and uncompress it and do it, but simply copieing out of the folder dont work… )

as yet said, while developping, no, but as last optimization, yes

David,
What are you going to do if machine, where your app works has no ARB_texture_compression or your compressed format is not supported ?
Abort and say “sorry, no ext” ?
Only because of missing misc extension ?

hm… yes grinn

no, but normaly, apps i develop always use extensions wich are not supported for every one ( register_combiners… ), but i did not used the compression at all yet, so i did not thought much bout this…

Originally posted by Michail Bespalov:
David,
What are you going to do if machine, where your app works has no ARB_texture_compression or your compressed format is not supported ?
Abort and say “sorry, no ext” ?
Only because of missing misc extension ?

the GeForce2 cards are the bottom of the line nowadays when you buy a new pc. most people that play games will have this feature.

> the GeForce2 cards are the bottom of the line nowadays when you buy a new pc.

If only that were true!

Two thirds of the machines you see at Best Buy have 800+ MHz CPUs, and use the built-in Intel i815 graphics, which is pretty much an old i740. The higher-end machines come with TNT2. I found one (1) machine (a Sony) that came with a GF2MX.

It’s enough to make you cry.

hm, i dont know, but half the guys i know do have a gf2, mostly an mx… so if i now start with a game ( more or less… ) i will be finished at least next year, and next year ( or second-next, etc… ) the mx is used at much places…

i know, its not nice for guys who will not have it, but somewhen we do have to step further, and at this time we have to give up the old stuff… i mean, bumpmapping on a tnt is not possible, too…, but using the vertexlighting is just not what i want… doing meshes with very much triangles cant be rendered fast enough on tnt eighter… but somewhen we want models with more than 100 - 500 faces…

go one step further…

( develop for the board you have, and there will be others that can run your stuff, too… if you have a gf3, support gf3 stuff, if you have a radeon, support the radeon… if you have a simple ATI Rage or TNT1, support it… its nice to have stuff for everything… )