Skip to main content

Studio Gltf Web Asset

v1.0.0New

Install this skill

No account required. Pick your tool, then copy.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install studio-gltf-web-asset

What this does: Model or convert 3D assets to glTF/GLB for the web with poly and texture budgets, Draco or meshopt plus KTX2 compression via gltf-transform, a Three.js or model-viewer preview, and size plus gltf-validator checks. Triggers: "optimize this GLB", "3D model for the web", "convert FBX to glTF", "compress textures KTX2".

Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/studio-gltf-web-asset/SKILL.md

Setup guide →

Cursor

~/.cursor/skills/studio-gltf-web-asset/SKILL.md

Setup guide →

Codex CLI

~/.codex/skills/studio-gltf-web-asset/SKILL.md, or reference via codex.md instructions file

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

glTF web asset

A web 3D asset is done when it looks right, loads fast on a mid-range phone and passes the validator with zero errors.

Inputs to agree on

  • Source: Blender file, FBX, OBJ, CAD export, photogrammetry scan, or an existing GLB.
  • Viewer: Three.js app, <model-viewer>, Babylon.js, or AR (Scene Viewer, Quick Look needs USDZ).
  • Budgets (typical product viewer on mobile):
    • Triangles: 50k to 100k hero, under 20k for many-object scenes.
    • Textures: 2048 max for hero base color, 1024 for normal/ORM on small items; KTX2 compressed.
    • Download: under 5 MB hero, under 1 MB for inline items.
    • Draw calls: as few materials as possible (1 to 5).
  • Required features: animations, morph targets, variants (KHR_materials_variants), AR.

Toolchain

  • Blender 4.x glTF exporter (built in) for modeling, baking and export.
  • @gltf-transform/cli for inspect, optimize, compress: npm i -g @gltf-transform/cli.
  • KTX-Software (toktx) is required by gltf-transform for KTX2 encoding; install it and ensure it is on PATH.
  • gltf-validator (Khronos): npm i -g gltf-validator provides the library; the CLI binary is published on the KhronosGroup glTF-Validator releases page. The web drop-in at github.khronos.org/glTF-Validator also works.
  • Alternatives: gltfpack (meshoptimizer) for one-shot simplify plus compress; FBX2glTF for FBX; obj2gltf.

Workflow

1. Prepare in Blender

  • Apply scale and rotation (Ctrl+A), real-world meters, Y-up is handled by the exporter.
  • Remove hidden geometry, inner faces and unused materials. Merge materials where possible and bake to a single texture set (base color, normal, ORM where R=occlusion, G=roughness, B=metallic).
  • For high-poly scans or CAD: decimate or retopologize, then bake normals from high to low.
  • Export:
import bpy
bpy.ops.export_scene.gltf(
    filepath="asset.glb", export_format="GLB",
    export_apply=True, export_yup=True,
    export_texcoords=True, export_normals=True,
    export_draco_mesh_compression_enable=False,  # compress later with gltf-transform
    export_animations=True,
)

Converting an FBX directly: FBX2glTF -b -i model.fbx -o model (outputs GLB).

2. Inspect

gltf-transform inspect asset.glb

Read the meshes table (vertices, primitives), textures (resolution, size in bytes, format) and extensions used. Large textures are usually most of the file.

3. Optimize

One command covering dedup, prune, weld, simplify, texture resize and compression:

gltf-transform optimize asset.glb asset.opt.glb \
  --compress meshopt \
  --texture-compress ktx2 \
  --texture-size 2048 \
  --simplify true --simplify-ratio 0.5 --simplify-error 0.001

Step-by-step when you need control:

gltf-transform dedup asset.glb a.glb
gltf-transform prune a.glb a.glb
gltf-transform weld a.glb a.glb
gltf-transform simplify a.glb a.glb --ratio 0.5 --error 0.001
gltf-transform resize a.glb a.glb --width 2048 --height 2048
gltf-transform etc1s a.glb a.glb --slots "{baseColorTexture,emissiveTexture}" --quality 255
gltf-transform uastc a.glb a.glb --slots "{normalTexture,occlusionTexture,metallicRoughnessTexture}" --level 2 --zstd 18
gltf-transform meshopt a.glb asset.opt.glb

