Tools/Crunch

From Unvanquished
Jump to: navigation, search

Crunch is a texture compressor.

The tool was initially written by BinomialLLC then improved by Unity, the Crunch version we use is based on the Unity version.

Neither BinomialLLC neither Unity have merged our fixes and does not seem to have high interest in merging fixes provided by others, we take care of cross-platform compatibility and the ability to build the tool with CMake.

Sources

The Crunch source repository is: github.com/DaemonEngine/crunch.

Features

Crunch can produce compressed images optimized for games.

Crunch does two level of compression :

First Crunch compresses the image in a DXT format, this DXT-compressed format can be feed directly to the GPU without decompression, and the GPU can process DXT-compressed images without decompression.

Then Crunch recompresses the DXT compressed stream with a more advanced compression algorithm for better storage file saving (this part still have to be decompressed in engine).

Crunch does some magic at producing DXT-compressed images that compress well on second step.

How to use Crunch

🚧️ TODO: explain -noNormalDetection and -rtopmip options