Spaces:
Running
Running
Add the Office scene; layouts without walls orbit from outside
Browse filesFiles changed (9)
47 unmodified lines4849505152535418 unmodified lines7374757677787947 unmodified lines[projectsim/scenes-and-worlds](https://huggingface.co/datasets/projectsim/scenes-and-worlds),listed in `tools/scenes.json`. `tools/make_scene_previews.py` downloads each scene's GLB andpreview image (read only, needs an HF token with access) and writes a smaller GLB to`previews/scenes/` and a thumbnail to `previews/thumbs/`.- The detail panel ends with Copy URL and Download. Download zips the asset's package folder inthe browser (files fetched from the dataset at the catalog's commit, `.metadata/` reports leftout); its menu also copies the `hf download` command. Scenes link to their gated dataset.18 unmodified lines# thumbnails: on a GPU machine with Isaac Sim 6.x and the package folders of the new assets# OMNI_KIT_ACCEPT_EULA=YES python isaac_thumbs.py <assets_dir> out env/small_hangar_02_2k.exr <asset> ...# then copy out/dark/*.webp to previews/thumbs/ and out/light/*.webp to previews/thumbs-light/HF_TOKEN=$(hf auth token) uv run tools/make_scene_previews.py # only when scenes changeHF_TOKEN=$(hf auth token) uv run tools/build_catalog.pyhf upload projectsim/simready-library . --repo-type space --commit-message "Update catalog"```47 unmodified lines48495051525354555618 unmodified lines7576777879808147 unmodified lines[projectsim/scenes-and-worlds](https://huggingface.co/datasets/projectsim/scenes-and-worlds),listed in `tools/scenes.json`. `tools/make_scene_previews.py` downloads each scene's GLB andpreview image (read only, needs an HF token with access) and writes a smaller GLB to`previews/scenes/` and a thumbnail to `previews/thumbs/` (name scenes to do only those). Ascene with `"room": false` is a layout without walls, so the 3D view orbits it from outsideinstead of standing inside a room.- The detail panel ends with Copy URL and Download. Download zips the asset's package folder inthe browser (files fetched from the dataset at the catalog's commit, `.metadata/` reports leftout); its menu also copies the `hf download` command. Scenes link to their gated dataset.18 unmodified lines# thumbnails: on a GPU machine with Isaac Sim 6.x and the package folders of the new assets# OMNI_KIT_ACCEPT_EULA=YES python isaac_thumbs.py <assets_dir> out env/small_hangar_02_2k.exr <asset> ...# then copy out/dark/*.webp to previews/thumbs/ and out/light/*.webp to previews/thumbs-light/HF_TOKEN=$(hf auth token) uv run tools/make_scene_previews.py [scene ...] # only when scenes changeHF_TOKEN=$(hf auth token) uv run tools/build_catalog.pyhf upload projectsim/simready-library . --repo-type space --commit-message "Update catalog"```
511 unmodified lines51251351451551651751817 unmodified lines53653753853954054154245 unmodified lines588589590591592593594511 unmodified lines} else {bar.append(el("span", { class: "hint" }, a.joints.length? "Drag a part to move it · drag empty space to orbit · scroll to zoom · right-drag to pan": a.kind === "scene" && !a.splat ? "Drag to look around · scroll to move in and out · right-drag to pan": "Drag to orbit · scroll to zoom · right-drag to pan"));}if (bar.childNodes.length) box.append(bar);17 unmodified lines["Dimensions", fmtDims(a)],["Objects", `${a.objects}, each its own USD asset`],["Triangles", a.triangles ? a.triangles.toLocaleString("en-US") : "—"],["Backdrop", a.splat ? "Gaussian splat (USDZ) around the room" : "Modelled room, no splat"],["Format", "OpenUSD scene for NVIDIA Isaac Sim, plus a GLB preview"],["License", "CC BY 4.0 · credit “projectsim by Kaedim”"],["Files", el("span", {}, files, el("br"), el("span", { class: "note" }, "Free: log in and answer 3 quick questions on the dataset page"))],45 unmodified linesrig = rigState.map((r) => ({ ...r }));} else {loadedId = a.id;rig = scene ? await v.load(signed(`previews/scenes/${a.scene}.glb`), null, { interior: !a.splat, enclosed: !a.splat }): await v.load(signed(`previews/${a.id}.glb`), signed(`previews/${a.id}.json`), mat ? { look: lookOf(a, currentMaterial(a)) } : {});if (state.asset !== a.id) return;}511 unmodified lines51251351451551651751817 unmodified lines53653753853954054154245 unmodified lines588589590591592593594511 unmodified lines} else {bar.append(el("span", { class: "hint" }, a.joints.length? "Drag a part to move it · drag empty space to orbit · scroll to zoom · right-drag to pan": a.kind === "scene" && !a.splat && a.room !== false ? "Drag to look around · scroll to move in and out · right-drag to pan": "Drag to orbit · scroll to zoom · right-drag to pan"));}if (bar.childNodes.length) box.append(bar);17 unmodified lines["Dimensions", fmtDims(a)],["Objects", `${a.objects}, each its own USD asset`],["Triangles", a.triangles ? a.triangles.toLocaleString("en-US") : "—"],["Backdrop", a.splat ? "Gaussian splat (USDZ) around the room" : a.room === false ? "None: furniture on a floor, no walls" : "Modelled room, no splat"],["Format", "OpenUSD scene for NVIDIA Isaac Sim, plus a GLB preview"],["License", "CC BY 4.0 · credit “projectsim by Kaedim”"],["Files", el("span", {}, files, el("br"), el("span", { class: "note" }, "Free: log in and answer 3 quick questions on the dataset page"))],45 unmodified linesrig = rigState.map((r) => ({ ...r }));} else {loadedId = a.id;rig = scene ? await v.load(signed(`previews/scenes/${a.scene}.glb`), null, { interior: !a.splat && a.room !== false, enclosed: !a.splat && a.room !== false }): await v.load(signed(`previews/${a.id}.glb`), signed(`previews/${a.id}.json`), mat ? { look: lookOf(a, currentMaterial(a)) } : {});if (state.asset !== a.id) return;}
82 unmodified lines83848586878882 unmodified lines</aside></div><script src="app.js?v=31"></script></body></html>82 unmodified lines83848586878882 unmodified lines</aside></div><script src="app.js?v=32"></script></body></html>
123version https://git-lfs.github.com/spec/v1oid sha256:bf66048037c235a2966020297eee4e544ea33e318b347301697e2db9db785d8asize 14949048187 unmodified lines188189190191192193194187 unmodified lines"class": "indoor scene", "qcode": None, "mass": None, "extents": s["extents"], "rigid_bodies": None,"joints": [], "mounted": False, "license": "CC-BY-4.0", "date": None, "version": None, "glass": False,"scene": s["scene"], "scene_dataset": cfg["dataset"], "objects": s["objects"], "triangles": s["triangles"],"splat": s["splat"], "summary": s["summary"],"preview": os.path.exists(os.path.join(previews, "scenes", f"{s['scene']}.glb")),"thumb": os.path.exists(os.path.join(previews, "thumbs", f"{s['id']}.webp")),} for s in cfg["scenes"]]187 unmodified lines188189190191192193194187 unmodified lines"class": "indoor scene", "qcode": None, "mass": None, "extents": s["extents"], "rigid_bodies": None,"joints": [], "mounted": False, "license": "CC-BY-4.0", "date": None, "version": None, "glass": False,"scene": s["scene"], "scene_dataset": cfg["dataset"], "objects": s["objects"], "triangles": s["triangles"],"splat": s["splat"], "room": s.get("room", True), "summary": s["summary"],"preview": os.path.exists(os.path.join(previews, "scenes", f"{s['scene']}.glb")),"thumb": os.path.exists(os.path.join(previews, "thumbs", f"{s['id']}.webp")),} for s in cfg["scenes"]]
8 unmodified lines910111213141521 unmodified lines37383940414243444546471 unmodified line495051525354558 unmodified linesBlender (tools/blender_scene_glb.py) into previews/scenes/<scene>.glb, and writes a960 px thumbnail to previews/thumbs/<id>.webp.Run from the Space folder: HF_TOKEN=$(hf auth token) uv run tools/make_scene_previews.py"""import argparse21 unmodified linesap = argparse.ArgumentParser()ap.add_argument("--blender", default="/Applications/Blender.app/Contents/MacOS/Blender")ap.add_argument("--max-texture", type=int, default=2048)args = ap.parse_args()cfg = json.load(open(os.path.join(HERE, "scenes.json")))os.makedirs("previews/scenes", exist_ok=True)os.makedirs("previews/thumbs", exist_ok=True)for s in cfg["scenes"]:base = f"{HF}/datasets/{cfg['dataset']}/resolve/main/scenes/{s['scene']}"with tempfile.TemporaryDirectory() as tmp:glb, png = os.path.join(tmp, "in.glb"), os.path.join(tmp, "preview.png")1 unmodified linedownload(f"{base}/preview.png", png)out = f"previews/scenes/{s['scene']}.glb"run = subprocess.run([args.blender, "-b", "--factory-startup", "--python",os.path.join(HERE, "blender_scene_glb.py"), "--", glb, out, str(args.max_texture)],capture_output=True, text=True)if "SCENE_OK" not in run.stdout:sys.exit(f"{s['scene']}: Blender failed\n{(run.stdout + run.stderr)[-800:]}")8 unmodified lines91011121314151621 unmodified lines38394041424344454647484950511 unmodified line53545556575859608 unmodified linesBlender (tools/blender_scene_glb.py) into previews/scenes/<scene>.glb, and writes a960 px thumbnail to previews/thumbs/<id>.webp.Run from the Space folder: HF_TOKEN=$(hf auth token) uv run tools/make_scene_previews.py [scene ...](no names: every scene; a scene's max_texture in scenes.json overrides --max-texture)"""import argparse21 unmodified linesap = argparse.ArgumentParser()ap.add_argument("--blender", default="/Applications/Blender.app/Contents/MacOS/Blender")ap.add_argument("--max-texture", type=int, default=2048)ap.add_argument("scenes", nargs="*", help="only these scenes (folder names); default all")args = ap.parse_args()cfg = json.load(open(os.path.join(HERE, "scenes.json")))os.makedirs("previews/scenes", exist_ok=True)os.makedirs("previews/thumbs", exist_ok=True)for s in cfg["scenes"]:if args.scenes and s["scene"] not in args.scenes:continuebase = f"{HF}/datasets/{cfg['dataset']}/resolve/main/scenes/{s['scene']}"with tempfile.TemporaryDirectory() as tmp:glb, png = os.path.join(tmp, "in.glb"), os.path.join(tmp, "preview.png")1 unmodified linedownload(f"{base}/preview.png", png)out = f"previews/scenes/{s['scene']}.glb"run = subprocess.run([args.blender, "-b", "--factory-startup", "--python",os.path.join(HERE, "blender_scene_glb.py"), "--", glb, out,str(s.get("max_texture", args.max_texture))],capture_output=True, text=True)if "SCENE_OK" not in run.stdout:sys.exit(f"{s['scene']}: Blender failed\n{(run.stdout + run.stderr)[-800:]}")
1234510 unmodified lines161718192021{"_comment": "Scenes shown in the Library (group 'Scenes'), from the gated dataset projectsim/scenes-and-worlds. tools/make_scene_previews.py makes previews/scenes/<scene>.glb and previews/thumbs/<id>.webp; build_catalog.py adds these entries to the catalog. extents are metres x, y (depth), z (height).","dataset": "projectsim/scenes-and-worlds","scenes": [{10 unmodified lines"id": "scene-garage", "scene": "garage", "name": "Garage","extents": [7.0, 6.0, 3.5], "objects": 40, "triangles": 840444, "splat": true,"summary": "A garage workshop with shelving, a work table, storage bins, a desk and tools, plus a Gaussian splat backdrop."}]}1234510 unmodified lines1617181920212223242526{"_comment": "Scenes shown in the Library (group 'Scenes'), from the gated dataset projectsim/scenes-and-worlds. tools/make_scene_previews.py makes previews/scenes/<scene>.glb and previews/thumbs/<id>.webp; build_catalog.py adds these entries to the catalog. extents are metres x, y (depth), z (height). room: false marks a layout without walls, which the viewer orbits from outside instead of standing inside; max_texture sets that scene's preview texture size (default 2048).","dataset": "projectsim/scenes-and-worlds","scenes": [{10 unmodified lines"id": "scene-garage", "scene": "garage", "name": "Garage","extents": [7.0, 6.0, 3.5], "objects": 40, "triangles": 840444, "splat": true,"summary": "A garage workshop with shelving, a work table, storage bins, a desk and tools, plus a Gaussian splat backdrop."},{"id": "scene-office", "scene": "office", "name": "Office","extents": [4.0, 3.2, 1.35], "objects": 48, "triangles": 895744, "splat": false, "room": false, "max_texture": 1024,"summary": "An open-plan office: two desk rows with monitors, chairs, drawer units and desk items, and a lounge corner with leather chairs, a side table and a fan. Furniture only, no walls."}]}
README.md+4-2
app.js+3-3
data/catalog.json
index.html+1-1
previews/scenes/office.glbAdded+3
previews/thumbs/scene-office.webpAdded
Large File Pointer Details
- SHA256: c057ec0fbbd0166e22ccabe8b97161df715ca73288de7535691bf7ec74ddc33f
- Pointer size: 130 Bytes
- Size of remote file: 30.1 kB
tools/build_catalog.py+1-1
tools/make_scene_previews.py+7-2
tools/scenes.json+6-1