/kg-to-3d:kg-to-3dfrom kg-to-3d
Transforms a P&ID knowledge graph (graph.json) into a 3D Blender scene with layered instruments and control systems. Renders still images or short videos highlighting flow paths and control loops.
Ships in kg-to-3d. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill shows the drawing in volume. It does not rebuild the plant layout: a P&ID records what is connected to what, not where things stand. Say so whenever you present a render.
Work is split the same way as in pid-to-kg:
scripts/layout.py, plain Python) and build and render the scene
(scripts/build_scene.py, run inside Blender).The interface between the two scripts is references/scene_contract.md. Read it before changing either script.
Python 3.10+ with networkx (pip install -r <skill dir>/scripts/requirements.txt, in a virtual environment if the user's Python is shared).
Blender 4.2 or newer. Look for it in this order: the BLENDER environment variable, blender on the PATH,
~/opt/blender-*/blender, /Applications/Blender.app/Contents/MacOS/Blender,
C:\Program Files\Blender Foundation\Blender*\blender.exe. Check it with <blender> --version.
If none is found, offer to install it. Many users are engineers, not programmers: say in one sentence what you will install and where, and run the command only after the user agrees.
| System | Command |
|---|---|
| Windows | winget install BlenderFoundation.Blender (Windows may ask for administrator approval) |
| macOS | brew install --cask blender if Homebrew is present; otherwise point the user to the .dmg on blender.org |
| Linux | the official archive, no sudo: list https://download.blender.org/release/, take the latest LTS blender-<version>-linux-x64.tar.xz and its blender-<version>.sha256, check the archive with sha256sum -c --ignore-missing (the .sha256 file lists every platform), extract it into ~/opt/, then use ~/opt/blender-<version>-linux-x64/blender |
If the user declines, or the install fails, stop and say how to install it from blender.org.
ffmpeg for the video. Without it, deliver stills only and say why.
No graphics card is required: without one, renders fall back to Cycles on the CPU and the video takes much longer.
- [ ] 1. Inputs: find <kg dir> (graph.json, summary.md) and, if available, the pid-to-kg <work dir> (page images)
- [ ] 2. Choose: one flow path and one control loop worth showing (from summary.md)
- [ ] 3. Layout: python <skill dir>/scripts/layout.py <kg dir> --work <work dir> --out <out dir>
--path FROM TO --path-label "<question or title>" [--path FROM TO --path-label "..."] [--loop LOOP:<key>]
- [ ] 4. Stills: <blender> -b -P <skill dir>/scripts/build_scene.py -- <out dir>/scene.json --out <out dir> --stills
- [ ] 5. Review: open every still and fix what looks wrong (see Review)
- [ ] 6. Video: <blender> -b -P <skill dir>/scripts/build_scene.py -- <out dir>/scene.json --out <out dir> --video
- [ ] 7. Report: files, what the video shows, and the layout caveat
- [ ] 8. Web (optional): <blender> -b <out dir>/scene.blend -P <skill dir>/scripts/export_web.py -- <out dir>/scene.json
--out <web dir> --name path:1 "<short name>" [--name ...] [--credit TEXT --credit-url URL]
FEEDS edges in summary.md.
--path is repeatable, with one --path-label per path. The paths play in the order given, so put
the gas path (e.g. blower air) before the liquid path it acts on.gas when most of them name a gas
(air, oxygen, nitrogen, hydrogen, argon, CO2, steam, vapor, biogas), else liquid. A gas path is pale blue
and makes bubbles rise in the basins it reaches; a liquid path is amber.loop_type control or interlock).
A monitoring-only loop makes a weak animation. Without --loop, layout.py keeps one default loop: the
control, interlock or on_off loop with a final element and the longest chain. Pass --loop LOOP:<key> to
choose another.--path-label.Look at each still at full size, then zoomed on crowded areas. Fix before rendering the video:
Layout problems are fixed with layout.py options or in the scene file, not by editing the Blender script.
Give the paths of still_*.png, kg3d.mp4 (1080x1350) and kg3d_master.mp4 (2160x2700), and scene.blend.
Say which path and loop the video lights up, and repeat that positions come from the drawing, not from the plant.
Offer it when the user wants other people to explore the scene (a link in a post, a page for a team).
export_web.py writes a static folder (index.html, scene.glb, viewer.json, fonts) described in
references/web_contract.md: people orbit the model with a finger or a mouse and tap one button per path or loop.
--name (e.g. --name path:1 "Blower air").--credit and --credit-url.python -m http.server in the web folder, then open it at phone size (390x844) and desktop size.docs/ of a public
repository and --site-url gives the page address, so link previews show the poster (--poster).<out dir>/frames/, e.g. bubbles rising
in a basin) to that landscape ratio. Look at it before using it.assets/fonts/IBMPlexMono-LICENSE.txt (opens in a new tab)assets/fonts/IBMPlexMono-Medium.ttf (opens in a new tab)assets/fonts/Inter-LICENSE.txt (opens in a new tab)assets/fonts/Inter-Medium.ttf (opens in a new tab)assets/fonts/Inter-SemiBold.ttf (opens in a new tab)assets/web/index.html (opens in a new tab)assets/web/viewer.css (opens in a new tab)assets/web/viewer.js (opens in a new tab)references/scene_contract.md (opens in a new tab)references/web_contract.md (opens in a new tab)scripts/build_scene.py (opens in a new tab)scripts/export_web.py (opens in a new tab)scripts/layout.py (opens in a new tab)scripts/requirements.txt (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (atelierplatonai/kg-to-3d) — no native marketplace selected
npx claudepluginhub p/atelierplatonai-kg-to-3dOther plugins' skills for the same job