- R/D optimized DXTc compression: DXTc is generally very lossy, but other DXTc compressors just optimize for maximum achievable quality. crunch allows the developer to purposely trade off quality for relatively large gains in the compressibility of the resulting DXTc data. This mode is cool because the client application doesn't need to be changed at all to benefit (as long as it losslessly compresses the DXTc bits somehow).
- Transcodable file format: crunch can output mipmapped texture data to a custom format (with the .CRN extension) designed to be quickly transcodable directly to DXTc with no intermediate recompression step. The entire transcoder is contained in a single, large C++ header file. From a quality per bit perspective, .CRN performs more or less the same as R/D optimized DXTc followed by LZMA (sometimes a little better, sometimes worse). Speedwise, the transcode step is very fast (much faster than LZMA for example).
History of Crunch
Crunch vs. US Patent #20110115806
Hi Doug, Thanks, but after considering all this stuff, I honestly think that it's best if I don't get involved in any commercialization activities. I was really interested in this before I started at Valve (and I attempted to use Blue Shift, Inc. as a distributor with console/PC devs in 2009 with little success). But I've now got a job that demands so much of my time and energy that it doesn't make much sense for me to put any more effort into this library. (And if you look closely at the dates, I've barely been able to release any updates to it since the initial release.) I would rather keep pushing the state of the art forward in my spare time, and I'm cool with just having my name associated with these efforts. Basically - I've already got a demanding day job, and I would rather not turn something that is a fun hobby (with possibly indirect career benefits) into another job.
I don't want to slow down you or others with attempting to commercialize this stuff, and I don't want companies or individuals to not be able to benefit from it. I think crunch has demonstrated what is possible, to enough of the right people, that there's a small but growing market out there for the right solutions. crunch's license is ZLIB, which is already very permissive, and I'm open to changing the license to something else (MIT/BSD, even unlicense.org) if that helps move things forward. I already have a bunch of my open source compression code (miniz, LZHAM, jpeg-compressor) used by several companies (like Epic Megagames, Valve, and Crytek), so this doesn't seem fundamentally any different to me. All that I ask is for some credits somewhere, but even that isn't required. If you go to Siggraph, I can explain how the library is put together, and most parts are pretty easy to modify.
What the WebGL guys really need is:
- Total transcoder code size must be very small (because it needs to be transmitted with the webpage each time it's loaded)
- A format that is very compressible using specifically gzip (because gzip is supported by the browsers)
- Ideally, something that is roughly competitive against JPEG+real-time DXTc, or only 10-20% worse file size for the same PSNR.
- PVRTC support (DXTc+PVRTC will cover all the mobile platforms that matter)
.CRN isn't really the best fit (it was originally designed for PS3/X360 console games, not WebGL). There's a Google dev who has been trying to modify crnlib so it supports "raw" files, but I don't think he's made much progress. And crunch's RD optimized DXTc mode+gzip is ~30% larger than .CRN for the same PSNR, so it's not a compelling enough solution. (You really need LZMA or LZHAM for this option to be competitive, which isn't available in the browser, and cross compiling these libraries is not practical or compelling) If you want, I can introduce you by email or in person to the devs at Google who have been working on this stuff.
Last I heard, the SOE guys are using crunch's RD optimized DXTc mode for Planetside 2, because the ratio gain from .CRN doesn't justify the extra complexity (and potential patent risk) of transcoding. However, now that they are aware of what's actually possible, if there was a commercial solution available I would bet they would go for it. Let me know if you would like to talk to these guys.
Brandon Jones: Crunch/DXT/Rage demo
Wednesday, August 8, 4:00 PM – 5:00 PM, JW Marriott Los Angeles at LA Live, Gold Ballroom Salon 3
Also, I'll be at the later OpenGL BoF event at Siggraph to give a short presentation on Left 4 Dead 2 Linux: