Skip to main content

mtlx transform

mtlx transform​

Convert, combine, or resize/reformat textures across one or more .mtlx / .mtlx.zip files (glob patterns accepted), writing --output. A directory --output batch-converts each input separately instead of combining.

Aliases: x

Usage​

mtlx transform <inputs>... --output <output> [--verbose] [--dry-run] [--profile <profile>] [--max-image-size <max-image-size>] [--image-format <image-format>] [--image-quality <image-quality>] [--texture-library <texture-library>] [--format <format>]
ArgumentTypeRequiredDescription
inputsstringYesVariadic
FlagTypeRequiredDescription
--outputstringYesOutput path; a .mtlx/.mtlx.zip path combines every input into one file, a directory converts each input separately (same basename, same format) into that directory; Aliases: o
--verbosebooleanNoBatch mode: print every file written instead of just a one-line summary; Default: false
--dry-runbooleanNoTransform and validate in memory, report planned files, and create no output; Default: false
--profilestringNoApply a named texture preset (e.g. "web": webp-preferred, 2048px max, EXRs normalized to PIZ); only touches incompatible textures; Choices: web
--max-image-sizenumberNoResize any texture whose longest edge exceeds this many pixels; overrides --profile
--image-formatstringNoComma-separated target formats (webp,png,jpg,avif,exr,hdr); overrides --profile. Each source converts to the target sharing its dynamic range: SDR sources use the first SDR target, HDR sources (exr/hdr) use the first HDR target. An HDR source with no HDR target requested is linearly clipped to SDR (no tone mapping). Append ":" to exr (e.g. "exr:piz") to normalize EXR compression; supported: none, rle, zips, zip, piz, pxr24, b44, b44a, dwaa, dwab
--image-qualitynumberNoQuality for lossy image formats (webp/jpg/avif); Default: 95
--texture-librarystringNoLoose .mtlx output only: copy textures into this directory (relative to --output) instead of ./textures. Ignored for .mtlx.zip output, whose resources remain inside the archive.; Aliases: tl
--formatstringNoOutput format; Choices: text, json, yaml; Default: text