DOKK / manpages / debian 11 / gltfpack / gltfpack.1.en
GLTFPACK(1) General Commands Manual GLTFPACK(1)

gltfpack - optimize glTF files to improve loading and rendering speed

gltfpack [options] -i input -o output

gltfpack substantially changes the glTF data by optimizing the meshes for vertex fetch and transform cache, quantizing the geometry to reduce the memory consumption and size, merging meshes to reduce the draw call count, quantizing and resampling animations to reduce animation size and simplify playback, and pruning the node tree by removing or collapsing redundant nodes. It will also simplify the meshes when requested to do so.

input file to process. Acceptable input formats are .obj, .gltf, and .glb files.
output file. Supported output formats are .gltf and .glf.
produce compressed output. -cc uses better compression.

convert all textures to KTX2 with BasisU supercompression
use UASTC when encoding textures (much higher quality and much larger size)
set texture encoding quality between 1 and 10 (default: 8)
scale texture dimensions by the ratio R (default: 1, should be between 0 and 1)
resize textures to the nearest power of 2 to conform to WebGL 1 restrictions

try to simplify meshes to the target size R as fraction of the original size (default: 1, should be between 0 and 1)
simplify aggressively, disregarding quality

use N-bit quantization for vertex positions (default: 14, should be between 1 and 16)
use N-bit quantization for texture coordinates (default: 12, should be between 1 and 16)
use N-bit quantization for normals and tangents (default: 8, should be between 1 and 16)
use N-bit quantization for colors (default: 8, should be between 1 and 16)

use N-bit quantization for translations (default: 16, should be between 1 and 24)
use N-bit quantization for rotations (default: 12, should be between 4 and 16)
use N-bit quantization for scale (default: 16, should be between 1 and 24)
resample animations at N Hz (default: 30)
keep constant animation tracks even if they do not modify the node transform

keep named nodes and meshes attached to named nodes so that they can be transformed externally
keep named materials and disable named material merging
keep extra data
merge instances of the same mesh together when possible
use EXT_mesh_gpu_instancing when serializing multiple mesh instances

produce compressed files with fallback for loaders which do not support compression
disable quantization. This produces much larger glTF files with no extensions
verbose output (prints version when used without other options)
write a JSON report to file

gltfpack is shipped with the meshoptimizer library written by Arseny Kapoulkine. This manual page was written for Debian by Timo Röhling and may be used without restriction.