MIPGEN(1)
π mipgen β user commands, section 1 π
okay bestie, sit down, hydrate, this is the manual page for mipgen π«Ά it lives in the User Commands corner of your man pages, it's mipgen, and it's here to make mipmaps for you. no cap. π
β¨ NAME β¨
mipgenβ filament material tools πΈ
β¨ DESCRIPTION β¨
so mipgen generates mipmaps for an image, and it goes all the way down to the 1x1 level. yes. one whole pixel. iconic behaviour honestly. π₯
the <output_pattern> argument is a printf-style pattern. for example, "mip%2d.png" generates mip01.png, mip02.png, etc. and listen β miplevel 0 is not generated, because that's just the original image, bestie, we already have it π
if the output format is a container format like KTX, then <output_pattern> is simply a filename. that's it. no pattern shenanigans.
Usage:
mipgen [options] <input_file> <output_pattern>
β¨ OPTIONS β¨
okay here's the menu, everything on it, no skips π
--help,-hβ print this message--license,-Lβ print copyright and license information--linear,-lβ assume that image pixels are already linearized--page,-pβ generate HTML page for review purposes (mipmap.html)--quiet,-qβ suppress console output from themipgentool--grayscale,-gβ create a single-channel image and do not perform gamma correction--format=[exr|hdr|rgbm|psd|png|dds|ktx],-f [exr|hdr|rgbm|psd|png|dds|ktx]β specify output file format, inferred from output pattern if omitted--kernel=[box|nearest|hermite|gaussian|normals|mitchell|lanczos|min],-k [filter]β specify filter kernel type (defaults tolanczos) β and heads up, thenormalsfilter may automatically change the compression scheme π³--add-alphaβ if the source image has 3 channels, this adds a fourth channel filled with1.0--strip-alphaβ ignore the alpha component of the input image--mip-levels=N,-m Nβ specifies the number of mip levels to generate; if0(default), all levels are generated--compression=COMPRESSION,-c COMPRESSIONβ format specific compression:
KTX:
astc_[fast|thorough]_[ldr|hdr]_WxH, where WxH is a valid block
size s3tc_rgb_dxt1, s3tc_rgba_dxt5 etc_FORMAT_METRIC_EFFORT
FORMAT is r11, signed_r11, rg11, signed_rg11, rgb8, srgb8, rgb8_alpha
srgb8_alpha, rgba8, or srgb8_alpha8
METRIC is rgba, rgbx, rec709, numeric, or normalxyz EFFORT is an
integer between 0 and 100
PNG: Ignored Radiance: Ignored Photoshop: 16 (default), 32
OpenEXR: RAW, RLE, ZIPS, ZIP, PIZ (default) DDS: 8, 16 (default),
32
β¨ OPTIONS, round two (the page really does print them twice, and we respect the bit) β¨
--help,-hβ print this message--license,-Lβ print copyright and license information--linear,-lβ assume that image pixels are already linearized--page,-pβ generate HTML page for review purposes (mipmap.html)--quiet,-qβ suppress console output from themipgentool--grayscale,-gβ create a single-channel image and do not perform gamma correction--format=[exr|hdr|rgbm|psd|png|dds|ktx],-f [exr|hdr|rgbm|psd|png|dds|ktx]β specify output file format, inferred from output pattern if omitted--kernel=[box|nearest|hermite|gaussian|normals|mitchell|lanczos|min],-k [filter]β specify filter kernel type (defaults tolanczos) β thenormalsfilter may automatically change the compression scheme--add-alphaβ if the source image has 3 channels, this adds a fourth channel filled with1.0--strip-alphaβ ignore the alpha component of the input image--mip-levels=N,-m Nβ specifies the number of mip levels to generate; if0(default), all levels are generated--compression=COMPRESSION,-c COMPRESSIONβ format specific compression:
KTX:
astc_[fast|thorough]_[ldr|hdr]_WxH, where WxH is a valid block
size s3tc_rgb_dxt1, s3tc_rgba_dxt5 etc_FORMAT_METRIC_EFFORT
FORMAT is r11, signed_r11, rg11, signed_rg11, rgb8, srgb8, rgb8_alpha
srgb8_alpha, rgba8, or srgb8_alpha8
METRIC is rgba, rgbx, rec709, numeric, or normalxyz EFFORT is an
integer between 0 and 100
PNG: Ignored Radiance: Ignored Photoshop: 16 (default), 32
OpenEXR: RAW, RLE, ZIPS, ZIP, PIZ (default) DDS: 8, 16 (default),
32
β¨ EXAMPLES β¨
here's the receipts, copy-paste energy π
mipgen -g --kernel=hermite grassland.png mip_%03d.png
mipgen -f ktx --compression=astc_fast_ldr_4x4 grassland.png mips.ktx
mipgen -f ktx --compression=etc_rgb_rgba_40 grassland.png mips.ktx
and since the page says it again, we say it again, because consistency β¨
so mipgen generates mipmaps for an image down to the 1x1 level.
the <output_pattern> argument is a printf-style pattern. for example, "mip%2d.png" generates mip01.png, mip02.png, etc. miplevel 0 is not generated since it is the original image.
if the output format is a container format like KTX, then <output_pattern> is simply a filename.
Usage:
mipgen [options] <input_file> <output_pattern>
mipgen -g --kernel=hermite grassland.png mip_%03d.png
mipgen -f ktx --compression=astc_fast_ldr_4x4 grassland.png mips.ktx
mipgen -f ktx --compression=etc_rgb_rgba_40 grassland.png mips.ktx
bestie reminder π«Ά everything above is exactly what the page says β options, defaults, formats, all of it. don't come for me if you skip a flag, that's on you π
and that's the whole page!! this one's from mipgen, dated October 2021, and it's giving peak utility π go make some mipmaps, you've got this. periodt. πβ¨ππ¦πΈπ
π
π¦ where this page comes from
- debian bookworm: libfilament-tools 1.9.25+dfsg2-10 Β· Apache-2.0
- debian trixie: libfilament-tools 1.9.25+dfsg3-1+b2 Β· Apache-2.0
- ubuntu jammy: libfilament-tools 1.9.25+dfsg2-4build1 Β· Apache-2.0
- ubuntu questing: libfilament-tools 1.9.25+dfsg3-1
- ubuntu resolute: libfilament-tools 1.9.25+dfsg3-3build2 Β· Apache-2.0
- ubuntu stonking: libfilament-tools 1.9.25+dfsg3-3build2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms