[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-110834":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":21,"hasPages":21,"topics":23,"createdAt":9,"pushedAt":24,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":14,"starSnapshotCount":14,"syncStatus":15,"lastSyncTime":28,"discoverSource":29},110834,"image-to-sculpt","gokayfem\u002Fimage-to-sculpt","gokayfem","Turn one image of anything into a 3D sculpt measured against that image: registered views, map-fitting passes, Blender replay and timelapse. A skill for coding agents.",null,"Python",309,23,117,0,2,13,143,7,64.64,"MIT License",false,"main",[],"2026-11-08 21:35:03","2026-11-23 17:55:40","# Image 2 Sculpt\n\n**Turn one image of anything into a 3D sculpt that is measured against that image.** A skill for coding agents\n(Claude Code, Codex, Cursor, Copilot, Gemini) that fits a watertight sculpt to the image's own normals, outline\nand depth in the image's own camera, completes the unseen sides from generated views that must first agree with\neach other, and records every step of the build so Blender can replay it as a timelapse.\n\nThe next step after [Video 2 GLSL](https:\u002F\u002Fgithub.com\u002Fgokayfem\u002Fshader-skills),\n[Video 2 Blender Nodes](https:\u002F\u002Fgithub.com\u002Fgokayfem\u002Fvideo-to-blender),\n[Video 2 Physics](https:\u002F\u002Fgithub.com\u002Fgokayfem\u002Fvideo-to-physics) and\n[Video to CSS](https:\u002F\u002Fgithub.com\u002Fgokayfem\u002Fvideo-to-css). Those rebuild how a clip looks, moves and animates.\nThis one rebuilds the shape of what is in a picture, and shows the work.\n\n## Why\n\nAsk an agent for \"a 3D model of this\" and it either calls a black-box image-to-3D model or sculpts blind. Either\nway nobody can say how well the result matches the picture, and the usual failures go unnoticed:\n\n- the back of the subject is invented, and nothing checks it against anything;\n- generated side views are trusted at the angle that was asked for, though they are rarely there (views asked\n  for at +45°, +90° and −90° were really at +20°, −115° and +35° on the first case this was built on);\n- one bad generation (a changed pose, an extra limb) cuts real volume out of the model;\n- normals from different images are averaged, and noses, brows and knuckles flatten;\n- the surface turns into voxel staircases, moiré rings or webs between arm and body after a few edits;\n- the process is invisible: one mesh appears, with no record of how it got there.\n\nThis toolkit gives the agent a method and the tools to do it properly:\n\n- **The photo fixes what it sees.** MoGe gives its focal length and metric depth, Marigold its normals, BiRefNet\n  (or the alpha channel, or a SAM-3 text prompt) its mask. Where the photo sees a surface, the photo governs.\n- **Generated views are registered and screened, never trusted.** Each view's camera is found by search, not\n  taken from the prompt: left\u002Fright swaps are found, front\u002Fback is kept. A view that disagrees with the hull of\n  the others is rejected with its reason recorded.\n- **One view is held out.** Its camera is frozen before fitting and it never moves the surface; it is reported\n  apart from the views used to fit.\n- **Many small, recorded passes.** A visual hull, then forms → surface → detail: per-vertex targets from every\n  view's normals and outline and the photo's depth, symmetric targets where the subject has a mirror plane, a\n  stiff solve for outlines and a flexible one for normals. Then a silhouette cut to open gaps, an opening to\n  remove webs, polish passes. Each pass is a step in `build\u002Fsteps\u002F`.\n- **The volume stays exact.** An exact signed distance field after every operation: no staircases, no rings.\n- **Every map is checked.** For every view: silhouette IoU, outline distance, normal angle, roughness against the\n  reference's own roughness, and the photo's depth, side by side on a map sheet. Never one \"quality\" number.\n- **Blender replays the build.** Every recorded step rendered from the photo's camera, a 360° turntable, the\n  sculpt from every view's camera, a `.blend` with the photo as the camera background, and GLB\u002FOBJ\u002FSTL.\n\n## Any input\n\n\u003Cp align=\"center\">\u003Cimg src=\"gallery\u002Finputs.jpg\" width=\"100%\" alt=\"Three inputs: an AI character render, a photo of a glazed ceramic figurine, a bronze bust render\">\u003C\u002Fp>\n\n\u003Cp align=\"center\">\u003Csub>Three inputs the toolkit was developed on: an AI character render, a photo of a glazed figurine (reflective), a bronze bust render. One pipeline, no per-subject code.\u003C\u002Fsub>\u003C\u002Fp>\n\n| Input | What happens |\n|---|---|\n| An AI image or a 3D render of a character, creature, figurine or product | the main path |\n| A photo of a real object (figurine, toy, statue, product) | MoGe's metric focal length and depth anchor the scale |\n| A cut-out PNG with transparency | the alpha channel is the mask; no mask call |\n| A busy image with several things in it | `prep --select \"the red dragon\"`: SAM-3 picks the subject |\n| A drawing, sketch or flat illustration | `prep --restyle`: turned into a 3D render first, same pose and silhouette |\n| Several photos of the same object | `views --import DIR`: they replace generated views; angles from file names or found by registration |\n| Only an idea | `imagine OUT.png \"idea\"` makes a clean full-figure image to start from |\n| No API key | a cut-out PNG plus your own views; front-only works too (an inflated silhouette, depth guessed) |\n\nAny aspect ratio and size: the input is padded (never cropped) to the nearest aspect ratio the view generator\nsupports, so every view shares one lens. Units are normalised to the subject, so every tolerance transfers from a\n2 cm figurine photo to a 2 m statue render. Scenes and rooms, hair-thin structures and transparent or mirror\nmaterials are out of scope, and the skill says so before starting.\n\n## Install\n\n**Claude Code** (plugin marketplace):\n\n```bash\nclaude plugin marketplace add gokayfem\u002Fimage-to-sculpt\n```\n\n```bash\nclaude plugin install image-to-sculpt@image-to-sculpt\n```\n\nOr copy the skill: `cp -R skills\u002Fimage-to-sculpt ~\u002F.claude\u002Fskills\u002F`.\n\n**Codex, Cursor, Gemini CLI, Copilot and other agents** (via [skills](https:\u002F\u002Fgithub.com\u002Fvercel-labs\u002Fskills)):\n\n```bash\nnpx skills add gokayfem\u002Fimage-to-sculpt\n```\n\nOr install by hand:\n\n- **Codex:** copy `skills\u002Fimage-to-sculpt` to `~\u002F.agents\u002Fskills\u002F`.\n- **Cursor:** copy it to `~\u002F.cursor\u002Fskills\u002F`, plus the rule in `adapters\u002Fcursor\u002F`.\n- **Copilot:** `gh skill install gokayfem\u002Fimage-to-sculpt image-to-sculpt`, plus `adapters\u002Fcopilot\u002F`.\n- **Gemini CLI:** `gemini extensions install https:\u002F\u002Fgithub.com\u002Fgokayfem\u002Fimage-to-sculpt`.\n\n**claude.ai:** zip `skills\u002Fimage-to-sculpt` and upload it under Settings > Capabilities > Skills.\n\n**ChatGPT, Gemini Gems and other chat tools:** see [`adapters\u002F`](adapters\u002F).\n\nRequirements: Python 3.10+ with `numpy`, `scipy`, `scikit-image` and `Pillow` (`pip install -r requirements.txt`\nadds `fal-client` and `matplotlib`), Blender 5.2+ (`$BLENDER`, `blender` on PATH, or the macOS app) and `ffmpeg`\nfor the replay and films, and a fal API key in `FAL_KEY` for masks, depth, normals and generated views.\n`python3 skills\u002Fimage-to-sculpt\u002Fscripts\u002Fi2s.py doctor` checks all of it (the key is never printed).\n\n## Use\n\nAsk naturally, for example:\n\n- *\"Sculpt this figurine in 3D: `owl.jpg`.\"*\n- *\"Turn this character render into a printable model and show me how it was built.\"*\n- *\"Here are four photos of my statue. Make a mesh that matches them.\"*\n- *\"How well does this model match the concept art? Check it.\"*\n\nThe agent scaffolds a case, posts a labelled sheet at every checkpoint, and runs the stages:\n\n```bash\npython3 skills\u002Fimage-to-sculpt\u002Fscripts\u002Fi2s.py new cases\u002Fowl --input owl.jpg --subject \"carved wooden owl figurine\"\npython3 skills\u002Fimage-to-sculpt\u002Fscripts\u002Fi2s.py run cases\u002Fowl\n```\n\n`run` does everything after `new`. Each stage also runs on its own:\n\n| Command | What it does |\n|---|---|\n| `new` | scaffold a case: the input copied with its sha256, padded to a generator aspect ratio, contract and targets |\n| `prep` | front maps: mask, metric depth and focal length, normals; units normalised to the subject |\n| `views` | generated views (9 + 1 held out by default) with masks and normals, or `--import` your own |\n| `parts` | front-image regions from text prompts (\"hands\", \"face\") or boxes, for focused passes |\n| `hull` | register every view, re-centre, screen, carve the visual hull (every cut recorded), find the mirror plane |\n| `fit` | recorded map-fit passes: `forms`, `surface`, `detail`, `polish`, or `focus --region R` |\n| `cut`, `smooth` | open gaps the views show; remove webs, flaps and specks (optionally in a region) |\n| `check` | the map sheet and metrics for every view, the held-out view included |\n| `finish`, `blender`, `film` | final surface; Blender replay, turntable and views; timelapse, turntable, views sheet, hero image |\n| `report` | `REPORT.md`, the per-step chart and a static review page |\n| `demo` | the whole pipeline offline on a synthetic subject with known shape |\n\nEvery paid call goes through a per-case budget (`--budget`, estimated per call) and its request id is written to\n`case.json` before the result is awaited. A typical case costs about $2: 10 generated views with their masks and\nnormals, plus the photo's depth, normals and mask.\n\n## How a case runs\n\n| Phase | Deliverable | Checked by |\n|---|---|---|\n| Scaffold | `case.json`, `CONTRACT.md`, `acceptance.json`, the padded working image | written before any view exists |\n| Front maps | mask, metric depth, focal length, normals | a person looks at the mask and normal map |\n| Views | generated or imported views with masks and normals | a person looks at every view; screening |\n| Hull | registered cameras, the recorded carve, the mirror plane | IoU of every view against the hull of the others |\n| Fit | 38 recorded passes, a silhouette cut, an opening, 4 polish passes | every view's maps, every pass; the held-out view |\n| Check | map sheets, metrics per view | the targets in `acceptance.json`; a person reads the sheets |\n| Blender | replayed steps, turntable, view renders, `.blend`, GLB\u002FOBJ\u002FSTL | the views sheet: each view beside the sculpt from its camera |\n| Deliver | timelapse ending in a 360° turn, report, review page | a person decides whether to iterate |\n\nThe timelapse puts the reference beside the sculpt for every recorded step, from the first block through each\ncarve and pass, holds on the result, then turns the finished sculpt a full 360°. Its first frame is a finished\nthumbnail.\n\n## Verification\n\n| Check | Where | What it proves |\n|---|---|---|\n| Cameras and rasteriser | `tests\u002Ftest_geom.py` | projection round trips, orbits about the centre, rigid Blender cameras; a rasterised sphere matches the analytic depth (0.1\u002F1000) and normals (0.3°) |\n| Distance fields | `tests\u002Ftest_sdf.py` | fields stay exact (median 0.07 voxel, gradient norm 1); offsets move the surface by exactly the offset; opening removes a one-voxel web and keeps the ball; resampling keeps the surface |\n| Registration | `tests\u002Ftest_register.py` | a view asked for at 30° but taken at 72° is found at 72.0°; a back view stays a back view; a symmetric subject seen from behind and above is not taken for its front from below; the mirror plane is found at any yaw (25.0° for 25°); a changed pose scores 0.68 against 0.98 for a consistent view |\n| End to end | `tests\u002Ftest_pipeline.py` (`--slow`) | a synthetic figure with views 10° off their asked angles, noisy normals and one view with the arms raised: the bad view is rejected, every camera is recovered, the fit ends closer to the true shape than the hull, the held-out view agrees |\n\n```bash\npython3 tests\u002Frun_tests.py           # fast tests (~1 min)\npython3 tests\u002Frun_tests.py --slow    # + the end-to-end pipeline\n```\n\nCI (`.github\u002Fworkflows\u002Fchecks.yml`) runs both on Linux without fal, Blender or ffmpeg.\n\n## Layout\n\n```text\nskills\u002Fimage-to-sculpt\u002F   the skill: SKILL.md, references\u002F, templates\u002F, scripts\u002F (i2s CLI, library, Blender script)\ntests\u002F                    python3 tests\u002Frun_tests.py [--slow] (synthetic subjects with known shape)\nadapters\u002F                 prompts for assistants without skill support\ngallery\u002F                  README input images\n```\n\nCases and everything they produce live outside the repository (`cases\u002F` is git-ignored).\n\n## Credits\n\nSee [CREDITS.md](CREDITS.md). MIT licensed.\n","这是一个将单张图像精准重建为可验证3D雕刻模型的Python工具，专为编程智能体（如Claude、Copilot等）提供结构化3D建模能力。核心功能包括：基于输入图像的相机参数、法线与深度进行多视角配准与约束拟合；生成并严格筛选可信侧视图，拒绝不一致视角；分阶段执行视觉包络、表面拟合、细节增强等可追溯步骤；全程维护精确符号距离场（SDF），确保几何保真无阶梯化或伪影；完整记录每步操作供Blender回放与时间轴审查。适用于需可解释性、可验证性与过程透明度的AI辅助3D建模场景，如数字内容创作、教育演示或工业原型快速验证。","2026-11-24 04:39:43","CREATED_QUERY"]