Back to Docs
Recipe

glTF Pipeline

End-to-end workflow for processing, optimizing, and delivering glTF 2.0 assets through Meridian's asset pipeline.

Overview

This recipe covers the complete glTF pipeline: source asset ingestion, Draco mesh compression, texture atlas generation, KTX2/Basis Universal transcoding, and final delivery through Meridian's CDN with automatic LOD generation.

Prerequisites

  • Meridian CLI v2.1+ installed and authenticated
  • Source glTF 2.0 file (binary .glb or JSON .gltf)
  • Node.js 18+ runtime for pipeline scripts

Step 1 — Validate Source Asset

Run the Meridian validator against your source file to catch non-spec-compliant nodes, missing accessors, or invalid buffer views before they enter the pipeline.

meridian validate --input ./source/model.glb

Step 2 — Draco Compression

Apply Draco mesh compression with the recommended quantization bits for position (11), normal (8), and texture coordinates (10). This typically yields 10-15x size reduction on geometry data.

meridian compress --codec draco --qp 11 --qn 8 --qt 10 --input ./source/model.glb --output ./stage/compressed.glb

Step 3 — Texture Transcoding

Convert all textures to KTX2 with Basis Universal supercompression for GPU-native transcoding at load time. Target ETC1S for opaque textures and UASTC for those with alpha channels.

meridian textures transcode --format ktx2 --codec uastc --input ./stage/compressed.glb --output ./stage/textured.glb

Step 4 — Publish

Push the final asset to Meridian. The platform automatically generates LOD chains, creates a manifest, and serves the asset through the global CDN with range-request support for progressive loading.

meridian publish --input ./stage/textured.glb --collection props --tags production,v1

Verification

After publishing, inspect the asset in the Meridian dashboard under the props collection. Confirm LOD levels, compressed size, and CDN edge cache status.

Need help with a custom pipeline? Browse more recipes or reach out on Discord.