What is Crunch Compression?

Modern game engines provide a raft of texture optimization options to keep your budget under control and your frame rate high. In recent years (well, maybe in the last five or so) more and more platforms have been adding Crunch Compression to this list.

Crunch is a public-domain compression library found in many commercial game engines. As an additional layer of lossy compression over the top of common formats like DXT and ETC, Crunch reduces texture size to facilitate smaller builds and faster loading at the cost of diminished image fidelity.

Crunch compression is a very useful way to reduce the disk size of your textures, but it’s not always going to be a magic bullet that will instantly make your game run faster.

It’s my hope that by learning a little more about how it works under the hood will give you some insight into how it might serve you and your projects, and how you can strike that vital balance between performance and fidelity.

Uncompressed
128KB (100%)

Crunched
16.2KB (12.7%)

At the bottom of this article we’ll directly compare some sample textures in Unity 2021.3.0f1 to see exactly how Crunch compression impacts both the size and the quality of an image.

Before we get to those examples though, let’s have a closer look at how it works.

What is Crunch Compression?

First released in 2011, Crunch is an open source library that will add an additional layer of lossy compression over textures that have already gone through the Block Compression (DXT or ETC) process. This makes it perfect for game development as these compression formats are already ubiquitous and well understood.

Like these other forms of texture compression, Crunch is specifically designed for fast, random-access decoding which makes it much faster to read as your GPU can go straight to the pixel it needs without having to run through the entire file first.

The intent with Crunch is to reduce the amount of disk space your textures consume, and as texture data is usually the main culprit when it comes to large builds (although audio files can give textures a run for their money) this can make your packaged game a lot smaller. This is particularly useful to mobile developers who have strict size limits on their builds.

Example
Keep in mind

Although Crunched textures are faster to decode and can drastically reduce load times, it’s important to remember that Crunch has no impact on the size of your textures in memory. If you’re having problems runtime memory issues this technique will not help you resolve them. It couldn’t hurt, though!

Crunch is highly configurable with a user-defined bit-rate, which lets you draw that line between performance and image quality on a per-image basis.

Controlling the strength of the Crunch Compression in Unity’s texture import settings.

When should I use Crunch compression?

As is common with game development queries of this nature, this really depends on your project and its goals. It’s almost certain that utilizing Crunch Compression will make your game load faster and take up less space on disk, but whether or not that’s worth the reduced fidelity of your textures is a question only you can answer.

To help you make your decision, here are some of the main advantages and drawbacks of Crunch compression:

Pros

  • Crunched textures consume less disk space, making your packaged builds smaller.
  • The reduced size on disk makes textures faster to load into memory.
  • The user-defined bit-rate Crunch Compression affords lets artists draw the line between performance and fidelity.

Cons

  • As a lossy compression format, Crunch will reduce the fidelity of your textures, sometimes significantly.
  • Crunch only supports textures already compressed using Block Compression (DXT or ETC).
  • Compressing textures with Crunch can take a long time, sometimes several hours for projects with large numbers of them.

How to enable Crunch compression in your project

Crunch compression has been implemented into many of the major commercially available game engines, and has been unofficially implemented into many more.

EngineCrunch compression support
UnityYes (in its current iteration as of version 2017.0.1)
Unreal Engine 4Yes (as of version 4.21)
Unreal Engine 5Yes
GodotNo (…not yet?)
CryEngine VI have no idea (let me know!)
GameMaker: StudioNo

Each engine has its own way of enabling and configuring texture compression, and as usual they all have quirks you’ll need to discover and learn for yourself.

Unity

Enabling Crunch compression in Unity is as easy as selecting a Crunched compression format from the dropdown list, and using the slider to control the quality. Pressing the Apply button will recompress your image with the selected settings.

Unreal Engine

In Unreal Engine 4 and 5 you can adjust compression in the Texture Editor via the Lossy Compression Amount dropdown. If you want to use Crunch Compression with Virtual Textures, you’ll need to enable it in your project settings (just search for Crunch).

Example
Update!

As I was writing this article Unreal Engine 5 finally came out of Early Access, and I’ve discovered it now uses Oodle texture as its default lossy texture compression solution. I believe this includes libraries similar to Crunch compression (if not Crunch itself) but I’ve not had the opportunity to pick it apart just yet.

Comparison Examples

The following examples were compressed using the Crunch Compression implementation in Unity 2021.3.0f1.

Keep in mind that any images you see here also have another unavoidable layer of JPG compression, so the results you see in the engine will look similar but not 1:1.

RGB8 (Uncompressed)
64.0KB (100%)

RGB Compressed DXT1
10.7KB (16.7%)

RGB Crunched DXT1
4.8KB (7.5%)

RGB8 (Uncompressed)
64.0KB (100%)

RGB Compressed DXT1
10.7KB (16.7%)

RGB Crunched DXT1
4.8KB (7.5%)

RGB8 (Uncompressed)
64.0KB (100%)

RGB Compressed DXT1
10.7KB (16.7%)

RGB Crunched DXT1
3.4KB (5.3%)

Click any of the images for a higher resolution version.

Further reading

If you’re interested in learning more about Crunch Compression I highly recommend going right to the source and checking out the project’s GitHub repository. The studio that maintains the library, Binominal, has documented their work extensively and you’ll find a lot more technical information that was beyond the scope of this article.

If that’s not enough you can also glean more from the project’s Google Code archive, although this information hasn’t been updated in a long time!

I also recommend checking out this forum thread, which contains a great discussion about the advantages and drawbacks that Crunch compression affords. Shoutout to Ben Golus who always comes to the rescue in these kinds of threads.

Thanks a lot for reading, I hope this rundown of Crunch compression has helped guide your optimisation efforts. Please reach out if you’ve got any follow up questions, or if you’ve noticed I got anything blatantly wrong. It happens!

Best of luck with your projects!

I am a technical artist from Adelaide, Australia. I created techarthub to share my knowledge and love for this industry. I hope you feel it too!

Related Posts

Keeping your Blueprints organized doesn't have to be a pain. Here are 10 tips I've found for maintaining your graphs.
Unreal Engine provides a wide range of texture compression settings which can reduce texture size with minimum impact on visual fidelity.
Scroll to Top