glTF Validator & Loader Debugger
Project Context
You're implementing progressive glTF 2.0 compatibility in your wgpu-renderer through a systematic 5-phase plan using Khronos sample models as test cases.
Current Status: Phase 1-2 (basic geometry + transforms completed)
Goal: Work through Phase 5 (production-scale complex models) while learning asset loading patterns
What This Skill Knows
Your 5-Phase Progression Plan
Phase 1: Basic Geometry & Transforms ✅ COMPLETE
- Models: Triangle, TriangleWithoutIndices, Box, BoxInterleaved
- Features: Basic mesh loading, indexed/non-indexed drawing, local transforms
- Your Status: Completed all 4 models
Phase 2: Textures & Materials (IN PROGRESS)
- Models: BoxTextured, BoxTextured (Embedded), BoxVertexColors
- Features: PNG textures, embedded base64 textures, vertex color attributes
- What you need: Texture loading, sampler parsing, UV coordinate handling
Phase 3: Transform Hierarchies (NEXT)
- Models: SimpleMeshes, MultipleScenes
- Features: Parent-child node relationships, world transform computation, scene selection
- What you need: Recursive node traversal, transform concatenation, scene switching
Phase 4: Advanced Materials (PBR) (FUTURE)
- Models: MetalRoughSpheres, NormalTangentTest, DamagedHelmet
- Features: Metallic-roughness workflow, normal mapping, tangent space, occlusion, emissive
- What you need: PBR shader implementation, texture coordinate generation, tangent calculations
Phase 5: Complex Real-World Models (PRODUCTION VALIDATION)
- Models: Sponza (architectural), Avocado (organic), FlightHelmet (hard surface)
- Features: Handle mesh complexity, multiple materials, edge cases
- What you need: Robustness, proper error handling, performance
Your Current Loader Implementation
What Works:
- Basic mesh loading (positions, normals, indices)
- Non-indexed vs indexed primitives
- Interleaved vs separate buffer layouts
- Local node transforms (TRS)
- Basic material placeholder
What's Missing:
- Texture loading and sampling
- Material property extraction
- PBR workflows (metallic-roughness, specular-glossiness)
- Normal/tangent vectors
- Vertex colors
- Transform hierarchy resolution
- Multiple scenes
- Emissive and occlusion maps
Khronos Sample Models Location
Repository: https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models
Download Pattern:
- Navigate to model folder on GitHub
- Download
.glb file (binary format, self-contained)
- Or download
.gltf + separate texture files
glTF 2.0 Specification Knowledge
I know the relevant sections:
- Mesh and Primitive structures (indices, attributes, mode)
- Buffer Views and Accessors (data layout and interpretation)
- Materials (PBR metallic-roughness, specular-glossiness)
- Textures, Images, and Samplers
- Node hierarchy and transforms (TRS vs matrix)
- Scene structure and node graph
When to Activate This Skill
Use this skill when:
- Testing new models: "Why doesn't [model].glb load?"
- Planning next phase: "What should Phase 3 focus on?"
- Debugging loaders: "My loader handles this, so why does it fail?"
- Understanding spec: "What does this glTF feature mean?"
- Feature validation: "Does my loader support [feature]?"
- Progress tracking: "Have I completed Phase 2?"
How This Skill Helps
1. Validate Model Compatibility
You ask: "Does BoxTextured.glb work with my Phase 2 loader?"
I analyze:
- What features the model uses (textures, materials, etc.)
- Which ones your loader supports
- What's missing (e.g., "You need texture loading")
- Whether it's in your planned phase
2. Debug Loading Failures
You ask: "Why doesn't DamagedHelmet.glb load?"
I help identify:
- Whether it's a Phase 1-2 model (shouldn't be trying Phase 4 yet)
- What specific feature is missing
- What error you're probably seeing
- Steps to add support or move to simpler model
3. Guide Phase Progression
You ask: "What should I work on next?"
I reference:
- What you've completed in previous phases
- What's the logical next step
- Which model is simplest for that phase
- How long each phase typically takes
4. Explain glTF Features
You ask: "What's the difference between indexed and non-indexed?"
I explain:
- Technical difference (index buffer vs. direct vertex array)
- When to use each (performance, memory)
- How your loader handles both
- Your phase where this appears
5. Map to Your Codebase
I reference:
- Where your loader lives (
app/src/mesh/gltf_loader.rs)
- Your vertex format definitions
- Your material system
- Your Transform component handling
- Integration with ECS
Key Topics I Cover
File Format Understanding
- glTF JSON structure
- Binary (.glb) vs. asset-separate (.gltf + .bin + textures)
- Buffer data layout
- Accessor interpretation (SCALAR, VEC3, MAT4, etc.)
Mesh Loading
- Vertex attributes (POSITION, NORMAL, TANGENT, TEXCOORD, COLOR)
- Index buffers and drawing modes
- Interleaved vs. separate buffers
- Non-indexed geometry
- Primitive groups within a mesh
Materials & Textures
- Material definitions (base color, metallic-roughness factors)
- Texture references and samplers
- UV coordinate mapping
- External vs. embedded textures
- Image format support (PNG, JPEG, WebP)
Transforms & Hierarchy
- Node TRS (Translation, Rotation, Scale) decomposition
- Matrix form transforms
- Node parent-child relationships
- World transform computation
- Scene selection
Advanced Features
- Morph targets (blend shapes)
- Skins and joints (animation rigs)
- Extensions (KHR_ extensions)
- Sparse accessors
- Animation tracks
Example Queries This Skill Answers
- "Why doesn't BoxTextured.glb load?"
- "What's the difference between Phase 2 and Phase 3?"
- "Which test model should I try next?"
- "How do I load PNG textures from a glTF file?"
- "What does this glTF error mean?"
- "Does my loader support [feature]?"
- "How do I compute world transforms for a node hierarchy?"
- "What's the simplest Phase 4 model?"
- "Should I skip a phase or work through them in order?"
- "How do embedded textures work in glTF?"
Model Quick Reference
| Phase |
Model |
Size |
Complexity |
What It Tests |
| 1.1 |
Triangle |
Tiny |
1 vertex |
Basic rendering |
| 1.2 |
TriangleWithoutIndices |
Tiny |
3 vertices |
Non-indexed drawing |
| 1.3 |
Box |
Small |
24 vertices |
Local transforms |
| 1.4 |
BoxInterleaved |
Small |
24 vertices |
Interleaved buffers |
| 2.1 |
BoxTextured |
Small |
Textured |
PNG texture loading |
| 2.2 |
BoxTextured-Embedded |
Small |
Textured |
Base64 textures |
| 2.3 |
BoxVertexColors |
Small |
Colored |
Vertex attributes |
| 3.1 |
SimpleMeshes |
Medium |
Hierarchy |
Node transforms |
| 3.2 |
MultipleScenes |
Medium |
Scenes |
Scene selection |
| 4.1 |
MetalRoughSpheres |
Medium |
PBR |
Metallic-roughness |
| 4.2 |
NormalTangentTest |
Medium |
Normals |
Tangent space |
| 4.3 |
DamagedHelmet |
Medium |
Complete |
Full PBR stack |
| 5.1 |
Sponza |
Large |
Architecture |
Production scale |
| 5.2 |
Avocado |
Large |
Organic |
Complex geometry |
| 5.3 |
FlightHelmet |
Large |
Hard surface |
Complex materials |
How I Think About Your Project
This is systematic learning through implementation:
- Each phase builds on previous ones
- Models test specific features in isolation
- You understand glTF deeply through loading it
- No skipping phases (foundation matters)
I help you:
- Pick the right model to test
- Understand what failed and why
- Know what code to write next
- Track progress through the phases
1---2name: gltf-validator3description: Validate glTF files against your loader, identify missing features for each phase of compatibility, debug loading failures, and guide your 5-phase glTF progression from simple to complex models4---5
6# glTF Validator & Loader Debugger
7
8## Project Context
9
10You're implementing **progressive glTF 2.0 compatibility** in your wgpu-renderer through a systematic 5-phase plan using Khronos sample models as test cases.
11
12**Current Status**: Phase 1-2 (basic geometry + transforms completed)
13**Goal**: Work through Phase 5 (production-scale complex models) while learning asset loading patterns
14
15## What This Skill Knows
16
17### Your 5-Phase Progression Plan
18
19**Phase 1: Basic Geometry & Transforms** ✅ COMPLETE
20- Models: Triangle, TriangleWithoutIndices, Box, BoxInterleaved
21- Features: Basic mesh loading, indexed/non-indexed drawing, local transforms
22- Your Status: Completed all 4 models
23
24**Phase 2: Textures & Materials** (IN PROGRESS)
25- Models: BoxTextured, BoxTextured (Embedded), BoxVertexColors
26- Features: PNG textures, embedded base64 textures, vertex color attributes
27- What you need: Texture loading, sampler parsing, UV coordinate handling
28
29**Phase 3: Transform Hierarchies** (NEXT)
30- Models: SimpleMeshes, MultipleScenes
31- Features: Parent-child node relationships, world transform computation, scene selection
32- What you need: Recursive node traversal, transform concatenation, scene switching
33
34**Phase 4: Advanced Materials (PBR)** (FUTURE)
35- Models: MetalRoughSpheres, NormalTangentTest, DamagedHelmet
36- Features: Metallic-roughness workflow, normal mapping, tangent space, occlusion, emissive
37- What you need: PBR shader implementation, texture coordinate generation, tangent calculations
38
39**Phase 5: Complex Real-World Models** (PRODUCTION VALIDATION)
40- Models: Sponza (architectural), Avocado (organic), FlightHelmet (hard surface)
41- Features: Handle mesh complexity, multiple materials, edge cases
42- What you need: Robustness, proper error handling, performance
43
44### Your Current Loader Implementation
45
46**What Works**:
47- Basic mesh loading (positions, normals, indices)
48- Non-indexed vs indexed primitives
49- Interleaved vs separate buffer layouts
50- Local node transforms (TRS)
51- Basic material placeholder
52
53**What's Missing**:
54- Texture loading and sampling
55- Material property extraction
56- PBR workflows (metallic-roughness, specular-glossiness)
57- Normal/tangent vectors
58- Vertex colors
59- Transform hierarchy resolution
60- Multiple scenes
61- Emissive and occlusion maps
62
63### Khronos Sample Models Location
64
65**Repository**: https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models
66
67**Download Pattern**:
68- Navigate to model folder on GitHub
69- Download `.glb` file (binary format, self-contained)
70- Or download `.gltf` + separate texture files
71
72### glTF 2.0 Specification Knowledge
73
74I know the relevant sections:
75- Mesh and Primitive structures (indices, attributes, mode)
76- Buffer Views and Accessors (data layout and interpretation)
77- Materials (PBR metallic-roughness, specular-glossiness)
78- Textures, Images, and Samplers
79- Node hierarchy and transforms (TRS vs matrix)
80- Scene structure and node graph
81
82## When to Activate This Skill
83
84Use this skill when:
85- **Testing new models**: "Why doesn't [model].glb load?"
86- **Planning next phase**: "What should Phase 3 focus on?"
87- **Debugging loaders**: "My loader handles this, so why does it fail?"
88- **Understanding spec**: "What does this glTF feature mean?"
89- **Feature validation**: "Does my loader support [feature]?"
90- **Progress tracking**: "Have I completed Phase 2?"
91
92## How This Skill Helps
93
94### 1. **Validate Model Compatibility**
95You ask: "Does BoxTextured.glb work with my Phase 2 loader?"
96I analyze:
97- What features the model uses (textures, materials, etc.)
98- Which ones your loader supports
99- What's missing (e.g., "You need texture loading")
100- Whether it's in your planned phase
101
102### 2. **Debug Loading Failures**
103You ask: "Why doesn't DamagedHelmet.glb load?"
104I help identify:
105- Whether it's a Phase 1-2 model (shouldn't be trying Phase 4 yet)
106- What specific feature is missing
107- What error you're probably seeing
108- Steps to add support or move to simpler model
109
110### 3. **Guide Phase Progression**
111You ask: "What should I work on next?"
112I reference:
113- What you've completed in previous phases
114- What's the logical next step
115- Which model is simplest for that phase
116- How long each phase typically takes
117
118### 4. **Explain glTF Features**
119You ask: "What's the difference between indexed and non-indexed?"
120I explain:
121- Technical difference (index buffer vs. direct vertex array)
122- When to use each (performance, memory)
123- How your loader handles both
124- Your phase where this appears
125
126### 5. **Map to Your Codebase**
127I reference:
128- Where your loader lives (`app/src/mesh/gltf_loader.rs`)
129- Your vertex format definitions
130- Your material system
131- Your Transform component handling
132- Integration with ECS
133
134## Key Topics I Cover
135
136### File Format Understanding
137- glTF JSON structure
138- Binary (.glb) vs. asset-separate (.gltf + .bin + textures)
139- Buffer data layout
140- Accessor interpretation (SCALAR, VEC3, MAT4, etc.)
141
142### Mesh Loading
143- Vertex attributes (POSITION, NORMAL, TANGENT, TEXCOORD, COLOR)
144- Index buffers and drawing modes
145- Interleaved vs. separate buffers
146- Non-indexed geometry
147- Primitive groups within a mesh
148
149### Materials & Textures
150- Material definitions (base color, metallic-roughness factors)
151- Texture references and samplers
152- UV coordinate mapping
153- External vs. embedded textures
154- Image format support (PNG, JPEG, WebP)
155
156### Transforms & Hierarchy
157- Node TRS (Translation, Rotation, Scale) decomposition
158- Matrix form transforms
159- Node parent-child relationships
160- World transform computation
161- Scene selection
162
163### Advanced Features
164- Morph targets (blend shapes)
165- Skins and joints (animation rigs)
166- Extensions (KHR_ extensions)
167- Sparse accessors
168- Animation tracks
169
170## Example Queries This Skill Answers
171
1721. "Why doesn't BoxTextured.glb load?"
1732. "What's the difference between Phase 2 and Phase 3?"
1743. "Which test model should I try next?"
1754. "How do I load PNG textures from a glTF file?"
1765. "What does this glTF error mean?"
1776. "Does my loader support [feature]?"
1787. "How do I compute world transforms for a node hierarchy?"
1798. "What's the simplest Phase 4 model?"
1809. "Should I skip a phase or work through them in order?"
18110. "How do embedded textures work in glTF?"
182
183## Model Quick Reference
184
185| Phase | Model | Size | Complexity | What It Tests |
186|-------|-------|------|------------|---------------|
187| 1.1 | Triangle | Tiny | 1 vertex | Basic rendering |
188| 1.2 | TriangleWithoutIndices | Tiny | 3 vertices | Non-indexed drawing |
189| 1.3 | Box | Small | 24 vertices | Local transforms |
190| 1.4 | BoxInterleaved | Small | 24 vertices | Interleaved buffers |
191| 2.1 | BoxTextured | Small | Textured | PNG texture loading |
192| 2.2 | BoxTextured-Embedded | Small | Textured | Base64 textures |
193| 2.3 | BoxVertexColors | Small | Colored | Vertex attributes |
194| 3.1 | SimpleMeshes | Medium | Hierarchy | Node transforms |
195| 3.2 | MultipleScenes | Medium | Scenes | Scene selection |
196| 4.1 | MetalRoughSpheres | Medium | PBR | Metallic-roughness |
197| 4.2 | NormalTangentTest | Medium | Normals | Tangent space |
198| 4.3 | DamagedHelmet | Medium | Complete | Full PBR stack |
199| 5.1 | Sponza | Large | Architecture | Production scale |
200| 5.2 | Avocado | Large | Organic | Complex geometry |
201| 5.3 | FlightHelmet | Large | Hard surface | Complex materials |
202
203## How I Think About Your Project
204
205This is **systematic learning through implementation**:
206- Each phase builds on previous ones
207- Models test specific features in isolation
208- You understand glTF deeply through loading it
209- No skipping phases (foundation matters)
210
211I help you:
212- Pick the right model to test
213- Understand what failed and why
214- Know what code to write next
215- Track progress through the phases