3d Image Rendererのロゴ

3d Image Renderer

コミュニティ
hassancs91
3d-image-renderer

Three.jsで実際の3Dシーンを構築し、ヘッドレス環境で1フレームをキャプチャして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ファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 6個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    hassancs91がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「3d Image Renderer」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

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

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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を有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的に3d Image Rendererを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、3d Image Rendererは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じ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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「3d Image Renderer」では何ができますか?

Three.jsで実際の3Dシーンを構築し、ヘッドレス環境で1フレームをキャプチャして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を読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

3d Image Rendererを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

3d Image Rendererで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでも3d Image Rendererを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「3d Image Renderer」は無料ですか?

はい。hassancs91がMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