|
| 1 | +.\" First draft generated by help2man 1.49.3. |
| 2 | +.TH CRUNCH 1 "October 2025" |
| 3 | + |
| 4 | +.SH NAME |
| 5 | +crunch \- Advanced DXTn Texture Compressor |
| 6 | + |
| 7 | +.SH SYNOPSIS |
| 8 | +.BR "" crunch |
| 9 | +[options] |
| 10 | + |
| 11 | +.SH DESCRIPTION |
| 12 | +.B crunch |
| 13 | +is a lossy texture compression command line tool for developers that |
| 14 | +distribute and use content in the DXT1/5/N or 3DC/BC5 compressed mipmapped |
| 15 | +GPU texture formats. |
| 16 | + |
| 17 | +This version has been upgraded with Unity improvements, added features, |
| 18 | +extended system and hardware support. |
| 19 | + |
| 20 | +.SH OPTIONS |
| 21 | +.TP |
| 22 | +\fB\-file\fR filename \- Required input filename, wildcards, multiple \fB\-file\fR params OK. |
| 23 | +.TP |
| 24 | +\fB\-file\fR @list.txt \- List of files to convert. |
| 25 | + |
| 26 | +.IP |
| 27 | +Supported source file formats: dds,ktx,crn,tga,bmp,png,jpg/jpeg,psd |
| 28 | +Note: Some file format variants are unsupported. |
| 29 | +See the docs for stb_image.h: https://github.com/nothings/stb |
| 30 | +Progressive JPEG files are supported, see: http://code.google.com/p/jpeg\-compressor/ |
| 31 | + |
| 32 | +.P |
| 33 | +Path/file related parameters: |
| 34 | +.PP |
| 35 | +\fB\-out\fR filename \- Output filename |
| 36 | +.br |
| 37 | +\fB\-outdir\fR dir \- Output directory |
| 38 | +.br |
| 39 | +\fB\-outsamedir\fR \- Write output file to input directory |
| 40 | +.br |
| 41 | +\fB\-deep\fR \- Recurse subdirectories, default=false |
| 42 | +.br |
| 43 | +\fB\-nooverwrite\fR \- Don't overwrite existing files |
| 44 | +.br |
| 45 | +\fB\-timestamp\fR \- Update only changed files |
| 46 | +.br |
| 47 | +\fB\-forcewrite\fR \- Overwrite read\-only files |
| 48 | +.br |
| 49 | +\fB\-recreate\fR \- Recreate directory structure |
| 50 | +.br |
| 51 | +\fB\-fileformat\fR [dds,ktx,crn,tga,bmp,png] \- Output file format, default=crn or dds |
| 52 | + |
| 53 | +.P |
| 54 | +Modes: |
| 55 | +.PP |
| 56 | +\fB\-compare\fR \- Compare input and output files (no output files are written). |
| 57 | +.br |
| 58 | +\fB\-info\fR \- Only display input file statistics (no output files are written). |
| 59 | + |
| 60 | +.P |
| 61 | +Misc. options: |
| 62 | +.PP |
| 63 | +\fB\-helperThreads\fR # \- Set number of helper threads, 0\-15, default=(# of CPU's)\-1 |
| 64 | +.br |
| 65 | +\fB\-noTitle\fR \- Disable title output at run time |
| 66 | +.br |
| 67 | +\fB\-noprogress\fR \- Disable progress output |
| 68 | +.br |
| 69 | +\fB\-quiet\fR \- Disable all console output |
| 70 | +.br |
| 71 | +\fB\-ignoreerrors\fR \- Continue processing files after errors. |
| 72 | +Note: The default behavior is to immediately exit whenever an error occurs. |
| 73 | +.br |
| 74 | +\fB\-logfile\fR filename \- Append output to log file |
| 75 | +.br |
| 76 | +\fB\-pause\fR \- Wait for keypress on error |
| 77 | +.br |
| 78 | +\fB\-window\fR <left> <top> <right> <bottom> \- Crop window before processing |
| 79 | +.br |
| 80 | +\fB\-clamp\fR <width> <height> \- Crop image if larger than width/height |
| 81 | +.br |
| 82 | +\fB\-clampscale\fR <width> <height> \- Scale image if larger than width/height |
| 83 | +.br |
| 84 | +\fB\-nostats\fR \- Disable all output file statistics (faster) |
| 85 | +.br |
| 86 | +\fB\-imagestats\fR \- Print various image quality statistics |
| 87 | +.br |
| 88 | +\fB\-mipstats\fR \- Print statistics for each mipmap, not just the top mip |
| 89 | +.br |
| 90 | +\fB\-lzmastats\fR \- Print size of output file compressed with LZMA codec |
| 91 | +.br |
| 92 | +\fB\-split\fR \- Write faces/mip levels to multiple separate output PNG files |
| 93 | +.br |
| 94 | +\fB\-yflip\fR \- Always flip texture on Y axis before processing |
| 95 | +.br |
| 96 | +\fB\-unflip\fR \- Unflip texture if read from source file as flipped |
| 97 | + |
| 98 | +.P |
| 99 | +Image rescaling (mutually exclusive options) |
| 100 | +.PP |
| 101 | +\fB\-rescale\fR <int> <int> \- Rescale image to specified resolution |
| 102 | +.br |
| 103 | +\fB\-relscale\fR <float> <float> \- Rescale image to specified relative resolution |
| 104 | +.br |
| 105 | +\fB\-rescalemode\fR <nearest | hi | lo> \- Auto\-rescale non\-power of two images. |
| 106 | +.IP |
| 107 | +nearest \- Use nearest power of 2 |
| 108 | +.br |
| 109 | +hi \- Use next |
| 110 | +.br |
| 111 | +lo \- Use previous |
| 112 | + |
| 113 | +.P |
| 114 | +DDS/CRN compression quality control: |
| 115 | +.PP |
| 116 | +\fB\-quality\fR # (or \fI\,/q\/\fP #) \- Set Clustered DDS/CRN quality factor [0\-255] 255=best |
| 117 | +DDS default quality is best possible. CRN default quality is 128. |
| 118 | +.br |
| 119 | +\fB\-bitrate\fR # \- Set the desired output bitrate of DDS or CRN output files. |
| 120 | +.IP |
| 121 | +This option causes crunch to find the quality factor |
| 122 | +closest to the desired bitrate using a binary search. |
| 123 | + |
| 124 | +.P |
| 125 | +Low\-level CRN specific options: |
| 126 | +.PP |
| 127 | +\fB\-c\fR # \- Color endpoint palette size, 32\-8192, default=3072 |
| 128 | +.br |
| 129 | +\fB\-s\fR # \- Color selector palette size, 32\-8192, default=3072 |
| 130 | +.br |
| 131 | +\fB\-ca\fR # \- Alpha endpoint palette size, 32\-8192, default=3072 |
| 132 | +.br |
| 133 | +\fB\-sa\fR # \- Alpha selector palette size, 32\-8192, default=3072 |
| 134 | + |
| 135 | +.P |
| 136 | +Mipmap filtering options: |
| 137 | +.PP |
| 138 | +\fB\-mipMode\fR [UseSourceOrGenerate,UseSource,Generate,None] |
| 139 | +.IP |
| 140 | +Default mipMode is UseSourceOrGenerate |
| 141 | +.br |
| 142 | +UseSourceOrGenerate: Use source mipmaps if possible, or create new mipmaps. |
| 143 | +.br |
| 144 | +UseSource: Always use source mipmaps, if any (never generate new mipmaps) |
| 145 | +.br |
| 146 | +Generate: Always generate a new mipmap chain (ignore source mipmaps) |
| 147 | +.br |
| 148 | +None: Do not output any mipmaps |
| 149 | + |
| 150 | +.PP |
| 151 | +\fB\-mipFilter\fR [box,tent,lanczos4,mitchell,kaiser], default=kaiser |
| 152 | +.br |
| 153 | +\fB\-gamma\fR # \- Mipmap gamma correction value, default=2.2, use 1.0 for linear |
| 154 | +.br |
| 155 | +\fB\-blurriness\fR # \- Scale filter kernel, >1=blur, <1=sharpen, .01\-8, default=.9 |
| 156 | +.br |
| 157 | +\fB\-wrap\fR \- Assume texture is tiled when filtering, default=clamping |
| 158 | +.br |
| 159 | +\fB\-renormalize\fR \- Renormalize filtered normal map texels, default=disabled |
| 160 | +.br |
| 161 | +\fB\-rtopmip\fR \- Renormalize on the top mip\-level too, default=disabled |
| 162 | +.br |
| 163 | +\fB\-maxmips\fR # \- Limit number of generated texture mipmap levels, 1\-16, default=16 |
| 164 | +.br |
| 165 | +\fB\-minmipsize\fR # \- Smallest allowable mipmap resolution, default=1 |
| 166 | + |
| 167 | +.P |
| 168 | +Compression options: |
| 169 | +.PP |
| 170 | +\fB\-alphaThreshold\fR # \- Set DXT1A alpha threshold, 0\-255, default=128 |
| 171 | +.IP |
| 172 | +Note: \fB\-alphaThreshold\fR also changes the compressor's behavior to |
| 173 | +prefer DXT1A over DXT5 for images with alpha channels (.DDS only). |
| 174 | +.PP |
| 175 | +\fB\-uniformMetrics\fR \- Use uniform color metrics, default=use perceptual metrics |
| 176 | +.br |
| 177 | +\fB\-noAdaptiveBlocks\fR \- Disable adaptive block sizes (i.e. disable macroblocks). |
| 178 | +.br |
| 179 | +\fB\-noNormalDetection\fR \- Disable normal map detection, default=disabled |
| 180 | +.br |
| 181 | +\fB\-compressor\fR [CRN,CRNF,RYG,ATI] \- Set DXTn compressor, default=CRN |
| 182 | +.br |
| 183 | +\fB\-dxtQuality\fR [superfast,fast,normal,better,uber] \- Endpoint optimizer speed. |
| 184 | +.IP |
| 185 | +Sets endpoint optimizer's max iteration depth. Default=uber. |
| 186 | +.PP |
| 187 | +\fB\-noendpointcaching\fR \- Don't try reusing previous DXT endpoint solutions. |
| 188 | +.br |
| 189 | +\fB\-grayscalesampling\fR \- Assume shader will convert fetched results to luma (Y). |
| 190 | +.br |
| 191 | +\fB\-forceprimaryencoding\fR \- Only use DXT1 color4 and DXT5 alpha8 block encodings. |
| 192 | +.br |
| 193 | +\fB\-usetransparentindicesforblack\fR \- Try DXT1 transparent indices for dark pixels. |
| 194 | + |
| 195 | +.P |
| 196 | +Output pixel format options: |
| 197 | +.IP |
| 198 | +\fB\-usesourceformat\fR \- Use input file's format for output format (when possible). |
| 199 | + |
| 200 | +.IP |
| 201 | +All supported texture formats (Note: .CRN only supports DXTn pixel formats): |
| 202 | +.IP |
| 203 | +\fB\-DXT1\fR |
| 204 | +.br |
| 205 | +\fB\-DXT2\fR |
| 206 | +.br |
| 207 | +\fB\-DXT3\fR |
| 208 | +.br |
| 209 | +\fB\-DXT4\fR |
| 210 | +.br |
| 211 | +\fB\-DXT5\fR |
| 212 | +.br |
| 213 | +\fB\-3DC\fR |
| 214 | +.br |
| 215 | +\fB\-DXN\fR |
| 216 | +.br |
| 217 | +\fB\-DXT5A\fR |
| 218 | +.br |
| 219 | +\fB\-DXT5_CCxY\fR |
| 220 | +.br |
| 221 | +\fB\-DXT5_xGxR\fR |
| 222 | +.br |
| 223 | +\fB\-DXT5_xGBR\fR |
| 224 | +.br |
| 225 | +\fB\-DXT5_AGBR\fR |
| 226 | +.br |
| 227 | +\fB\-DXT1A\fR |
| 228 | +.br |
| 229 | +\fB\-ETC1\fR |
| 230 | +.br |
| 231 | +\fB\-ETC2\fR |
| 232 | +.br |
| 233 | +\fB\-ETC2A\fR |
| 234 | +.br |
| 235 | +\fB\-ETC1S\fR |
| 236 | +.br |
| 237 | +\fB\-ETC2AS\fR |
| 238 | +.br |
| 239 | +\fB\-R8G8B8\fR |
| 240 | +.br |
| 241 | +\fB\-L8\fR |
| 242 | +.br |
| 243 | +\fB\-A8\fR |
| 244 | +.br |
| 245 | +\fB\-A8L8\fR |
| 246 | +.br |
| 247 | +\fB\-A8R8G8B8\fR |
| 248 | + |
| 249 | +.SH AUTHOR |
| 250 | +Crunch is brought to you by: |
| 251 | +.PP |
| 252 | +\- 2014\-2024 Daemon Developers and contributors |
| 253 | +.IP |
| 254 | +https://github.com/DaemonEngine/crunch |
| 255 | +.PP |
| 256 | +\- 2017\-2018 Alexander Suvorov and Unity Software Inc. |
| 257 | +.IP |
| 258 | +https://github.com/Unity\-Technologies/crunch/tree/unity |
| 259 | +.PP |
| 260 | +\- 2010\-2017 Richard Geldreich, Jr. and Binomial LLC and contributors |
| 261 | +.IP |
| 262 | +https://github.com/BinomialLLC/crunch |
| 263 | + |
| 264 | +.SH REPORTING BUGS |
| 265 | +Please report bugs here: https://github.com/DaemonEngine/crunch/issues |
0 commit comments