跳至主要内容
小龙虾小龙虾AI
🤖

Render Stl Png

Render an STL file to a PNG image with a solid color using a deterministic software renderer and adjustable 3D perspective parameters.

下载1.7k
星标0
版本0.1.0
图像视频
安全通过

技能说明

render-stl-png

Render an STL to a PNG from a nice, consistent 3D angle ("Blender-ish" default perspective) with a solid color.

This is a deterministic software renderer:

  • No OpenGL
  • No Blender dependency
  • Uses a simple camera + z-buffer + Lambert shading

Inputs

  • STL file path (ASCII or binary)
  • Output PNG path

Parameters

  • --size <px>: image width/height (square), default 1024
  • --bg "#rrggbb": background color, default #0b0f14
  • --color "#rrggbb": mesh base color, default #4cc9f0
  • --azim-deg <deg>: camera azimuth around Z, default -35
  • --elev-deg <deg>: camera elevation, default 25
  • --fov-deg <deg>: perspective field of view, default 35
  • --margin <0..0.4>: framing margin as fraction of view, default 0.08
  • --light-dir "x,y,z": directional light vector, default -0.4,-0.3,1.0

Usage

One-shot

python3 scripts/render_stl_png.py \
  --stl /path/to/model.stl \
  --out /tmp/model.png \
  --color "#ffb703" \
  --bg "#0b0f14" \
  --size 1200

Wrapper (recommended)

The wrapper creates a cached venv (so pillow is available) and runs the renderer.

bash scripts/render_stl_png.sh /path/to/model.stl /tmp/model.png --color "#ffb703"

Notes

  • This is meant for marketing/preview images, not photorealism.
  • If you need studio lighting / materials, use Blender — but this gets you 80% quickly and reproducibly.

如何使用「Render Stl Png」?

  1. 打开小龙虾AI(Web 或 iOS App)
  2. 点击上方「立即使用」按钮,或在对话框中输入任务描述
  3. 小龙虾AI 会自动匹配并调用「Render Stl Png技能完成任务
  4. 结果即时呈现,支持继续对话优化

相关技能