File size: 11,362 Bytes
bdb5907
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243eff9
bdb5907
 
 
 
 
 
 
 
 
243eff9
 
 
 
bdb5907
 
 
 
 
 
243eff9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bdb5907
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
670db30
 
bdb5907
243eff9
bdb5907
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fdb214f
670db30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fdb214f
 
 
670db30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fdb214f
 
 
 
 
 
 
 
 
 
bdb5907
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
---
license: cc-by-4.0
pretty_name: Scanned Objects GLB
tags:
- 3d
- gltf
- glb
- web
- three.js
- photogrammetry
- google-scanned-objects
size_categories:
- 1K<n<10K
configs:
- config_name: default
  data_files:
  - split: train
    path: thumbs/**
---

# Scanned Objects GLB

Web-ready glTF binary (`.glb`) copies of the 1,033 household products in
[Google Scanned Objects](https://research.google/blog/scanned-objects-by-google-research-a-dataset-of-3d-scanned-common-household-items/),
taken from the official copies on [Gazebo Fuel](https://app.gazebosim.org/GoogleResearch/fuel/models). Each file loads
directly in three.js, Babylon.js, model-viewer or any glTF 2.0 viewer, at real size in metres, Y up.

<video src="https://huggingface.co/datasets/codepawl/scanned-objects-glb/resolve/main/assets/preview.mp4" autoplay loop muted playsinline width="100%"></video>

![Every object in the pack](https://huggingface.co/datasets/codepawl/scanned-objects-glb/resolve/main/assets/all_objects.jpg)

Scans by Google Research, licensed CC BY 4.0 (Copyright 2020 Google LLC). This dataset converts and compresses them.
It does not change what they show. If you use these files, credit Google Research and link the source.

Brands, logos and product names printed on the packaging belong to their owners. They appear because the scans are of
real retail products; this dataset claims no rights in them and implies no endorsement.

## Use it in 67js

The files load in [67js](https://github.com/codepawl/67.js), a WebGL2 renderer. The geometry is meshopt compressed, so pass the decoder to `loadGltf`.
The snippet below loads the Clue board game from this repository and draws it on a page with one `<canvas>`.

```bash
npm install 67js@npm:@codepawlhq/67js meshoptimizer
```

```js
import { Renderer67 } from '67js';
import { loadGltf } from '67js/addons/gltf';
import { MeshoptDecoder } from 'meshoptimizer';

const GLB_URL = 'https://huggingface.co/datasets/codepawl/scanned-objects-glb/resolve/main/objects/Clue_Board_Game_Classic_Edition/Clue_Board_Game_Classic_Edition.glb';
const asset = await loadGltf(GLB_URL, { decoders: { meshopt: MeshoptDecoder } });
const renderer = new Renderer67(document.querySelector('canvas'), asset.parts, { samples: 4 });
renderer.render({ eye: [0, 0.3, 0.8], target: [0, 0.05, 0] });
```

The objects are a few centimetres to about half a metre across, so keep the camera close.

To search all 1,033 objects and orbit any of them, serve a local copy with any static server
(`npx serve scanned-objects-glb`) and open `/viewer/`.

| | Source (OBJ + PNG) | This dataset |
|---|---|---|
| Objects | 1,033 | 1,033 |
| Total size | 13.7 GB unpacked, 8.7 GB as zip | 344.8 MB |
| Triangles | 16,664,572 | 16,664,572 (not simplified) |
| Texture | 4096 px PNG | 2048 px WebP |

Example: the Clue board game is 25.0 MB as OBJ and PNG and 873 KB here. On a local server in headless
Chrome, the 45 objects that still had an uncompressed copy took 13.4 s to load and draw as plain glb
and 2.7 s as these files.

## What is in it

- `objects/<id>/<id>.glb`: one file per scan, named like the model on Gazebo Fuel.
- `thumbs/<id>.webp`: a 512 px render of each glb, with `thumbs/metadata.jsonl` for the Dataset Viewer.
- `metadata.jsonl`: one line per object: name, shelf category, brand, MPN, SKU from the source, size in metres,
  estimated mass, triangles, texture size and bytes before and after.
- `collision_hulls.json`: one convex hull per object (up to 40 points, in the glb's frame) with its volume and mass
  estimate, ready for a physics engine.
- `objects_ktx2/<id>/<id>.glb`: the same objects with KTX2 textures for games and WebGPU, plus `gpu_variants.jsonl`.
- `lods/<id>/<id>_lod1.glb` to `_lod3.glb`: simplified levels with smaller KTX2 textures.
- `viewer/`: the static three.js browser.
- `assets/`: the banner video and the picture of all objects at the top of this card.

## Download

All files, about 344.8 MB:

```bash
hf download codepawl/scanned-objects-glb --repo-type dataset --local-dir scanned-objects-glb
```

One file from Python:

```python
from huggingface_hub import hf_hub_download

path = hf_hub_download("codepawl/scanned-objects-glb", "objects/Clue_Board_Game_Classic_Edition/Clue_Board_Game_Classic_Edition.glb", repo_type="dataset")
```

## Loading in three.js

The geometry uses `EXT_meshopt_compression` and the textures use `EXT_texture_webp`, so set the meshopt decoder:

```js
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { MeshoptDecoder } from 'three/addons/libs/meshopt_decoder.module.js';

const loader = new GLTFLoader();
loader.setMeshoptDecoder(MeshoptDecoder);
loader.load('Clue_Board_Game_Classic_Edition.glb', (gltf) => scene.add(gltf.scene));
```

## For web games and WebGPU: KTX2 and LODs

A WebP texture is decoded to full RGBA on the GPU. `objects_ktx2/` has the same 1,033 objects with KTX2 textures
(ETC1S, full mip chain, `KHR_texture_basisu`), which stay block compressed in VRAM. `lods/` adds three simpler levels of
each object as separate files, because neither three.js nor 67js reads `MSFT_lod`. Every level has the same origin,
scale and orientation, so switching level is a plain swap. The files in `objects/` did not change.

| Level | File | Triangles kept | Texture | VRAM, median | File, median |
|---|---|---|---|---|---|
| WebP pack | `objects/<id>/<id>.glb` | 100% | 2048 px WebP | 21.5 MiB | 297 KiB |
| lod0 | `objects_ktx2/<id>/<id>.glb` | 100% | 2048 px KTX2 | 5.5 MiB | 336 KiB |
| lod1 | `lods/<id>/<id>_lod1.glb` | 50% | 1024 px | 1.4 MiB | 129 KiB |
| lod2 | `lods/<id>/<id>_lod2.glb` | 20% | 512 px | 0.38 MiB | 56 KiB |
| lod3 | `lods/<id>/<id>_lod3.glb` | 6% | 256 px | 0.10 MiB | 22 KiB |

Load time for one object, median of 20 objects with 5 loads each:

| | WebP pack | KTX2 lod0 |
|---|---|---|
| three.js WebGPURenderer, load | 41.3 ms | 23.2 ms |
| three.js WebGPURenderer, load and first frame | 48.1 ms | 27.0 ms |
| 67js, load | 49.0 ms | 30.4 ms |

three.js WebGLRenderer was measured on a smaller sample, 5 objects with 3 loads each. It loaded the WebP file in
45.1 ms and the KTX2 file in 26.3 ms. With the first frame, they took 67.3 ms and 35.4 ms. It also transcoded KTX2 to BC7.

Measured on an RTX 3060 in headless Chrome (ANGLE D3D11, WebGPU backend), three.js r187 and 67js 0.15.0, files from
localhost. VRAM counts texture and geometry bytes as uploaded: the KTX2 files transcode to BC7 on this GPU, and WebP is
RGBA8 with mips. The GPU was shared with other jobs, so the ratios are more reliable than the milliseconds. Phones
(ASTC or ETC2) and Safari were not measured. The KTX2 set is 373.6 MB against 344.8 MB for the WebP set, and the LODs
add 247.7 MB.

three.js with WebGPU:

```js
import * as THREE from 'three';
import { WebGPURenderer } from 'three/webgpu';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { KTX2Loader } from 'three/addons/loaders/KTX2Loader.js';
import { MeshoptDecoder } from 'three/addons/libs/meshopt_decoder.module.js';

const BASE = 'https://huggingface.co/datasets/codepawl/scanned-objects-glb/resolve/main';
const renderer = new WebGPURenderer({ antialias: true });
await renderer.init(); // call before detectSupport, so the loader knows the device's formats

const ktx2Loader = new KTX2Loader()
  .setTranscoderPath('https://cdn.jsdelivr.net/npm/three@0.187.0/examples/jsm/libs/basis/')
  .detectSupport(renderer);
const loader = new GLTFLoader().setKTX2Loader(ktx2Loader).setMeshoptDecoder(MeshoptDecoder);
const gltf = await loader.loadAsync(`${BASE}/objects_ktx2/11pro_SL_TRX_FG/11pro_SL_TRX_FG.glb`);
```

67js does not bundle the decoders, so pass the three.js KTX2 loader and meshopt decoder:

```js
import { KTX2Loader } from 'three/addons/loaders/KTX2Loader.js';
import { MeshoptDecoder } from 'three/addons/libs/meshopt_decoder.module.js';
import { loadGltf, ktx2WorkerConfigFor } from '67js/addons/gltf';

const BASE = 'https://huggingface.co/datasets/codepawl/scanned-objects-glb/resolve/main';
const context = document.createElement('canvas').getContext('webgl2'); // with a Renderer67, use renderer.context
const ktx2 = new KTX2Loader().setTranscoderPath('https://cdn.jsdelivr.net/npm/three@0.187.0/examples/jsm/libs/basis/');
ktx2.workerConfig = ktx2WorkerConfigFor(context); // without it the loader throws

const asset = await loadGltf(`${BASE}/objects_ktx2/11pro_SL_TRX_FG/11pro_SL_TRX_FG.glb`, { decoders: { ktx2, meshopt: MeshoptDecoder } });
ktx2.dispose();
```

Both snippets ran against that URL. three.js reported the WebGPU backend and a BC7 texture with 12 mips, and 67js
reported one BC7 2048 px texture with no warnings. The textures were encoded with KTX-Software 4.4.2 `toktx`
(ETC1S, `--clevel 0 --qlevel 128 --genmipmap`). ETC1S was chosen over UASTC because these scans have only a colour map.
The LODs use meshopt simplify with error caps of 0.01, 0.03 and 0.08.

Game engines: Unreal Engine 5.8 does not import these files, because its glTF importer does not read
`EXT_meshopt_compression`. For Unreal, decode a file from `objects/` first. The command below writes plain geometry
and PNG textures. A SimReady file made this way imported into Unreal 5.8 with its textures:

```bash
npx @gltf-transform/cli png Clue_Board_Game_Classic_Edition.glb Clue_plain.glb --formats "*"
```

Unity and Godot were not tested. `collision_hulls.json` holds one convex hull per object for any physics engine.

## Categories and mass

The source gives a product name and, for some objects, a retail category that is often missing or wrong (a shoe
filed under bottles and cups, for example). Each object gets one shelf category: shoe (254), toy (224), household (102), electronics (97), kitchen (80), food and drink (71), health and beauty (55), bottles and cups (37), board game (33), bag (30), media (29), other (13), baby gear (6), clothing (2).
553 come from the source category and 467 from keyword rules on the product name; 13 match
neither and are left as `other`. The rules are in `categories.mjs` of the conversion scripts; expect a few misfiles.

The source has no mass. `mass_estimate_kg` is the hull volume times a rough bulk density for the category (a boxed
toy is mostly air), so treat it as a starting value, not a measurement.

## How the files were made

1. Download every model of the `GoogleResearch` owner from Gazebo Fuel (1,033 on 2026-11-02; the Google
   blog says 1,030). Each archive holds `meshes/model.obj`, `model.mtl`, a 4096 px PNG and `metadata.pbtxt`.
2. Read the OBJ, turn it from Z up to Y up, keep metres. Write one glTF mesh with the PNG as base colour.
3. Optimize with glTF Transform: dedup, prune, weld, texture to 2048 px WebP at quality 88, meshopt at its high level.
4. Build a convex hull from the full scan with scipy, simplified to 40 points.
5. Render a 512 px thumbnail of every pack file in headless Chrome.

Before the full run, 10 objects were rendered from the uncompressed glb and from the pack file with the same camera.
The mean pixel difference was 0.02 to 0.50 out of 255; a 1024 px texture doubled it, so 2048 px was kept.

## Known gaps

The scans are single meshes with one texture, so lids, straps and soft parts do not move. Shiny and transparent
surfaces were scanned as matte colour. Hulls are convex, so a bowl or a shoe collides as if filled. Mass is estimated.