glTF-Transform icon

glTF-Transform

Standard softwareFOSS · MIT

MIT CLI & TypeScript SDK for glTF Meshopt, Draco & KTX2

Free (MIT) · Don McCurdy · Standard software workflow; Steam AI disclosure does not apply.

AI
Standard
IP
Commercial-Safe IP
Engines
Web / JS, Godot, Bevy
Platforms
CLI · Windows · macOS · Linux · Web
Version
4.1
Technical Summary

glTF-Transform is an MIT-licensed open-source CLI and TypeScript/JavaScript SDK maintained by Don McCurdy for deterministic `.glb` and `.gltf` 3D asset optimization. Running across Windows, macOS, Linux, Node.js, and Web pipelines, it compresses geometry and PBR textures by 70% to 90% for Godot 4, Bevy, Three.js, and Unity.

Technical Overview

Architecture and Production Workflow

Created by Khronos 3D Formats Working Group contributor Don McCurdy, glTF-Transform treats glTF 2.0 files as a clean, losslessly inspectable in-memory scene graph (Document) rather than an opaque export artifact. Studios invoke it either as a zero-GUI command-line step (@gltf-transform/cli) inside CI/CD asset pipelines or programmatically via its modular TypeScript packages (@gltf-transform/core, @gltf-transform/functions, @gltf-transform/extensions).

A single CLI command (gltf-transform optimize raw.glb game_ready.glb --compress meshopt --texture-compress ktx2) chains battle-tested geometry and VRAM passes in milliseconds:

  • Geometry Compaction & LODs: weld merges duplicate vertices within configurable attribute tolerances; simplify (backed by meshoptimizer) generates lower-triangle LOD meshes while preserving UV seams; reorder optimizes vertex cache locality; and meshopt (EXT_meshopt_compression) or draco (KHR_draco_mesh_compression) slashes geometry byte size.
  • Draw-Call Reduction: dedup collapses identical materials and accessors, flatten and join merge static sub-meshes sharing materials, and instance converts repeated prop transforms into EXT_mesh_gpu_instancing batches.
  • VRAM Supercompression: etc1s and uastc (via Basis Universal ktx tooling) convert bloated PNG/JPEG maps into GPU-ready KTX2 (KHR_texture_basisu) textures that transcode directly to BC7, ASTC, or ETC2 in VRAM without main-thread decompression spikes.

Pricing, Licensing, and Commercial Rights

glTF-Transform is 100% open source under the MIT license with zero seat fees, cloud API quotas, or commercial restrictions on shipped assets across desktop, console, mobile, or WebGL/WebGPU games. Because its CLI runs deterministically on Node.js without GPU driver dependencies, studios execute it cleanly inside standard Linux Docker containers on GitHub Actions, GitLab CI, or Jenkins build agents whenever artists commit updated source models.

Strengths and Tradeoffs in Studio Pipelines

Pipeline DimensionStudio Production Reality
Where glTF-Transform WinsEssential automated post-processor for bloated Blender exports and raw generative 3D (.glb) meshes; 70%-90% disk and VRAM savings in CI without launching headless Blender.
Technical NuancesOperates strictly on .gltf/.glb (not .fbx or .usd); encoding tangent-space normal maps with lossy ETC1S introduces shading blocks unless routed to UASTC.
Engine CompatibilityNative EXT_meshopt_compression + KTX2 support works cleanly in Three.js, Babylon.js, Godot 4, and Bevy; Unreal and Unity teams should verify glTFfast or Interchange extension flags first.

AI Transparency & Steam Disclosure

Standard Software

Procedural math, physics, or manual authoring software.

Steamworks guidance: Standard software workflow; Steam AI disclosure does not apply.

Technical FAQ about glTF-Transform

Should game pipelines choose Meshopt or Draco compression in glTF-Transform?
Prefer Meshopt (`--compress meshopt`, paired with gzip/Brotli for web delivery) for almost all modern real-time games. While Draco achieves slightly smaller raw geometry files on high-poly static scans, Meshopt decodes orders of magnitude faster on CPU/WASM and compresses morph targets and animation keyframe buffers too.
Why do normal maps look blocky after KTX2 compression, and how do you fix it?
Basis Universal's `etc1s` codec optimizes for low-bitrate color/roughness maps and correlates RGB channels, which corrupts X/Y tangent-space normal vectors. Run `gltf-transform uastc --slots "{normalTexture,occlusionTexture,metallicRoughnessTexture}"` for crisp BC7/ASTC-grade normal fidelity while keeping `etc1s` purely on base-color diffuse textures.
How does glTF-Transform clean up raw AI-generated 3D `.glb` models?
Generative 3D exporters like Meshy, Tripo3D, and Rodin often output uncompressed 4K PNG textures, unindexed triangle soups, and redundant root nodes. Piping raw downloads through `gltf-transform resize --width 1024 --height 1024` followed by `optimize --simplify --simplify-ratio 0.5 --compress meshopt` makes them immediately runtime-viable.

More tools like glTF-Transform