model-from-reference
Model a building, object or set in a 3D app (Blender, Maya or Houdini) so that it matches a reference photo — the way a 3D artist does it - measure the photo…
от szprivate★ 53 звезды на GitHub
Установить model-from-reference в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Model from a reference photo
Two tools do the work (in the dcc tool pack: load_tools("dcc") if they are not in your list):
dcc_build runs your one build script in the app, dcc_silhouette_check checks the proportions by
numbers. You may NOT replace either with live edits or with judging by eye.
| app | live (the app the user has open) | batch (a fresh headless process, saves a scene file) |
|---|---|---|
| Blender (Z up) | yes, through the Blender MCP add-on (port 9876) | blender -b, saves a .blend |
| Maya (Y up) | yes, if its commandPort is open (port 7001) | mayapy, saves a .ma |
| Houdini (Y up) | no: batch only | hython, saves a .hip |
mode="live" changes the scene the user is looking at; mode="batch" never touches it. Prefer live in Blender
when the user has it open, batch otherwise. Coordinates are always the app's own (Blender Z up, Maya and
Houdini Y up): the build script, the camera and the check points all use the same ones.
The order is the whole method. Never build geometry and materials in one go: when the proportions are wrong, every material, every detail and every light has to be redone with them. Work in stages, and do not leave a stage until its check passes.
| stage | what you do | leave it when |
|---|---|---|
| 1 Measure | read positions off the photo, turn them into metres | a dimension table exists |
| 2 Camera | match the photo's camera before any geometry | horizon and frame match |
| 3 Blockout | plain grey boxes and slabs, no detail, no colour | dcc_silhouette_check passes (the gate) |
| 4 Detail | windows, railings, bracing, trim, props | the check still passes |
| 5 Look | materials, sun, sky, final render | colours and light match |
One build script, rebuilt every pass
Keep the whole model in ONE Python file, output/scripts/<name>_build.py (write it with
write_text_file). At its top, every dimension is a named constant with a comment saying
where it came from (DECK_Z = 3.3 # deck top: 0.22 of image height above the sand line).
The script first deletes its own collection, then builds everything from the constants.
Put a # --- DETAIL --- line in the script: everything above it is the block-out (constants, camera, masses),
everything below is detail and look. EVERY pass goes through dcc_build with that one file. Never run the geometry with
execute_blender_code or any other live call:
dcc_build(script_path="<abs path>/output/scripts/<name>_build.py", app="blender", mode="live",
stage="blockout", render_to="<abs path>/output/<name>_blockout.png", render_engine="fast", resolution="800x600")
Set stage on every build: blockout (always allowed), detail, look. detail and look are gated: the build is
refused, nothing runs, unless the last dcc_silhouette_check(script_path=<this script>) passed AND the script above
the # --- DETAIL --- line is unchanged since (edits below it never need a re-check; with no marker any edit does).
The refusal lists the failing points and hints: fix the block-out constants, rebuild with stage="blockout", check
again. force_reason="<sentence>" overrides the gate and is shown to the user in the result (gate.forced). Use it
only when a point is truly unmeasurable (hidden in the photo), and say which point and why. Never to get past a
failing check, and never because the remaining misses "look small".
It runs the whole file, returns the script's own error line if it fails (fix the constant or the line, run
again), the objects it made, and a fast render (Blender Workbench, Maya hardware, Houdini OpenGL). In batch
mode add save_to (or take the default) and keep the saved path it returns: the check and later renders open it.
render_engine="final" is Cycles / Arnold / Karma, for stage 5 only.
A correction is a changed constant and a re-run: the scene is rebuilt clean every time.
The Blender MCP tools (execute_blender_code, get_objects_summary, screenshots) are for INSPECTING only:
reading a bounding box, listing what is there. Never patch the scene object by object over many calls;
leftovers pile up (stray blocks, doubled parts) and you lose track of what is really there. If the scene is
wrong, change the script and call dcc_build again.
1 Measure the photo
get_image_resolutionon the reference; note its aspect ratio.- Make a measuring copy with
run_script: draw a labelled grid every 5 % of width and height over the photo (PIL), save it as<name>_grid.jpg. - Look at the grid copy yourself (
analyze_image(mode='full')) and read positions as fractions of the image: ground contact line, deck/floor line, eaves, ridge, top of mast, left and right extents of each part, the horizon line. - Pick ONE scale anchor of known size, two points on it: a railing height (~1.0 m), a door (~2.0 m), a step (~0.18 m), a person (~1.75 m), a storey (~2.7 m).
- Measure it in 3D with `measure_reference(image_path, points, pairs, anchor={"pair": [nameA, nameB], "
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
dcc_build - 02
dcc_silhouette_check - 03
measure_reference - 04
reverse_image_search - 05
blender__execute_blender_code - 06
blender__render_viewport_to_path - 07
blender__get_objects_summary - 08
blender__get_screenshot_of_window_as_image - 09
analyze_image - 10
get_image_resolution - 11
run_script - 12
write_text_file - 13
read_text_file - 14
show_in_panel
FAQ
Что делает скилл model-from-reference?
Model a building, object or set in a 3D app (Blender, Maya or Houdini) so that it matches a reference photo — the way a 3D artist does it - measure the photo, match the camera, block out grey shapes until the silhouette and proportions match, THEN details, THEN materials and light. Use for "model this house / object / room in Blender from this photo", "rebuild this in 3D", "make a 3D version of this picture", "match this reference in Blender".
Как установить скилл model-from-reference?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл model-from-reference запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…