--- license: apache-2.0 license_link: https://www.apache.org/licenses/LICENSE-2.0 pretty_name: USDCraft GLB tags: - 3d - glb - gltf - articulated-objects - usd - threejs - webgpu - godot - game-assets configs: - config_name: default data_files: - split: train path: data/train-*.parquet --- # USDCraft GLB ![All 10000 objects](assets/banner.jpg) NVIDIA's USDCraft-10K objects ship as PhysX USD, which opens with its joints only in Isaac Sim. Here they are GLB with every joint kept: each door, drawer, lid, knob and button is a node you turn or slide in three.js, Crucible, Godot or Blender. The objects are simple, flat-coloured shapes; what they add is parts that move like the real thing. Every object is Y-up with its front toward +Z (NVIDIA's -Y). ## Moving the joints Each moving joint is a node named after the joint, at the hinge or slide. Its glTF extras (`userData` in three.js) hold `usdcraft_joint`: `type` (revolute, continuous, prismatic, spherical), `axis` in the node's own frame, `lower` and `upper` (radians, or metres for prismatic). Turn or slide that node from its rest pose; the part and everything on it follow. `joints//.json` lists the same joints with the part list, mass and NVIDIA's grasp annotations. Every file also carries an `all_joints` clip that sweeps every joint through its range, then one clip per joint, so Godot's AnimationPlayer and Blender's actions play them with no code. ```js const hinge = gltf.scene.getObjectByName('door_hinge'); const { type, axis, lower, upper } = hinge.userData.usdcraft_joint; const rest = hinge.quaternion.clone(); // open the door: turn about the joint's own axis by its upper limit hinge.quaternion.copy(rest).multiply(new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(...axis), upper)); // a prismatic joint slides instead: position = rest position + axis (turned by rest) * value ``` `collision/` keeps the same joint tree, so the shapes move with the parts; each shape node says `box`, `sphere`, `convex` or `trimesh` in `extras.usdcraft_collision`. 10000 objects from [USDCraft-10K](https://huggingface.co/datasets/nvidia/USDCraft-10K) by NVIDIA, 21.78 GB of source files packed into 1.20 GB of GLB (web tier). Credit: NVIDIA USDCraft-10K (https://huggingface.co/datasets/nvidia/USDCraft-10K), NVIDIA Corporation, Apache License 2.0. Paper: Zhang et al., USDCraft, arXiv:2610.11322. Viewer: https://huggingface.co/spaces/codepawl/usdcraft-glb-viewer ## Files | Folder | Size | What | For | |---|---|---|---| | `objects/` | 1.20 GB | meshopt geometry, WebP textures | three.js, Babylon.js, any glTF viewer with the meshopt decoder | | `engine/` | 6.90 GB | no meshopt, no quantization | Blender and desktop engines that cannot decode meshopt | | `collision/` | 7.39 GB | convex collision shapes, plain glTF | Rapier, Jolt, PhysX, Unity colliders | `metadata.jsonl` has one line per item: title, kind, licence, authors, triangle count and the path and size of every tier. The Dataset Viewer and `load_dataset` read `data/*.parquet`: the same rows with the mesh (`Mesh`, the plain `engine/` GLB, decoded by trimesh) and the thumbnail (`Image`) embedded. Thumbnails are also in `thumbs/`. ## For web games and WebGPU Load the `objects/` files in web games: small files with meshopt geometry and WebP textures. `collision/` holds convex shapes for physics. glTF extensions each tier uses (also per row in `metadata.jsonl`, field `extensions`): - `web`: `EXT_meshopt_compression`, `EXT_texture_webp`, `KHR_mesh_quantization` - `engine`: none Measured on 12 items spread over triangle count. Phone page: 390x844 at 3x, pixel ratio capped at 2, CPU throttled 4x, network at Chrome's Fast 4G (150 ms, 9 Mbit/s), so phone load includes the download. The GPU is a desktop RTX 3060 and is not throttled: frame time shows the CPU side only, a real phone GPU is slower. VRAM is geometry plus texture bytes on the GPU. | Tier | File (median) | VRAM (median) | Triangles | Phone load (4G) | Frame time | WebGPU load (local) | |---|---|---|---|---|---|---| | web (11) | 0.0 MB | 0.1 MiB | 10,172 | 218 ms | 0.6 ms | 3 ms | three.js 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 renderer = new WebGPURenderer({ antialias: true }); await renderer.init(); // KTX2Loader needs to know which compressed formats this device takes const ktx2 = new KTX2Loader().setTranscoderPath('https://cdn.jsdelivr.net/npm/three@0.187.0/examples/jsm/libs/basis/').detectSupport(renderer); const loader = new GLTFLoader().setKTX2Loader(ktx2).setMeshoptDecoder(MeshoptDecoder); const gltf = await loader.loadAsync('https://huggingface.co/datasets/codepawl/usdcraft-glb/resolve/main/objects/ds_r001_01/ds_r001_01.glb'); ``` ## Use it in Crucible [Crucible (formerly 67js)](https://github.com/codepawl/crucible) loads these files as they are: ```bash npm install @codepawlhq/crucible meshoptimizer ``` ```js import { CrucibleRenderer } from '@codepawlhq/crucible'; import { loadGltf } from '@codepawlhq/crucible/addons/gltf'; import { MeshoptDecoder } from 'meshoptimizer'; const asset = await loadGltf('https://huggingface.co/datasets/codepawl/usdcraft-glb/resolve/main/objects/ds_r001_01/ds_r001_01.glb', { decoders: { meshopt: MeshoptDecoder } }); const renderer = new CrucibleRenderer(document.querySelector('canvas'), asset.parts, { ground: true }); renderer.render({ eye: [1.5, 1.2, 2], target: [0, 0.5, 0] }); ``` loadGltf refuses files over 32 MiB or 2 million vertices by default, and the largest files here pass that, so add `maxBytes: 256 * 1024 * 1024, maxVertices: 8_000_000` next to `decoders` for those. ## Tested Every file was loaded and drawn (drawn pixels counted) in each engine, three.js 0.187.0 and Crucible 0.21.0, files from a local copy of this repository. | Tier | three.js WebGL | three.js WebGPU | Crucible | |---|---|---|---| | web | 199/200 | 199/200 | 199/200 | | engine | 199/200 | 199/200 | 199/200 | | collision | 199/200 | 199/200 | 199/200 | Blender 5.2 import: engine 200/200, objects 200/200, collision 200/200. Converter check: 10000/10000 passed. ## Licence and credit NVIDIA USDCraft-10K (https://huggingface.co/datasets/nvidia/USDCraft-10K), NVIDIA Corporation, Apache License 2.0. Paper: Zhang et al., USDCraft, arXiv:2610.11322. Licence: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0). Changes made: Converted from OpenUSD (PhysX stage) to GLB: each USD joint became a pivot node with its axis and limits in glTF extras, plus a JSON sidecar and one sweep animation per joint; meshes merged per part and material, welded and meshopt-compressed; textures re-encoded; collision shapes written as a separate GLB on the same joint tree. Source: https://huggingface.co/datasets/nvidia/USDCraft-10K. Packed by [CodePawl](https://huggingface.co/codepawl). Follow CodePawl on [X](https://x.com/anxuanng), [GitHub](https://github.com/codepawl), [Threads](https://www.threads.com/@codepawl) and [YouTube](https://www.youtube.com/@codepawlhq).