Download task/single-software-execution/cli/blender/task-44/task-44.json from HongchengGao/EngiWorld-Tasks: direct link, hf CLI and curl.
- Browser
- Download file 5.24 kB
-
https://huggingface.co/datasets/HongchengGao/EngiWorld-Tasks/resolve/main/task/single-software-execution/cli/blender/task-44/task-44.json
- Command line
-
hf download hf://datasets/HongchengGao/EngiWorld-Tasks/task/single-software-execution/cli/blender/task-44/task-44.json
-
curl -L -o task-44.json https://huggingface.co/datasets/HongchengGao/EngiWorld-Tasks/resolve/main/task/single-software-execution/cli/blender/task-44/task-44.json
5.24 kB
| { | |
| "id": "single-software-execution--cli--blender--task-44--ubuntu", | |
| "snapshot": "Blender-4.2.3", | |
| "instruction": "Procedural city USD export. `/home/user/Desktop/scene.blend` contains an empty 20 x 20 BU ground plane at Z=0 (with a grey Principled BSDF material `Mat_Ground`), a camera at (15, -15, 20) aimed at the origin, and a sun light. Launch Blender by running `blender` from a terminal. Before starting the work, use `/opt/blender/blender` for Blender command-line or background runs when working on `scene.blend`.\n\nNo buildings yet. Units: METRIC / METERS. The initial scene is at `/home/user/Desktop/scene.blend`. Procedurally add 10 buildings, then export the whole scene to an ASCII USD file at `/home/user/Desktop/city.usda` with each building's \"material ID\" encoded as a `custom string material:purpose = \"<value>\"` attribute on its USD Material prim. ## City layout - 5 x 2 grid: X in {-8, -4, 0, 4, 8} and Y in {-4, +4} -> 10 plots. - Name the buildings `Building_00` ... `Building_09`. Column = i%5, row = i//5 (so Building_00 is at (-8, -4), Building_05 is at (-8, +4), etc.). - Each building is a scaled cube: - width = depth = 2.0 BU; - height from this list, indexed by building number: (3, 6, 9, 12, 4, 7, 10, 5, 8, 11) meters; - base sits on the ground (Z=0); center therefore at Z = height/2; top at Z = height. - Apply scale so the mesh carries real dimensions (not a unit cube with a scale modifier). ## Materials - Each `Building_XX` gets its own Principled BSDF material `Mat_Building_XX`. - Base colors are 10 distinct hues. - Tag each material with a custom property `material_purpose`: - even i (0, 2, 4, 6, 8) -> `\"residential\"` - odd i (1, 3, 5, 7, 9) -> `\"commercial\"` ## Vertex colors - Each `Building_XX` mesh has a POINT-domain FLOAT_COLOR attribute named `Col`, with every vertex painted a discrete material-ID color: - residential -> (0.2, 0.6, 0.3, 1) greenish - commercial -> (0.6, 0.3, 0.2, 1) brownish ## USD export - File path: `/home/user/Desktop/city.usda`. The `.usda` suffix forces Blender to write ASCII USD. - Export the scene to `/home/user/Desktop/city.usda` with materials, vertex colors, and USD preview surfaces included. ## Post-process: inject material:purpose into the USDA Blender's USD exporter doesn't automatically map custom properties on `bpy.types.Material` to USDA attributes, so you must post-process the emitted text file to inject the purpose tags. After export, for each `def Material \"Mat_Building_XX\"` block, insert a line `custom string material:purpose = \"<residential|commercial>\"` immediately inside the block's opening brace. A regex pass is sufficient: ```python import re purposes = {i: ('residential' if i % 2 == 0 else 'commercial') for i in range(10)} with open('/home/user/Desktop/city.usda') as fh: text = fh.read() for i in range(10): mat = f'Mat_Building_{i:02d}' pat = re.compile(rf'(def\\s+Material\\s+\"{mat}\"(?:[^{{]*?))(\\{{)', re.DOTALL) m = pat.search(text) inject = m.group(1) + m.group(2) + f'\\n custom string material:purpose = \"{purposes[i]}\"' text = text[:m.start()] + inject + text[m.end():] with open('/home/user/Desktop/city.usda', 'w') as fh: fh.write(text) ``` ## Requirements 1. `/home/user/Desktop/city.usda` exists. 2. First line starts with `#usda` (ASCII USD, not binary `.usdc`). 3. The file contains 10 `def Xform \"Building_XX\"` prims, with indices 00-09. 4. The file contains 10 `def Material \"Mat_Building_XX\"` prims, with indices 00-09. 5. `info:id = \"UsdPreviewSurface\"` appears at least 10 times (one per material). 6. `material:purpose` appears at least 10 times. 7. Parsing all `material:purpose` string values yields at least 2 distinct entries (e.g. `{residential, commercial}`). 8. `primvars:displayColor` is present (Blender emits this when `export_mesh_colors=True`). 9. Building height variation: parsing the `extent = [...]` blocks gives a set of Z-extents whose standard deviation is at least 2.0 -- or, as a fallback, the file carries at least 10 distinct `xformOp:scale` triplets.", | |
| "source": "https://docs.blender.org/manual/en/4.1/; https://docs.blender.org/api/4.1/; https://developer.blender.org/docs/release_notes/4.1/; https://openusd.org/release/index.html", | |
| "config": [ | |
| { | |
| "type": "upload_file", | |
| "parameters": { | |
| "files": [ | |
| { | |
| "local_path": "task-44/init_file/scene.blend", | |
| "path": "/home/user/Desktop/scene.blend" | |
| } | |
| ] | |
| } | |
| } | |
| ], | |
| "trajectory": "trajectories/", | |
| "related_apps": [ | |
| "blender" | |
| ], | |
| "artifact_paths": [ | |
| "/home/user/Desktop/city.usda" | |
| ], | |
| "evaluator": { | |
| "postconfig": [ | |
| { | |
| "type": "upload_file", | |
| "parameters": { | |
| "files": [ | |
| { | |
| "local_path": "task-44/eval.py", | |
| "path": "/home/user/Desktop/eval.py" | |
| } | |
| ] | |
| } | |
| } | |
| ], | |
| "func": "exact_match", | |
| "result": { | |
| "type": "vm_command_line", | |
| "command": "python3 /home/user/Desktop/eval.py", | |
| "shell": "true" | |
| }, | |
| "expected": { | |
| "type": "rule", | |
| "rules": { | |
| "expected": "True\n" | |
| } | |
| } | |
| }, | |
| "proxy": false, | |
| "fixed_ip": false, | |
| "possibility_of_env_change": "low" | |
| } | |