table of contents
GLTFPACK(1) | General Commands Manual | GLTFPACK(1) |
NAME¶
gltfpack - optimize glTF files to improve loading and rendering speed
SYNOPSIS¶
gltfpack |
[options] -i input -o output |
DESCRIPTION¶
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.
Basic Options¶
Texture Options¶
- -tc
- convert all textures to KTX2 with BasisU supercompression
- -tu
- use UASTC when encoding textures (much higher quality and much larger size)
- -tq N
- set texture encoding quality between 1 and 10 (default: 8)
- -ts R
- scale texture dimensions by the ratio R (default: 1, should be between 0 and 1)
- -tp
- resize textures to the nearest power of 2 to conform to WebGL 1 restrictions
Simplification Options¶
Vertex Options¶
- -vp N
- use N-bit quantization for vertex positions (default: 14, should be between 1 and 16)
- -vt N
- use N-bit quantization for texture coordinates (default: 12, should be between 1 and 16)
- -vn N
- use N-bit quantization for normals and tangents (default: 8, should be between 1 and 16)
- -vc N
- use N-bit quantization for colors (default: 8, should be between 1 and 16)
Animation Options¶
- -at N
- use N-bit quantization for translations (default: 16, should be between 1 and 24)
- -ar N
- use N-bit quantization for rotations (default: 12, should be between 4 and 16)
- -as N
- use N-bit quantization for scale (default: 16, should be between 1 and 24)
- -af N
- resample animations at N Hz (default: 30)
- -ac
- keep constant animation tracks even if they do not modify the node transform
Scene Options¶
- -kn
- keep named nodes and meshes attached to named nodes so that they can be transformed externally
- -km
- keep named materials and disable named material merging
- -ke
- keep extra data
- -mm
- merge instances of the same mesh together when possible
- -mi
- use EXT_mesh_gpu_instancing when serializing multiple mesh instances
Miscellaneous Options¶
AUTHOR¶
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.