I hope that title isn\'t too confusing.

Anyways, for the past couple of years, developers have struggled with texturing their games on the PS2. Up until a few months ago, every developer was using the PS2\'s texturing abilities all wrong. Jak and Daxter and Baldur\'s Gate: Dark Alliance are the first games (that I know of) on the PS2 to actually stream in the textures instead of trying to store them on the small amount of RAM. (I think FFX might also stream some textures, but I haven\'t heard it out of their mouths so I\'m not sure.) We saw the results of a good textured PS2 game, but in reality, even that doesn\'t compare to some of the Xbox\'s, NGC\'s, or even Dreamcast\'s texturing. So all hope is lost, right? That couldn\'t be farther from the truth.
There is one technique of texture compression that the PS2 is actually able to do. It is called CLUT, or Color Look Up Table. What this does is changes a 32 bit, or 24 bit texture into an 8 bit texuture (256 colors); which, in turn, dramatically reduces the size of the file. It has about a 4:1 compression ratio. Bowie from thread #2 below explains how this works pretty well:
Now let\'s look at how a 24-bit texture can be compressed to an 8-bit CLUT. Each texel is compared with other pixels in the image to find similar copies. The object is to find 256 texels that are similar to the other pixels with minimal differences. Now that you have 256 texels, you give these texels an index value. This will be the lookup table. Each entry in the lookup table consists of 24-bit color values. Take the original image and replace each texel with an index value that matches an entry in the lookup table. So if you had a 24-bit 128x128 texture, the texture now is a 128x128 8-bit index map with a 256 entry lookup table.
So what this does is takes a 24 or 32 bit texture, reduces the size by setting aside 256 colors that are closest to the different colors on the original texture, then uses that CLUT to turn the texture into an 8 bit texture.
The ending result is a smaller file with possibly a lot less colors. You may be wondering, "What\'s so good about that? Won\'t the textures look dull?" Well in reality, most textures don\'t need over 256 colors to look good. Bricks, Stone, Grass, Metal, road, marble, wood, clothing, etc, all can be done wonderfully in with just 256 colors. There will be an occasional texture that won\'t be able to use this technique and still look good, but for the most part, CLUTs can really help with the PS2\'s texturing problem.
Here is an example of a 24 bit texture being reduced down to an 8 bit (256 color) texture. This shows you just how much memory can be saved, and how similar the two textures still look. (thanks to Peltopukki for giving a link that had some uncompressed textures on it so I could give this example.)
This first 24 bit grass texture has 29360 colors and is 193kb:
http://www.geocities.com/serratedangel/grassunc.htmlAfter using Paint Shop Pro to decrease the color depth down to 8 bit color using a similar method to CLUTs, the picture got reduced to 252 colors (and 66.3kb) and looks almost the same:
http://www.geocities.com/serratedangel/grasscom.htmlAlso note that these pics are 256x256. The bigger the texture you use, the uglier the compressed texture looks. So it\'s best if the textures are kept at or under 256x256.
This next quote is from thread #1 below. It is from MrWibble -- A PS2 developer. It is a technique that he has thought of but hasn\'t had a chance to test out yet...
Even if you used only 25% of the GS time to decompress textures, thats 150,000,000 / 60 / 4 cycles per frame - and as it can write 8 32bit pixels per cycle (or 32 bytes) thats almost 20M of texture decompressed in under a quarter of a frame. Plus youve only had to upload one quarter of that, or 5M which is well inside the amount you can get over the bus. Given that the PS2 is rarely saturated with geometry and that people are mostly moaning about textures I think trading off that much would be fine. In fact if you massaged the numbers up to 8M upload (should be possible) then you could get 32M of texture per frame using 40% of the GS draw time. You could still churn out 20M polys with the remaining cycles which is probably more than enough for most engines.
Bear in mind also that the 32M textures there are 8bit clut based - thats enough for 512 256x256 textures!
So as you can see, this technique just might save the PS2\'s butt, but we won\'t know for sure for probably at least another year or so. In the mean time, we get to watch the improvements that come from having the new dev kits from Sony and Vector C that should be released to the developers within the next few months.

Thread #1:
http://www.beyond3d.com/messageview.cfm?start=1&catid=5&threadid=1703 //great read. It starts out as a PS2 VF4 vs Arcade VF4 thread. The technical stuff starts on page two.
Thread #2:
http://www.beyond3d.com/messageview.cfm?start=1&catid=5&threadid=199 //ok read, and a little bit older than thread 1. It is full of technical stuff and different types of texture compression, but IMO, it is also really "dry" (boring). Maybe you will find it more interesting than I did.
