Skip to content
Novus Examples
gltf19.5 KB

glTF — Texture as a Data URI

The same textured sphere with the PNG inlined as a base64 data URI in `images[0].uri` — a single portable text file. The variant that makes a glTF e-mailable and that some loaders quietly refuse.

Loading 3D preview…

Interactive preview rendered from the equivalent glTF (embedded-texture.glb); drag to orbit. Download the file above for the GLTF original.

Specifications

Format
glTF 2.0 (JSON)
Image Storage
data URI (base64 PNG)
Image Bytes
182
Self Contained
true

Testing contract

Expected to pass
Scenario
Load the file with no sibling files present and check that the checker texture appears.
Expected result
The image decodes from the data URI; a loader that only handles relative URIs shows an untextured sphere.

What is a .gltf file?

glTF (.gltf, GL Transmission Format) is the 'JPEG of 3D' — a JSON scene description referencing geometry, PBR materials, textures, and animation, with binary buffers stored alongside or as a .bin. It is the standard for web and real-time 3D.

How to use this file

Use an example .gltf file to test glTF loaders (three.js, model-viewer), PBR material handling, and glTF-to-GLB packing.

How to use this file for testing

“glTF — Texture as a Data URI” is a deterministic Novus Examples fixture for Texture map testing, Conversion testing. Tileable texture channels with documented roles and resolution, for validating texture pipelines, atlas packers, and material import/export.

Documented properties for this file: glTF 2.0 (JSON). Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

3D and CAD fixtures carry one small, documented solid or scene. Convert and inspect against the known geometry, units, and structure; format twins let you diff interchange fidelity, and the 3D viewer previews the actual mesh.

Code examples

import trimesh  # pip install trimesh

mesh = trimesh.load("embedded-texture.gltf")
print(mesh.bounds, mesh.faces.shape)

Generated by generation/models_p7.py. Free for any use, no attribution required — license.