Skip to content
Back to skills

Image To Relief Stl

ASecurity

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.

  • 33 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 5, 2026
toolsbash

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add dvcrn/openclaw-skills-marketplace --skill image-to-relief-stl --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Image To Relief Stl?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Image To Relief Stl
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dvcrn-image-to-relief-stl/badge)](https://www.skillsdirectory.com/skills/dvcrn-image-to-relief-stl)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: image-to-relief-stl
description: "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."
---

# 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
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
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 in this skill

  • SKILL.md1.5 KB
  • scripts/image_to_relief.py7.6 KB
  • scripts/image_to_relief.sh2.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…