[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-108440":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":14,"starSnapshotCount":14,"syncStatus":15,"lastSyncTime":29,"discoverSource":30},108440,"anykit","apekshik\u002Fanykit","apekshik","AnyKit: cohesive, production-ready 3D prop kits from style references, built by an AI agent on fal.",null,"Python",136,12,67,0,2,38,52,11,71.44,"MIT License",false,"main",true,[],"2026-11-01 23:00:10","2026-11-23 19:29:28","# AnyKit: cohesive, production-ready 3D prop kits from style references\n\nPart of a family: [AnyScene](https:\u002F\u002Fgithub.com\u002Fapekshik\u002Fanyscene) builds whole sets, AnyKit builds the props that go\nin them, and [AnyShot](https:\u002F\u002Fgithub.com\u002Fapekshik\u002Fanyshot) shoots the result.\n\nGive AnyKit one to four style reference images (and, if you like, a prompt, an item list and a few dials). A Claude\nagent builds a **kit**: a set of static 3D props in that one style, at real-world scale, ready to drop into a game\nengine or a Blender scene. Each item comes back as a GLB plus a LOD1, with a thumbnail; the kit comes with a Blender\nasset library (`kit.blend`), a lineup render with a scale bar, a `kit.json` manifest and a zip of everything.\n\n## Why: raw Meshy and Tripo output isn't production-ready\n\nImage-to-3D models are good, but what they hand back is a single mesh in its own world: random orientation, no real\nsize, glass baked opaque, real brands on the labels, millions of triangles, and no relation to the next item you\ngenerate. Ten of them side by side don't look like one set. AnyKit is the art department that fixes that, item by item\nand as a whole:\n\n| Raw generator output | What AnyKit does |\n|---|---|\n| Ten props, ten different styles | **Cohesion**: every item's reference is generated from your style images with one shared style paragraph (era, palette, materials, wear, one fictional maker); all references are checked together on one sheet before any 3D, and outliers are regenerated |\n| No real size: a mug as big as a fridge | **Real-world scale**: every item gets a looked-up real height (or dims for boxy things), metres, bottom-centre origin, checked in a lineup with a scale bar |\n| Every model faces a different way | **Orientation normalized** to front -Y: Meshy already faces -Y; Tripo faces +X *and* hides a 20-30 deg rotation in its glTF node to match the photo's three-quarter view, which is dropped before the mesh is turned |\n| Glass baked opaque | **Opaque glass made transmissive**, masked so labels and contents stay opaque |\n| Real brands on labels, even when told not to | **Brands painted out** (texels and normal map) or the item regenerated with the kit's fictional maker |\n| ~2M triangles, 4K textures | **Triangle budgets** per item from the `detail` dial, textures at 2K or less, plus a **LOD1** at about a quarter |\n| One generator for everything | **A per-item generator choice**: every item goes through both Meshy 7.1 and Tripo H3.1, and the pick is made by looking at same-light beauty and clay renders. Meshy wins about 70% (small items, sharp printed labels); Tripo wins big hard-surface items where real geometry matters |\n| Nobody checks the set | **A critic that judges the set**: an independent Claude reviewer scores the lineup and thumbnails against your references (cohesion, fidelity, brief, mesh, texture, assembly, scale, labels) and the agent keeps fixing until it passes |\n\n## AnyKit or AnyScene?\n\n| | AnyScene | AnyKit |\n|---|---|---|\n| Builds | a whole set: room, dressing, lights, haze, cameras | granular props, one style, to drop into **your** scenes |\n| Output | a dressed `scene.blend`, stills, walkthroughs | per-item GLB + LOD1, `kit.blend` asset library, lineup |\n| Typical cost | about $100 | about $25 |\n| Typical time | 1-2 hours | 25-40 minutes |\n\nSame agent harness, same generators, same storage layout: deployed on one fal account they share image layers, an\nOptiX cache and the `\u002Fdata` volume.\n\n## How it works\n\n```\nrequest ─▶ AnyKitApp (app.py, fal, 1 GPU)\n           ├ fetch the style references, make the workspace\n           └ Claude agent (agent\u002Fkit_builder.py, agent\u002FPROMPT.md, agent\u002FKIT.md)\n               plan the kit: items, real sizes, one shared style paragraph\n               references: GPT Image edit with your images as input (kit\u002Fgen.mjs), checked on one sheet\n               3D: every reference to Tripo H3.1 AND Meshy 7.1 at once (generate\u002Ffal.mjs)\n               as meshes land: same-light compare, pick, normalize + LOD1 in one Blender session (kit\u002Ftools\u002F)\n               fixes by script: glass, screens, brands, parts that should be connected\n               lineup + thumbnails ─▶ critique ─▶ fix ─▶ critique ... until it passes\n               kit.blend asset library\n           └ per-item GLBs, kit.blend, lineup, kit.json, package zip ─▶ response\n```\n\nThe agent is Claude Code driven through the Claude Agent SDK, with its instructions (`agent\u002FPROMPT.md`) appended to\nthe system prompt and `KIT.md` in its workspace. `agent\u002Fkit_builder.py` runs it: a `report` tool for stage events, a\n`critique` tool (the kit critic), hooks that stream every tool call, a 20-second heartbeat, a Stop hook that keeps it\ngoing until every deliverable exists and the critic passes, a guard that stops it before fal's 2-hour request limit\nso the app can still deliver, and session resume when the SDK session breaks. It is not a fixed pipeline: the tools in\n`kit\u002Ftools\u002F` are starting points, and the agent writes scripts for whatever it sees wrong.\n\nEach request is retry-safe: an identical request (same references, prompt, items, dials and effort) returns the\nfinished kit, attaches to the attempt still running, or resumes a dead one in place, without paying again for\ngenerations already on disk. The retry index lives under `\u002Fdata\u002Fanyscene\u002Fkit\u002F_index`.\n\n## Repository\n\n```\napp.py              the fal app (AnyKitApp): \u002Fref2kit (alias \u002Fkit), \u002Fkits, \u002Fkit_events, \u002Fsmoke; retry index, packaging\nclient.py           the command-line client\nagent\u002F\n  kit_builder.py    the agent harness (Claude Agent SDK), the kit critic, the workspace, the definition of done\n  llm.py            the critic's Claude client (OpenRouter or the Anthropic API)\n  PROMPT.md         the agent's instructions: the job, deliverables, dials, speed, the critic, reporting\n  KIT.md            what makes a kit good, and the per-item process with every gotcha (in the agent's workspace)\n  gallery.py        the kit gallery behind \u002Fkits and \u002Fkit_events (synced from AnyScene)\n  blender_gpu.py    forces Cycles onto the GPU in every Blender the agent starts (synced from AnyScene)\nkit\u002F\n  gen.mjs           style-conditioned item references: GPT Image edit with the style images as input\n  tools\u002F            compare.py (Tripo vs Meshy sheets), normalize.py (prep + LOD1 + kit.json), present.py (lineup,\n                    thumbnails, turntables), library.py (kit.blend)\ngenerate\u002Ffal.mjs    fal client: images and image-to-3D (Tripo H3.1, Meshy 7.1), with a spend log (synced from AnyScene)\npipeline\u002F           env.sh (finds Blender and ffmpeg), gpu_run.sh (one Blender GPU job at a time) (synced from AnyScene)\nscripts\u002F            sync_from_anyscene.py: refresh the synced files from a sibling ..\u002Fanyscene checkout\nexamples\u002F           dai_pai_dong.jpg: a style reference to try (AI-generated)\n```\n\nThe files marked \"synced from AnyScene\" carry a header naming their source. Their home is AnyScene; edit them there,\nthen run `python scripts\u002Fsync_from_anyscene.py` with AnyScene checked out next to this repo.\n\n## Deploy your own\n\nYou need a fal account with Serverless access and an [OpenRouter](https:\u002F\u002Fopenrouter.ai) or Anthropic API key. Run\nevery command from the repository root.\n\n1. **Secrets.** fal secrets are shared by every app on the account, so set each once:\n\n   ```bash\n   fal secrets set OPENROUTER_API_KEY=...     # Claude through OpenRouter (or ANTHROPIC_API_KEY=... for the Anthropic API)\n   fal secrets set FAL_KEY=...                # a fal key of this account: generation (GPT Image, Tripo, Meshy) and uploads\n   ```\n\n   With both OPENROUTER_API_KEY and ANTHROPIC_API_KEY set, OpenRouter is used.\n\n2. **Deploy:**\n\n   ```bash\n   fal deploy app.py::AnyKitApp --app-name anykit --auth private\n   ```\n\n   Requirements are listed on the app class (`fal==1.84.0`, `claude-agent-sdk==0.2.176`, `anthropic`, `pydantic`,\n   `pillow`, `fal-client`); the deploying Python needs the same packages, e.g.\n\n   ```bash\n   uv run --python 3.13 --with fal==1.84.0 --with pydantic --with anthropic --with pillow --with fal-client \\\n       --with claude-agent-sdk==0.2.176 fal deploy app.py::AnyKitApp --app-name anykit --auth private\n   ```\n\n   The worker image installs Blender 5.0.1, ffmpeg and node, and runs on an RTX 5090 (or an RTX PRO 6000).\n   `request_timeout` is 7200 s (fal's cap): the agent stops itself at 110 minutes to deliver what it has, and a retried\n   request resumes the kit.\n\n3. **Check it** (a couple of minutes, a few cents): `\u002Fsmoke` checks the container (Blender, node, ffmpeg, the GPU),\n   starts the agent once and calls the critic.\n\n   ```bash\n   export ANYKIT_APP=\u003Cyour-fal-username>\u002Fanykit FAL_KEY=...\n   python client.py smoke\n   ```\n\nStorage: kits, their workspaces and the retry index live under `\u002Fdata\u002Fanyscene\u002Fkit\u002F` on the account's persistent\n`\u002Fdata` volume, and the OptiX kernel cache at `\u002Fdata\u002Fanyscene\u002Fcache\u002Foptix7cache.db`. These are AnyScene's paths on\npurpose: deployed next to AnyScene, the two share the cache, and kits built before AnyKit had its own repo stay in the\ngallery.\n\n## API\n\n### `POST \u002Fref2kit` (alias `\u002Fkit`)\n\n```jsonc\n{\n  \"reference_image_urls\": [\"https:\u002F\u002F...\"],   \u002F\u002F 1-4 style references (required); more than 4 are ignored\n  \"prompt\": \"1970s mission-control desk clutter, 8-10 items\",   \u002F\u002F optional\n  \"items\": [\"rotary desk phone\", \"ashtray\"], \u002F\u002F optional: built exactly, in this order\n  \"dials\": { \"count\": 9, \"wear\": 0.4 },      \u002F\u002F optional, see Dials\n  \"effort\": \"medium\",                        \u002F\u002F agent effort: low | medium (default) | high | xhigh | max\n  \"fresh\": false                             \u002F\u002F build again even if an identical request already finished\n}\n```\n\nResponse:\n\n```jsonc\n{\n  \"kit_id\": \"k_3f9a1c2b7d\",\n  \"name\": \"Apollo-era flight desk\",\n  \"style\": \"one paragraph: era, palette, materials, wear, fictional maker\",\n  \"items\": [\n    {\n      \"id\": \"rotary_phone\",\n      \"label\": \"Rotary desk phone\",\n      \"dims_m\": [0.22, 0.24, 0.13],        \u002F\u002F width x (X), depth y (Y), height z (Z), metres\n      \"tris\": 98000, \"tris_lod1\": 24500,\n      \"generator\": \"meshy\",                \u002F\u002F meshy | tripo-h31 (the pick)\n      \"why\": \"sharper dial numerals; Tripo fused the handset to the cradle\",\n      \"glb_url\": \"https:\u002F\u002F...\",            \u002F\u002F LOD0: metres, bottom-centre origin, front faces -Y, textures \u003C= 2K\n      \"lod1_url\": \"https:\u002F\u002F...\",\n      \"thumb_url\": \"https:\u002F\u002F...\",          \u002F\u002F three-quarter front\n      \"turntable_url\": null                \u002F\u002F mp4, when the agent made one\n    }\n  ],\n  \"lineup_url\": \"https:\u002F\u002F...\",             \u002F\u002F every item on a neutral ground, labels, scale bar\n  \"kit_blend_url\": \"https:\u002F\u002F...\",          \u002F\u002F asset library: every item marked as an asset, LOD1s in a hidden collection\n  \"kit_json_url\": \"https:\u002F\u002F...\",           \u002F\u002F the items above + tags and the fixes made per item\n  \"package_url\": \"https:\u002F\u002F...\",            \u002F\u002F zip: out\u002F (GLBs, renders, kit.blend, kit.json, dials.json, critique\u002F),\n                                           \u002F\u002F      scenes\u002Fkit\u002F (the agent's scripts, NOTES.md), refs\u002Fkit\u002F (item references)\n  \"critiques\": [\n    { \"round\": 1, \"passed\": false, \"summary\": \"...\", \"fixes\": [\"...\"],\n      \"scores\": { \"cohesion\": 7, \"reference_fidelity\": 8, \"brief\": 8, \"mesh_quality\": 6,\n                  \"texture_quality\": 7, \"assembly\": 7, \"scale\": 8, \"labels\": 6 } }\n  ],\n  \"dials\": { \"wear\": { \"value\": 0.4, \"source\": \"customer\", \"means\": \"scuffed bakelite, worn paint on edges\" } },\n  \"missing\": [],                           \u002F\u002F deliverables not produced (empty when complete)\n  \"agent_cost_usd\": 4.1,                   \u002F\u002F the Claude agent\n  \"generation_cost_usd\": 17.3,             \u002F\u002F fal generation, estimated from the spend log\n  \"minutes\": 31.0\n}\n```\n\nThe kit passes when no critic score is below 6 and the average is 7 or more: a production-ready base that a studio's\nartists then refine, judged at normal viewing distance, with the reference setting the world rather than designs to\ncopy. The critic gets at most 8 rounds; a kit stopped at the time cap, after its 8th round, or after three rounds\nwithout improvement is still returned, with the last critique and `missing` saying what is short.\n\n### Dials\n\nPlain settings the agent builds to. A dial that is set is an instruction, even when the reference says otherwise. A\ndial left out gets ONE value read from the references and prompt. The values used come back in the response's\n`dials`, each with its `source` (`customer` or `reference`) and what it meant for this kit.\n\n| Dial | Range | Controls |\n|---|---|---|\n| `count` | integer | how many items (default: the item list's length, else the prompt, else 8) |\n| `variety` | 0 - 1 | 0 = variations of one object family (matching mugs, jars); 1 = a broad mix that only shares the style |\n| `detail` | `low` \\| `medium` \\| `high` | per-item budget: low \u003C= 20k tris, 1K textures; medium \u003C= 100k, 2K; high \u003C= 200k, 2K. LOD1 is about a quarter |\n| `wear` | 0 pristine - 1 decayed | dirt, scratches, chips, fading |\n| `wetness` | 0 dry - 1 soaked | water on surfaces |\n| `warmth` | -1 cold - 1 warm | palette colour temperature and the presentation light |\n| `look` | `clean` \\| `cinematic` \\| `gritty` \\| `vintage` | surface finish and the presentation renders' grade |\n\n### Live progress\n\nThe agent streams its progress as `ANYSCENE_STAGE {json}` lines in the request's logs (`with_logs=true` on the\nqueue's status call). Each event has `t` (seconds), `stage`, `status` (`running` \u002F `done` \u002F `failed`), `message`,\nand optionally a `preview_url`. Milestones are `plan`, `references`, `models`, `picks`, `prep`, `fixes`, `lineup`,\n`critique`, `finals`, `done`, with retakes allowed; around them come `received`, `log` (one per tool call), `thinking`,\n`heartbeat` (every 20 s, with the milestones so far), `error`, and `packaged` last. The prefix is shared with AnyScene\nand AnyShot so any of them can relay the others' events.\n\n### Gallery: `POST \u002Fkits`, `POST \u002Fkit_events`\n\nKits are read from the app's storage, not the fal queue, so anyone with access to the app sees every kit:\n\n- `\u002Fkits` `{\"limit\": 200}`: every kit, newest first: `{\"builds\": [{\"id\", \"status\", \"passed\", \"prompt\",\n  \"reference_urls\", \"dials\", \"name\", \"critic_rounds\", \"last_scores\", \"minutes\", \"cover\", \"previews\", \"package_url\",\n  ...}], \"total\", \"now\"}`.\n- `\u002Fkit_events` `{\"kit_id\": \"k_...\", \"after\": 0}`: one kit's stage events from byte offset `after` (then the previous\n  call's `next`), its summary, and on the last page of a finished kit its response.\n\n### Cost and time\n\nIn earlier runs (one style reference, 10 items, effort `medium`) a kit took **about 25-40 minutes and about $25\nall-in**: roughly $17-18 of fal generation (a style-conditioned reference plus both Tripo and Meshy per item, about\n$1.70 an item) and $3-6 of Claude, plus the GPU worker's time. Use the queue, not a synchronous call.\n\n### curl\n\n```bash\n# submit (any image URL works; client.py uploads local files to fal storage)\ncurl -s https:\u002F\u002Fqueue.fal.run\u002F\u003Cyour-fal-username>\u002Fanykit\u002Fref2kit \\\n  -H \"Authorization: Key $FAL_KEY\" -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n        \"reference_image_urls\": [\"https:\u002F\u002Fexample.com\u002Fmy_style_reference.jpg\"],\n        \"prompt\": \"Hong Kong dai pai dong street kitchen and table goods\",\n        \"dials\": {\"count\": 10, \"wear\": 0.6}\n      }'\n# -> {\"request_id\": \"...\", \"status_url\": \"...\u002Frequests\u002F\u003Cid>\u002Fstatus\", \"response_url\": \"...\u002Frequests\u002F\u003Cid>\"}\n\ncurl -s \"https:\u002F\u002Fqueue.fal.run\u002F\u003Cyour-fal-username>\u002Fanykit\u002Frequests\u002F\u003Cid>\u002Fstatus?logs=1\" -H \"Authorization: Key $FAL_KEY\"\ncurl -s \"https:\u002F\u002Fqueue.fal.run\u002F\u003Cyour-fal-username>\u002Fanykit\u002Frequests\u002F\u003Cid>\" -H \"Authorization: Key $FAL_KEY\"\n```\n\n### Python\n\n```python\nimport fal_client  # FAL_KEY in the environment\n\nref = fal_client.upload_file(\"examples\u002Fdai_pai_dong.jpg\")\nres = fal_client.subscribe(\n    \"\u003Cyour-fal-username>\u002Fanykit\u002Fref2kit\",\n    arguments={\"reference_image_urls\": [ref], \"prompt\": \"Hong Kong dai pai dong street kitchen and table goods\",\n               \"dials\": {\"count\": 10}},\n    with_logs=True,\n    on_queue_update=lambda u: [print(l[\"message\"]) for l in getattr(u, \"logs\", None) or []],\n    client_timeout=3 * 3600,\n)\nprint(res[\"lineup_url\"], [it[\"glb_url\"] for it in res[\"items\"]])\n```\n\n### Command line\n\n`client.py` uploads local images, prints the agent's live log and saves the response, the lineup and the thumbnails:\n\n```bash\npip install fal-client                     # or prefix the commands with: uv run --with fal-client\nexport FAL_KEY=... ANYKIT_APP=\u003Cyour-fal-username>\u002Fanykit\npython client.py kit examples\u002Fdai_pai_dong.jpg --prompt \"Hong Kong dai pai dong street kitchen and table goods\" \\\n    --dial count=10 --dial wear=0.6 --out kit_out\npython client.py kit ref_a.png ref_b.png --items \"rotary desk phone,ashtray,ring binder\" --dial detail=low\npython client.py smoke\n```\n\n`--app \u003Cowner>\u002F\u003Capp>` overrides `ANYKIT_APP`. Results land in `--out` (default `kit_out\u002F`): `kit.json` (the\nresponse), `events.jsonl`, `lineup.png` and `thumb_\u003Cid>.png`.\n\n### Run the agent locally\n\nWith Blender 5.0+, node 20+ and ffmpeg on your PATH, and `FAL_KEY` plus `OPENROUTER_API_KEY` (or `ANTHROPIC_API_KEY`)\nin your environment:\n\n```bash\nuv run --python 3.13 --with claude-agent-sdk --with anthropic --with pydantic --with pillow \\\n    python agent\u002Fkit_builder.py examples\u002Fdai_pai_dong.jpg --work ..\u002Fmy_kit --prompt \"street kitchen goods\"\n```\n\n## License\n\nMIT, see [LICENSE](LICENSE). `examples\u002Fdai_pai_dong.jpg` is an AI-generated image made for this project.\n","AnyKit 是一个面向生产环境的 AI 驱动 3D 道具套件生成工具，可基于 1–4 张风格参考图自动生成风格统一、尺寸准确、工程就绪的静态 3D 道具集合。其核心功能包括：跨道具风格一致性控制（共享时代\u002F材质\u002F磨损等语义描述）、真实世界尺度校准（自动匹配标准尺寸并统一原点与朝向）、玻璃材质透射化处理、品牌标识去除、三角面数与纹理分辨率可控（支持 LOD1）、以及基于多模型对比（Meshy\u002FTripo）与 Claude 代理评审的闭环优化流程。输出为 GLB+LOD1、Blender 资产库（.blend）、清单文件（kit.json）及渲染预览，适用于游戏开发、虚拟制片、3D 场景快速搭建等需批量生成风格化道具的工业级流程。","2026-11-24 04:34:13","CREATED_QUERY"]