3d Image Renderer 标志

3d Image Renderer

社区
hassancs91
3d-image-renderer

通过构建真实的 Three.js 3D 场景并在无头模式下截取单帧,生成 PNG 图像;不涉及图像模型。输入文本提示词和宽高比(1:1、16:9 或 9:16),即可生成渲染后的 PNG。用户要求使用此系统生成、创建或渲染图像、图片、场景、壁纸、缩略图背景或产品图时,均可使用此技能;尤其适用于“生成一张……的图片”“渲染一个场景”“创建一个 PNG”“不使用图像模型”“……的 3D 渲染”等说法,或提示词中包含宽高比的情况。用户想要指定视觉风格的图像时也可使用,例如暗调影棚风、Apple 清透风、自然风、日落、夜景或水下风格。不用于编辑现有图像、制作 2D 矢量图或动画视频(视频由 VidTSX 处理)。

Add to TypingMind

概览

发布者hassancs91
代码仓库claude-image-generation
技能名称3d-image-renderer
星标数
110
复刻数
64
附带文件
6
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 6 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 hassancs91 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 3d Image Renderer AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/hassancs91/claude-image-generation/tree/main/.claude/skills/level-2-image-generator
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hassancs91/claude-image-generation.git /tmp/claude-image-generation
mkdir -p .claude/skills
cp -r /tmp/claude-image-generation/.claude/skills/level-2-image-generator .claude/skills/3d-image-renderer
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 3d Image Renderer,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 3d Image Renderer。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 3d Image Renderer 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

3D Image Renderer

Renders a text prompt into a PNG by writing a Three.js scene and capturing one frame with headless-gl under Xvfb. Think of every image as frame 0 of a TSX animation composition: deterministic, seeded, time = 2.0s.

Inputs

  • prompt — what to render
  • aspect ratio — one of 1:1 (1080×1080), 16:9 (1920×1080), 9:16 (1080×1920). Default 16:9 if unspecified. No custom sizes.

Workflow (follow in order)

1. Setup

bash
bash <skill_dir>/scripts/setup.sh

Idempotent; instant when cached. Installs npm deps into /home/claude/scene-render/ and drops the bundled prebuilt gl binary in place (compiles from source only if the binary fails its smoke test). It also copies pipeline.mjs and validate.mjs into the workdir. If it prints SETUP FAILED, report the error to the user — do not hand-roll a fallback.

2. Plan the scene

  • Pick ONE style preset → read references/style-presets.md now.
  • List the hero elements: every concrete noun in the prompt ("headphones", "tree", "flowers") is a hero element.
  • Read references/geometry-recipes.md for any element it covers before inventing geometry.

3. Write the scene

Create /home/claude/scene-render/scene.mjs. Import ONLY from the local pipeline — never re-implement renderer setup, pixel readback, or PNG writing:

js
import {
  THREE, createRenderer, captureFrame, addStudioEnvironment,
  seededRandom, visibleHeightAt,
} from './pipeline.mjs';

const time = 2.0; // the captured "frame"
const { renderer, glContext, W, H, OUT_W, OUT_H } =
  createRenderer('16:9', { exposure: 1.15 /* from style preset */ });

const scene = new THREE.Scene();
// ... build: sky, lights, ground, hero elements (per preset + recipes) ...

await captureFrame({
  renderer, glContext, scene, camera, W, H, OUT_W, OUT_H,
  outPath: '/home/claude/scene-render/out.png',
});
console.log('DONE');

Scene-authoring rules:

  • All randomness via seededRandom(seed) — never Math.random().
  • InstancedMesh for anything repeated 50+ times; per-instance color via setColorAt + instanceColor.needsUpdate = true.
  • Bake rotations into geometry (geometry.rotateZ(...)) — do not stack Euler rotations on meshes for construction.
  • Validate every horizon/background element with visibleHeightAt (the FOV rule in geometry-recipes.md) BEFORE rendering.
  • No post-processing. Glow = emissive + additive blending + fog.
  • WebGL1 only: no transmission, no WebGL2-only features, three stays at 0.152.2 (pinned by setup — do not upgrade).

4. Render

bash
cd /home/claude/scene-render && xvfb-run -a node scene.mjs

5. Validate (mandatory — never skip)

Write a hero spec covering each prompt-named element with its dominant material color, then:

bash
node validate.mjs out.png heroes.json
json
[
  { "name": "flowers", "hex": "f5a8c8", "tolerance": 45, "minPct": 0.3 },
  { "name": "tree canopy", "hex": "5a9440", "tolerance": 60, "minPct": 2.0 }
]

Also open the PNG with the view tool if image viewing works in this session. If it returns placeholders, rely on the validator output (histogram, ASCII map, presence checks) — it was designed for exactly that.

Fix and re-render when:

  • any hero element FAILs presence (typical fixes: more instances, bigger scale, camera reframe, contrasting material)
  • WASHED OUT / TOO DARK / LOW CONTRAST warnings (typical fixes: exposure and ambient per the style preset table; in light styles swap pure-white materials for metallic/mid-gray)
  • the ASCII map shows a composition failure (subject cropped, background walling off the sky)

Maximum 2 fix iterations, then deliver best result and tell the user what still needs work.

6. Deliver

bash
cp /home/claude/scene-render/out.png "/mnt/user-data/outputs/<descriptive_name>.png"

Present the PNG with present_files. Keep the summary short: style preset used, hero elements, and any validation fixes applied. Only include scene.mjs in the delivery if the user asks for the code.

Hard rules (violating any of these produced real failures)

  1. three@0.152.2 pinned — r163+ drops WebGL1 and headless-gl is WebGL1-only.
  2. Pixel readback needs vertical flip + alpha forced to 255 (pipeline does it).
  3. No MSAA headless — SSAA 2× via the pipeline is the anti-aliasing.
  4. Light styles: exposure ≤ 1.08, ambient ≤ 0.35, and the hero MUST include a metallic or mid-gray material. Pure white on white is invisible.
  5. Background elements sized by intuition WILL wall off the sky — run the FOV check.
  6. Prompt-named elements must pass the presence validator before delivery.
  7. Everything deterministic: seededRandom, fixed time = 2.0.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

3d Image Renderer AI 技能有什么作用?

通过构建真实的 Three.js 3D 场景并在无头模式下截取单帧,生成 PNG 图像;不涉及图像模型。输入文本提示词和宽高比(1:1、16:9 或 9:16),即可生成渲染后的 PNG。用户要求使用此系统生成、创建或渲染图像、图片、场景、壁纸、缩略图背景或产品图时,均可使用此技能;尤其适用于“生成一张……的图片”“渲染一个场景”“创建一个 PNG”“不使用图像模型”“……的 3D 渲染”等说法,或提示词中包含宽高比的情况。用户想要指定视觉风格的图像时也可使用,例如暗调影棚风、Apple 清透风、自然风、日落、夜景或水下风格。不用于编辑现有图像、制作 2D 矢量图或动画视频(视频由 VidTSX 处理)。

为什么在 TypingMind 中使用 3d Image Renderer?

因为您只需安装一次,就能搭配任何模型使用。3d Image Renderer 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 3d Image Renderer?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/hassancs91/claude-image-generation/tree/main/.claude/skills/level-2-image-generator。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 3d Image Renderer?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

3d Image Renderer 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 3d Image Renderer 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

3d Image Renderer AI 技能免费吗?

是的。hassancs91 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