Use UASTC for normal and ORM maps (ETC1S artifacts break normals) and ETC1S for color maps where size matters. Choose Draco (gltf-transform draco) for the smallest geometry on static meshes; choose meshopt for faster decode and support for animation and morph targets. Flags change between versions, so confirm with gltf-transform <command> --help.

4. Validate

gltf_validator asset.opt.glb -o   # writes asset.opt.report.json

Require 0 errors. Review warnings (unused objects, non-normalized vectors). Then re-run gltf-transform inspect to confirm budgets.

5. Preview

<model-viewer> (fastest to ship):

<script
  type="module"
  src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"
></script>
<model-viewer
  src="asset.opt.glb"
  alt="Product name, 3D view"
  camera-controls
  touch-action="pan-y"
  shadow-intensity="1"
  environment-image="neutral"
  exposure="1"
  ar
  ar-modes="webxr scene-viewer quick-look"
  style="width:100%;height:480px"
></model-viewer>

model-viewer decodes Draco, meshopt and KTX2 automatically.

Three.js (needs decoders wired):

import * as THREE from "three";
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
import { KTX2Loader } from "three/addons/loaders/KTX2Loader.js";
import { DRACOLoader } from "three/addons/loaders/DRACOLoader.js";
import { MeshoptDecoder } from "three/addons/libs/meshopt_decoder.module.js";
import { RoomEnvironment } from "three/addons/environments/RoomEnvironment.js";

const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.toneMapping = THREE.ACESFilmicToneMapping;
const scene = new THREE.Scene();
scene.environment = new THREE.PMREMGenerator(renderer).fromScene(
  new RoomEnvironment(),
).texture;

const ktx2 = new KTX2Loader()
  .setTranscoderPath("/basis/")
  .detectSupport(renderer);
const draco = new DRACOLoader().setDecoderPath("/draco/");
const loader = new GLTFLoader()
  .setKTX2Loader(ktx2)
  .setDRACOLoader(draco)
  .setMeshoptDecoder(MeshoptDecoder);
loader.load("asset.opt.glb", (gltf) => scene.add(gltf.scene));

Copy the transcoder and decoder files from three/examples/jsm/libs/basis and .../draco into your public folder.

6. Serve correctly

  • MIME: model/gltf-binary for .glb, image/ktx2 for .ktx2.
  • Long cache with a content hash in the filename. Do not gzip an already compressed GLB heavily; Brotli gains little on Draco/meshopt data.

Variants

  • AR on iOS: export USDZ (Blender USD export or Reality Converter) and pass it via ios-src.
  • Many small assets: share textures in a .gltf plus external files, or atlas them.
  • Animated characters: meshopt (Draco does not cover animation), keep skin weights to 4 influences, resample animations with gltf-transform resample.
  • Photogrammetry: simplify aggressively, bake detail into a normal map, cap at 4096 texture only for hero.

