Image To Relief Stl

Turn a source image (or multi-color mask image) into a 3D-printable bas-relief STL by mapping colors (or grayscale) to heights. Use when you have an image from an image-gen skill (nano-banana-pro, etc.) and want a real, printable model (STL) via a deterministic pipeline.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
2 · 2.1k · 2 current installs · 3 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the actual requirements: python3 plus potrace/mkbitmap are reasonable for raster processing and optional SVG preview. The included scripts implement a local heightfield→STL pipeline consistent with the description.
Instruction Scope
SKILL.md and scripts confine actions to converting the provided input image to STL and optionally generating a potrace SVG preview. The scripts read only the supplied input image, write the specified output files, and do not reference unrelated system files or external endpoints.
Install Mechanism
The install entries are apt/brew for potrace (a legitimate source for the required binaries). There are no obscure download URLs or archive extraction steps. The runtime creates a local Python venv and installs Pillow via pip (expected for image handling).
Credentials
No credentials or sensitive environment variables are requested. The scripts use XDG_CACHE_HOME or HOME to place a per-skill venv, which is reasonable and explained in the wrapper script.
Persistence & Privilege
The wrapper creates a persistent venv under ${XDG_CACHE_HOME:-$HOME/.cache}/agent-skills which survives across runs and will pip-install Pillow (network fetch). This is normal for convenience but means the skill will store installed packages on disk.
Assessment
This skill appears to do exactly what it says: convert an image to a bas-relief STL. Before installing, be aware that: (1) it expects potrace/mkbitmap available via apt or brew, (2) the wrapper will create a venv in ~/.cache (or $XDG_CACHE_HOME) and pip-install Pillow (which requires network access to PyPI), and (3) outputs are written to the paths you supply. If you’re comfortable allowing a local venv and a brief pip install, the skill is reasonable to use. If you prefer, you can preinstall Pillow and the potrace package to avoid the wrapper’s pip/network activity.

Like a lobster shell, security has layers — review code before you run it.

Current versionv0.1.0
Download zip
latestvk9717ehf5z3b2vyyr6zpsadqk580a4bp

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

Binspython3, potrace, mkbitmap

Install

Install potrace + mkbitmap (brew)
Bins: potrace, mkbitmap
brew install potrace

SKILL.md

image-to-relief-stl

Generate a watertight, printable STL from an input image by mapping colors (or grayscale) to heights.

This is an orchestrator-friendly workflow:

  • Use nano-banana-pro (or any image model) to generate a flat-color image.
  • Run this skill to convert it into a bas-relief model.

Practical constraints (to make it work well)

Ask the image model for:

  • exactly N solid colors (no gradients)
  • no shadows / no antialiasing
  • bold shapes with clear edges

That makes segmentation reliable.

Quick start (given an image)

bash scripts/image_to_relief.sh input.png --out out.stl \
  --mode palette \
  --palette '#000000=3.0,#ffffff=0.0' \
  --base 1.5 \
  --pixel 0.4

Grayscale mode

bash scripts/image_to_relief.sh input.png --out out.stl \
  --mode grayscale \
  --min-height 0.0 \
  --max-height 3.0 \
  --base 1.5 \
  --pixel 0.4

Outputs

  • out.stl (ASCII STL)
  • optional out-preview.svg (vector preview via potrace; best-effort)

Notes

  • This v0 uses a raster heightfield meshing approach (robust, no heavy CAD deps).
  • The --pixel parameter controls resolution (smaller = higher detail, bigger STL).

Files

3 total
Select a file
Select a file to preview.

Comments

Loading comments…