kenney-glb / README.md
anxuanng's picture
67js is now Crucible: package @codepawlhq/crucible, repo codepawl/crucible
baae8d7 verified
|
Raw History Blame Contribute Delete
5.24 kB
metadata
license: cc0-1.0
license_link: https://creativecommons.org/publicdomain/zero/1.0/
pretty_name: Kenney 3D Kits GLB
tags:
  - 3d
  - glb
  - gltf
  - low-poly
  - kenney
  - cc0
  - game-assets
  - threejs
  - webgpu
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*.parquet

Kenney 3D Kits as GLB

All 4451 3D models

Every 3D model from Kenney's CC0 kits as a ready-to-load GLB, in two tiers: a small web tier (meshopt geometry, WebP textures) and a plain engine tier with no decoder needed. Each row keeps the id used by the CodePawl free 3D assets MCP (kit slug and file name), the kit, the source page, triangle count, size in file units, animation clips and rig flag. By Kenney (https://kenney.nl), CC0.

4451 3D models from Kenney 3D kits by Kenney, 131.8 MB of source files packed into 38.1 MB of GLB (web tier). Credit: 3D models by Kenney (https://kenney.nl), CC0 1.0. Crediting Kenney is appreciated, not required..

Viewer: https://huggingface.co/spaces/codepawl/kenney-glb-viewer

Files

Folder Size What For
objects/ 38.1 MB meshopt geometry, WebP textures three.js, Babylon.js, any glTF viewer with the meshopt decoder
engine/ 122.2 MB no meshopt, no quantization Blender and desktop engines that cannot decode meshopt

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.

glTF extensions each tier uses (also per row in metadata.jsonl, field extensions):

  • web: EXT_meshopt_compression, EXT_texture_webp, KHR_materials_unlit, KHR_mesh_quantization, KHR_texture_transform
  • engine: KHR_materials_unlit, KHR_texture_transform

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 (12) 0.0 MB 1.3 MiB 156 193 ms 1.0 ms 7 ms

three.js WebGPU:

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/kenney-glb/resolve/main/objects/blaster-kit__blaster-a/blaster-kit__blaster-a.glb');

Use it in Crucible

Crucible loads these files as they are:

npm install @codepawlhq/crucible meshoptimizer
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/kenney-glb/resolve/main/objects/blaster-kit__blaster-a/blaster-kit__blaster-a.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] });

Tested

Every file was loaded and drawn (drawn pixels counted) in each engine, three.js 0.187.0 and 67js 0.19.0, files from a local copy of this repository.

Tier three.js WebGL three.js WebGPU 67js
web 120/120 120/120 119/120
engine 120/120 120/120 119/120

Blender 5.2 import: engine 120/120, objects 120/120.

Licence and credit

3D models by Kenney (https://kenney.nl), CC0 1.0. Crediting Kenney is appreciated, not required.. Licence: CC0-1.0 (https://creativecommons.org/publicdomain/zero/1.0/).

Changes made: Each model is the GLB from the kit's own download, unchanged in the engine tier; the web tier is the same model with meshopt geometry compression and WebP textures. Metadata (kit, size, triangle count, animation clips) is read from the GLB.

Source: https://kenney.nl/assets?q=3d. Packed by CodePawl.