Quality checks

  • Validator: 0 errors.
  • File size within budget (ls -l, plus each texture's size from inspect).
  • Triangle count within budget.
  • Visual diff: screenshot the original and optimized models from the same camera; no visible seams, flipped normals or banded color.
  • Load on a mid-range phone over throttled 4G: first render under about 3 s for a hero model.
  • GPU memory: KTX2 textures stay compressed on GPU; PNG/JPG expand to width x height x 4 bytes each.

Pitfalls and fixes

  • Black or missing textures in Three.js: KTX2Loader not registered or transcoder path wrong.
  • Model too small or rotated: scale not applied before export.
  • Normal map looks inverted: glTF uses OpenGL-style (Y+) normals; flip green channel from DirectX bakes.
  • Simplify destroyed silhouette: lower the ratio change, raise --error limit carefully, or lock borders; check UV seams.
  • Transparent materials sorting wrong: use alpha mode MASK where possible instead of BLEND.
  • toktx not found: install KTX-Software; gltf-transform shells out to it.

Deliverables

  • asset.opt.glb within budgets
  • Validator report JSON with 0 errors
  • Inspect output before and after (size, triangles, textures)
  • Preview page (model-viewer or Three.js) with decoders set up
  • USDZ if AR on iOS was requested
  • Source .blend and the exact optimize commands
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
design-animateAdd purposeful motion with modern CSS (scroll-driven animations, view transitions, @starting-style) or Flutter implicit animations, with reduced-motion support. Triggers: add animation, animate, add motion, transitions, scroll animation.86 installsdesign-auditRead-only design quality audit (WCAG 2.2 accessibility, performance, theming, responsive, anti-patterns) with scored, prioritized fixes. Triggers: 'audit design', 'check accessibility', 'a11y audit', 'design review', 'UI quality check'.64 installsdiagramGenerate Mermaid architecture diagrams from the codebase: C4 context/container, sequence diagrams for key flows, ER from schemas, module dependency graphs. Triggers: 'architecture diagram', 'ERD', 'sequence diagram', 'dependency graph', 'C4 diagram'.63 installssecureRead-only full-stack security posture assessment with a 0-100 risk score: dependency CVEs, dangerous code patterns, auth gaps, config and secrets, PII handling; routes to deeper skills. Triggers: 'security posture', 'how secure is this', 'security scan', 'risk score'.62 installsdesign-polishFinal quality pass before shipping: fixes alignment, spacing, type hierarchy, color consistency, interactive states and motion timing to match the existing design language. Triggers: 'polish the UI', 'make it pixel perfect', 'final design pass'.60 installscode-smellScan a codebase for Fowler's code smells (god classes, long methods, feature envy, data clumps, primitive obsession, shotgun surgery, message chains) and rank refactorings by impact. Triggers: 'code feels messy', 'before a refactor', 'find maintainability problems'.53 installs

More from Skills Hub

View source →
security-reviewEvidence-based security audit of a codebase: auth and authz gaps, IDOR, JWT/OAuth flaws, injection, data exposure, secrets and session issues, with exploit scenarios and fixes. Triggers: security review, audit auth, find vulnerabilities.208 installsunit-testFind untested code, write unit tests covering edge cases, error paths and boundaries in the project's own style, run them and fix failures. Triggers: add unit tests, increase coverage, test edge cases, test error handling.179 installsweb-gameScaffold a production-ready browser game (Phaser, PixiJS or Three.js) with Vite, TypeScript, input, audio, saves, responsive canvas and itch.io/PWA deploy. Triggers: web game, browser game, html5 game, phaser game, pixi game, three.js game.148 installshumanizerRewrite AI-drafted content so it reads human: cut filler and hedging, vary sentence length, curb em dashes, add specifics and voice. Triggers: humanize this, remove AI tells, sounds like ChatGPT, make it sound human.146 installsdesign-to-codeTurn a design into production frontend code in four phases: design-system tokens and components, responsive layout, dark mode, then a UX audit that fixes what it finds. Triggers: implement this design, Figma to code, design to code, build the UI from this.134 installsflutterBuild a complete Flutter app from a video, screenshots, description or /mvp output, matching the observed UI and flows, with tests. Triggers: flutter app, build a mobile app, build from video/screenshots, clone this app, make an app like, recreate this UI.131 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.655 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.557 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.369 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.267 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.185 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions151 installs

Frequently asked questions about studio-gltf-web-asset

What does the studio-gltf-web-asset skill do?

Model or convert 3D assets to glTF/GLB for the web with poly and texture budgets, Draco or meshopt plus KTX2 compression via gltf-transform, a Three.js or model-viewer preview, and size plus gltf-validator checks. Triggers: "optimize this GLB", "3D model for the web", "convert FBX to glTF", "compress textures KTX2". It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the studio-gltf-web-asset skill?

Run `npx @skills-hub-ai/cli install studio-gltf-web-asset` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/studio-gltf-web-asset/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does studio-gltf-web-asset work with?

studio-gltf-web-asset runs in Claude Code, Cursor, Codex CLI. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the studio-gltf-web-asset skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use studio-gltf-web-asset after installing it?

In Claude Code, type `/studio-gltf-web-asset` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the studio-gltf-web-asset skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.