logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

gltfpack - optimize glTF files to improve loading and rendering speed

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.

                                                                                                     GLTFPACK(1)

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.

   BasicOptions-iinput
              input file to process. Acceptable input formats are .obj, .gltf, and .glb files.

       -ooutput
              output file. Supported output formats are .gltf and .glf.

       -c, -cc
              produce compressed output.  -cc uses better compression.

   TextureOptions-tc    convert all textures to KTX2 with BasisU supercompression

       -tu    use UASTC when encoding textures (much higher quality and much larger size)

       -tqN  set texture encoding quality between 1 and 10 (default: 8)

       -tsR  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

   SimplificationOptions-siR  try to simplify meshes to the target size R as fraction of the original size (default:  1,  should
              be between 0 and 1)

       -sa    simplify aggressively, disregarding quality

   VertexOptions-vpN  use N-bit quantization for vertex positions (default: 14, should be between 1 and 16)

       -vtN  use N-bit quantization for texture coordinates (default: 12, should be between 1 and 16)

       -vnN  use N-bit quantization for normals and tangents (default: 8, should be between 1 and 16)

       -vcN  use N-bit quantization for colors (default: 8, should be between 1 and 16)

   AnimationOptions-atN  use N-bit quantization for translations (default: 16, should be between 1 and 24)

       -arN  use N-bit quantization for rotations (default: 12, should be between 4 and 16)

       -asN  use N-bit quantization for scale (default: 16, should be between 1 and 24)

       -afN  resample animations at N Hz (default: 30)

       -ac    keep constant animation tracks even if they do not modify the node transform

   SceneOptions-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

   MiscellaneousOptions-cf    produce compressed files with fallback for loaders which do not support compression

       -noq   disable quantization. This produces much larger glTF files with no extensions

       -v     verbose output (prints version when used without other options)

       -rfile
              write a JSON report to file

Name

       gltfpack - optimize glTF files to improve loading and rendering speed

Synopsis

gltfpack [options] -iinput-ooutput

See Also