to-3d — 平铺図から衣類の3D立体図を生成する
平らな机の上に置かれた衣類の写真を、ボリューム感のある立体図に変換します——まるで目に見えない誰かが着ているかのように(業界用語:ゴーストマネキン / インビジブルマネキン)。
用途:平铺図は安いが安っぽく見え、人物写真は高価ですべてのカテゴリに適しているわけではありません。3D立体図はその中間——質感があり、シルエットを伝えられ、モデルコストや肖像権の問題がありません。
生成效果の例
| 入力:平铺図 |
|---|
garment-flatlay.jpg — オリーブグリーンのケーブルニットクルーネックセーターの平铺図、800×800 |
実際に実行されるコマンド:
dlazy gpt-image-2 \
--prompt 'Turn this flat-lay garment photo into a dimensional 3D ghost-mannequin product shot. The olive-green cable-knit crewneck sweater must gain realistic volume: filled shoulders and chest, sleeves with natural bend, visible interior of the collar, soft self-shadow under the hem, as if worn by an invisible mannequin. Keep the garment 100% faithful: same olive-green colour, same cable-knit and diamond stitch pattern, same ribbed collar and cuffs, same woven cuff label. Clean seamless light-grey studio background, soft top light, sharp fibre detail. No mannequin, no person, no text.' \
--images docs/to-3d/garment-flatlay.jpg \
--size 1024x1024 --quality medium --imageFormat jpeg \
--save docs/to-3d/example-output.jpg
出力
example-output.jpg — 1024×1024。肩と胸が膨らみ、袖が自然に曲がり、襟から内側のリブと裏地が見え、裾には自重による影がついています。ケーブルとダイヤモンドの編み目、オリーブグリーンの色、リブの構造、右袖の織りラベルは変更されず、画像内に人台や人体は現れません。
1、能力の範囲
| 能力 | 説明 |
|---|---|
| 立体膨らみ | 肩・胸の充填、袖の曲げ、襟の内部露出、裾の自重影 |
| 衣類タイプ | トップス / ボトムス / ワンピース / アウター / インナー / 子供服 / ルームウェア |
| 形状制御 | 参照画像(特定の立体形状をコピー)またはカスタムプロンプト |
| 素材強調 | オン/オフ;オンにするとニット、フリース、レザーの表面ディテールがより鮮明に |
| 生成アスペクト比 | 1:1(正方形メイン画像)/ 3:4(縦長の詳細画像) |
行わないこと:色、編み方、プリント、リブ構造の変更。人体や顔の生成。衣類の実際のパターン比率の変更。
2、入力素材のルール
生成前に以下のハード制約を自己チェック:
- サイズ:20KB~15MB
- 解像度:400×400以上
- 形式:jpg / jpeg / png / webp
推奨される入力(✅):単色背景、完全に平ら、折り目や重なりがない、正面全体、襟と裾の境界がはっきりしている単品の平铺図。
效果が明らかに低下する入力(❌)
| 問題 | 説明 |
|---|---|
| 折りたたみ配置 | 袖が本体に折り重なっていると、モデルは袖の長さを計算できない |
| 広範囲のシワ | シワが構造として認識され、奇妙な形状に膨らむ |
| すでに人体あり | 人物が着用した画像は one-shot を使用 |
| セットアップ同梱 | 個別のアイテムに分解して実行 |
3、立体形状の3つのコントロールポイント
| コントロールポイント | プロンプトに記述 | 記述しない場合の結果 |
|---|---|---|
| 充填度合い | filled shoulders and chest with realistic volume, natural fabric drape | 風船のように膨らみ、シルエットが不自然になる |
| 袖の姿勢 | sleeves with a natural bend, hanging slightly forward and away from the body | 袖がまっすぐ体側に張り付く |
| 襟の内側 | visible interior of the collar showing the inner facing | 襟が平らな穴になり、最も怪しくなる |
さらに2つの環境制約を追加:
soft self-shadow under the hem and inside the sleeves
No mannequin, no person, no visible support — the garment must appear worn by an invisible body.
No mannequin, no person は必ず記述すること。記述しないとモデルが頻繁に人台や半分の人体を生成する。
4、ツール呼び出し
本スキルは dLazy の gpt-image-2(画像編集モデル;平面から立体を推測するには強力な幾何学的理解が必要であり、同時に編み方と色を厳密に保持する必要があります)を使用します。
呼び出し方法
2つの同等の記述方法があります。どちらかを選択してください。統一エントリーポイントは自動的にバックエンドを選択し、失敗時にリトライし、ディレクトリを作成してファイルを保存し、コストを見積もります:
# A. 統一エントリーポイント(推奨):任意のバックエンドに切り替え可能、--dry-run で課金なしの空実行
node scripts/gen.mjs --task to-3d \
--prompt '<以下プロンプトテンプレート参照>' \
--images <下記表の順序で> \
--save output/to-3d-<sku>.jpg
# B. dLazy CLI を直接使用(Node 依存を避けたい場合、効果は同等)
dlazy gpt-image-2 --prompt '...' --images ... --save output/to-3d.jpg
パラメータ規約(本スキルの固定使用法)
| パラメータ | 値 | 理由 |
|---|---|---|
--images | [平铺図];形態参照がある場合 [平铺図, 形態参照図] | 順序がプロンプト内の image 1 / 2 に対応 |
--size | 1024x1024(正方形メイン画像)/ 1024x1536(縦長の長尺アイテム、ワンピース) | 元のサイトの 1:1 / 3:4 に対応 |
--quality | high(「素材強調」を有効にする場合と同等)/ medium(無効) | ニット、フリース類は必ず high |
--imageFormat | jpeg | ECアップロード汎用形式 |
--batch | 2 ~ 3 | ボリューム推論にはランダム性がある |
--save | docs/to-3d/output-<sku>.jpg | 直接ディスクに保存 |
コマンド例
# 基本呼び出し
dlazy gpt-image-2 \
--prompt 'Turn this flat-lay garment photo into a dimensional 3D ghost-mannequin product shot. Filled shoulders and chest with realistic volume, sleeves with a natural bend, visible interior of the collar, soft self-shadow under the hem. Keep the garment 100% faithful: same colour, same stitch pattern, same ribbing, same label. Clean seamless light-grey studio background. No mannequin, no person, no text.' \
--images docs/to-3d/garment-flatlay.jpg \
--size 1024x1024 --quality high
# 複雑な呼び出し:特定の立体形状をコピー + 縦長 + 3枚生成して選択
dlazy gpt-image-2 \
--prompt 'Turn image 1 (a flat-lay garment) into a dimensional 3D ghost-mannequin product shot, copying the volume, posture and camera angle of image 2. Filled shoulders and chest with realistic volume and natural fabric drape, sleeves with a natural bend hanging slightly forward, visible interior of the collar showing the inner facing, soft self-shadow under the hem and inside the sleeves. Keep the garment 100% faithful to image 1: same colour, same knit structure, same print placement, same ribbing and label. Clean seamless light-grey studio background, soft top light, sharp fibre detail. No mannequin, no person, no visible support, no text.' \
--images docs/to-3d/garment-flatlay.jpg docs/to-3d/volume-ref.jpg \
--size 1024x1536 --quality high --imageFormat jpeg \
--batch 3 --save docs/to-3d/output-sku001.jpg
# 実際に実行せずに見積もりだけ行う
dlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high
関連資料
| 調べたい内容 | 参照先 |
|---|---|
| 認証、マルチバックエンド設定、出力構造、エラーコード | references/provider-cli.md |
gpt-image-2 の全使用可能パラメータ | references/model-flags.md |
| 統一エントリーポイントの全オプション | node scripts/gen.mjs --help |
5、プロンプトテンプレート
Turn this flat-lay garment photo into a dimensional 3D ghost-mannequin product shot.
The [カテゴリ + 色 + 素材] must gain realistic volume:
filled shoulders and chest, sleeves with a natural bend,
visible interior of the collar showing the inner facing,
soft self-shadow under the hem and inside the sleeves,
as if worn by an invisible body.
Keep the garment 100% faithful: same [色], same [編み方/テクスチャ], same [プリント/パターン位置],
same [リブ/襟/袖口/裾の構造], same [タグ/織りラベル].
Clean seamless [背景色] studio background, soft top light, sharp fibre detail.
No mannequin, no person, no visible support, no text.
問題に応じて追加する修正文
| 問題 | プロンプト末尾に追加 |
|---|---|
| 人台や人体の一部が生成された | Absolutely no mannequin, torso, neck, arms or hands anywhere in the frame — only the garment. |
| 膨らみすぎてシルエットが太くなった | Keep the original garment proportions: body width, sleeve length and hem width must match image 1 exactly. Add volume, not size. |
| 襟が平らな穴になっている | The collar opening must show the inner facing and the inside back of the garment, with correct depth and shadow. |
| 編み方がつぶれた | --quality high に変更し、resolve individual knit loops and yarn twist を追加 |
| 影の方向が不自然 | Single soft top-left light source; one consistent contact shadow beneath the garment. |
6、実行フロー
- 入力の検証:完全に平ら、折りたたみなし、大きなシワなし、単品、境界が明確。
- 3つのコントロールポイントを記述(充填 / 袖の姿勢 / 襟の内側)+ 2つの環境制約(自重影 / 人台禁止)。
- 忠実に保持する項目を記述:色、編み方、プリント位置、リブ構造、タグ。
- アスペクト比と品質を選択:ニット・フリース類は必ず
--quality high。 --dry-runで見積もり → 実際に実行 →--batch 2~3で生成し、docs/to-3d/に保存。- 品質チェック:人体が生成されていないか、シルエットが太くなっていないか、襟の内側が正しいか、編み方が保持されているか。
7、よくある問題
| 現象 | 原因 | 対処 |
|---|---|---|
| 人台 / 半分の人体が生成される | 禁止文の欠落 | 強化版禁止文を追加(第5節) |
| シルエットが太くなる | ボリューム追加のみで比率維持を指定していない | 比率維持文を追加:Add volume, not size. |
| 襟が平らな黒い穴になる | 内部の記述がない | 襟の内部を記述する文を追加 |
| 袖がまっすぐ体側に張り付く | 袖の姿勢の記述がない | hanging slightly forward and away from the body を追加 |
| 編み方がぼやける | --quality medium | high に変更;または material-enhancement を接続 |
| 折りたたまれた画像の效果が悪い | 入力違反 | 完全に平らな平铺図を再撮影 |
Tips
詳細は https://dlazy.com をご覧ください。

