
本記事では、NovelAI V5で透過表現や背景透過を再現するプロンプトと、その解説をしています。
NovelAIがアップデートされ、V5がリリースされました。
かなり色々なことができるようになっていますが、公式のガイドを読んでいたら、透過表現まわりの機能もかなり強化されているようです。

ざっくり言うと、公式から示されているのは以下の2つの方向性です。
ものすごく雑に言うと、こんな感じです。
これまでNovelAIではできなかった透過方法を使った表現が可能になったようで、なんとなく面白そうです。

今回はせっかくなので、公式から発表されたプロンプトを使って、どんなことができるようになったのかを試していきたいと思います。
それぞれ用途が違うので、今回はこの2つの方向性について、公式のガイダンスによる推奨の使い方をベースにしつつ、再現しやすいように少しアレンジしたプロンプトを紹介していきます。
NovelAI V5で背景を透過するプロンプト
それでは、さっそく一緒にみていきましょう。
まずは、背景を透過するプロンプトからです。
これはかなり簡単です。
公式が紹介している「transparent background」というプロンプトを使うだけでOKです。
↓

これは、ただ灰色の市松模様が背景に表示されているだけの「透過っぽいフェイク」ではなくて、ちゃんと本当に透明です。
これを使ってイラストを生成すると、あとから背景を差し替えることができます。
↓

背景透過で生成した作例

背景を差し替えた例
girl, solo, upper body, silver hair, blue eyes, transparent background
| プロンプト(呪文) | 内容 |
|---|---|
| transparent background | 背景を透明にする。キャラクター立ち絵、素材、背景なし画像が作れる |
役割は非常にシンプルで、背景を透明にすることです。
人物の後ろを普通の背景として描くのではなく、「アルファ0の透明な領域として生成する」という感じです。
いわゆる「透過PNG」ってやつですね。「Photoshopであとから背景を抜かなくてOK」っていうふうになりました。
これで何ができるかというと、立ち絵、アイテム、エフェクト単体、UI素材、ゲーム用パーツなどをNovelAIでそれぞれ背景透過の状態で作ることができます。
1つ1つを単体で丁寧に生成できるので、そのぶん描写にリソースを使いやすくなります。
イラスト素材を使って何かを作りたい場合には、かなり嬉しい機能ですね。VTuber素材、ゲームキャラクター、配信用グラフィックなんかにも使えそうです。
これはAIイラストの表現手法というより、「画像生成をレイヤー化するための機能」という位置付けに近いと思います。「素材生成機能」みたいに考えると分かりやすいかもしれません。
注意点として、「outdoors, blue sky, town」のように、背景透過と競合するような記述が入っていると不安定になります。
そのため、背景を透過したい場合は、あらかじめプロンプト内から背景描写などの邪魔になりそうなものを取り除いておいたほうがよさそうです。
また、「transparent background」だけでは弱い場合、公式では強調構文を使って「2.1::transparent background::」のように強める方法も推奨されています。
わたしが使った限りでは、強調しなくても普通に透過されました。
このあたりは、組んでいるプロンプト全体の複雑さにもよるかもしれません。
NovelAI V5のalpha transparencyで透過表現するプロンプト
続いて、イラストの中にあるものを透かすためのプロンプトです。
個人的には、こっちのほうが興味があります。
まずは、作例とプロンプトを紹介します。
(ややプロンプトが長いですが、あとで分解しながら解説します)
↓

青い炎が透過されて、後ろにいるキャラクターが透けて見えます。
girl, solo, upper body, silver hair, blue eyes,
white dress,
holding a magical flame in one hand,
glowing particles,
2::translucent blue magical flame::,
2::alpha transparency::,
battlefield, red sky,
a semi-transparent blue flame in the foreground, in front of the character,
the character standing behind the flame,
her face visible through the flame,
the flame partially obscuring her upper body, alpha transparency
| プロンプト(呪文) | 内容 |
|---|---|
| alpha transparency | 物体を半透明にする。画像の中にあるもの自体を透けさせたい時に使う |
| プロンプト(呪文) | 意味 |
|---|---|
| a semi-transparent blue flame | 青い半透明の炎 |
| in the foreground, in front of the character | 炎は前景、人物より手前 |
| the character standing behind the flame | 人物は炎の後ろ |
| her face visible through the flame | 炎越しに顔が見える |
| the flame partially obscuring her upper body | 炎が上半身の一部に重なる |
これは、アルファチャンネルによる透過を使って、イラストの中にある物体を透けさせるためのプロンプトです。
では、この「アルファチャンネル」って何なのか。
画像まわりでは、よく「RGBA」という言葉を見かけます。
このうち「RGB」は、Red(赤)・Green(緑)・Blue(青)のことで、ざっくり言えば画像の「色」を持っている情報です。
そして最後の「A」が、Alpha(アルファ)です。
このアルファは何を持っているのかというと、その部分がどのくらい不透明なのか、どのくらい後ろを透かすのかという情報です。
たとえば、アルファが100%なら完全に不透明なので後ろは見えません。
逆に0%なら完全に透明。
50%ならその中間なので、前の色と後ろの色が混ざって、半透明に見える。そんな感じです。
ここでけっこう大事なのが、「透明っぽく見える」ことと、「アルファチャンネルを使って透過している」ことは、同じではないというところです。
普通のイラストでも、ガラスや水、ホログラムなんかを透明っぽく描くことはできます。
色を薄くしたり、光やハイライトを入れたり、ぼかしたり、後ろの景色が透けているように描き込んだり。
こういうやり方でも、見た目としては十分「透明」に見えます。
これは、いわば絵として透明感を演出しているわけですね。
一方で、NovelAI V5の 「alpha transparency」 は、公式では、シーンの中にあるものをアルファ透過を使って透けさせるための指定として説明されています。
具体例として、魔法のエフェクトや炎、傘なども挙げられています。
つまりV5では、これまでのように「透明に見えるように描く」という方法だけではなく、画像そのものにアルファ情報を持たせて、透明度を使って透過を表現するという方向でも生成できるようになった、ということです。
NovelAI公式でも、V5ではアルファチャンネルを使った「本物の透過」を画像生成で扱えるようになったと説明されています。
なので、かなりざっくり整理すると、透明感の作り方をこんなふうに考えると分かりやすいと思います。
- 色・光・ぼかしなどを使って、絵として透明っぽく見せる
- アルファチャンネルを使って、画像情報として透明度を持たせる
という2つです。
そして面白いのが、最終的に見える絵だけなら、両方ともかなり似ることがあるというところです。
見た目の演出だけで透明っぽく描いたものと、アルファ透過を使って生成したもの。
完成したイラストだけを見ると、「これ、どっちで作ったの?」と分からないくらい似る場合もあると思います。
一方で、アルファ透過を使うことで、対象や場面によっては、ただ色を薄くしただけでは出しにくい、本当に向こう側へ透けているような透明感が強く出る可能性もあります。
なので個人的には、NovelAI V5の 「alpha transparency」 は、
透明感を「絵として演出する」だけではなく、「画像情報として透明度を持たせる」という、もうひとつの方法でも作れるようになった機能
と考えると、かなり分かりやすいかなと思っています。
alpha transparencyを使って透過を再現する方法
前置きがだいぶ長くなってしまいましたが、ここからは「alpha transparency」を使った透過表現を再現するコツを紹介します。
最初に結論を言っておくと、
「何が透けて、その後ろに何が見えるのかをChatGPTに自然言語で書き足してもらう」
というのが、今のところのわたしの最適解です。楽ちんです。
わたし自身もまだ試行錯誤しながら試している段階ですが、「alpha transparency」を入れただけだと、炎やガラスを思い通りに透かすのがなかなか安定しませんでした。
その中で一定の効果が出ているのが、
「何が前にあるのか」
「何が後ろにあるのか」
「後ろの何が透けて見えるのか」
という前後関係を、自然言語で追加していく方法です。

| 書いていること | プロンプトと意味 |
|---|---|
| 半透明にする対象 | a semi-transparent blue flame 青い半透明の炎 |
| その対象の位置 | in the foreground, in front of the character 炎は前景、人物より手前 |
| 後ろ側の対象 | the character standing behind the flame 人物は炎の後ろ |
| 何が透けて見えるか | her face visible through the flame 炎越しに顔が見える |
| どのように重なるか | the flame partially obscuring her upper body 炎が上半身の一部に重なる |
このように、「alpha transparency」でイラスト内の物体を透かすことを指定したうえで、
「何が前にあって」
「その後ろに何があって」
「何が透けて見えているのか」
まで自然言語で説明するようにしたところ、思ったような透過表現がだいぶ出しやすくなりました。
ただ、これを毎回書くのは嫌です笑。
めんどくさいです笑。
そこで、いまのところ一番楽だなと思っているのが、最初にこういう書き方をChatGPTに理解してもらって、長い自然言語の部分はChatGPTに書いてもらうやり方です。
なので、とりあえず、わたしが今のところうまくいっているプロンプトの全文と一緒に、以下の内容をChatGPTに食べさせて、先にやりたいことを理解してもらうのが早いです。
ChatGPTに最初に食べさせる指示プロンプト
NovelAI Diffusion V5の「alpha transparency」を使った
透過表現用プロンプトを作成してください。
NovelAI V5では、alpha transparencyなどの透過用タグだけを書くのではなく、透過させる対象と、人物・背景との前後関係まで自然言語で具体的に記述してください。
特に、以下を意識してください。
・何を半透明にするのかを明示する
・半透明物がforeground、midground、backgroundのどこにあるのかを明示する
・半透明物の前後に何があるのかを明示する
・人物や物体が半透明物の後ろにある場合、そのことを明示する
・半透明物を通して、人物や物体のどの部分が見えるのかを明示する
・必要に応じて「partially obscuring」や「overlapping」などを使い、どの部分に重なっているのかを明示する
・背景や空の色なども具体的に指定する
・前景、中景、後景がある場合は、それぞれを自然言語で明示する
また、透過させたい対象と「alpha transparency」はNovelAIの強調構文を使って強調してください。
強調構文は以下の形式を使用します。
2::translucent blue magical flame::,
2::alpha transparency::,
完成するプロンプトの書き方は、以下の実例を参考にしてください。
girl, solo, upper body, silver hair, blue eyes,
white dress,
holding a magical flame in one hand,
glowing particles,
2::translucent blue magical flame::,
2::alpha transparency::,
battlefield, red sky,
a semi-transparent blue flame in the foreground, in front of the character, the character standing behind the flame, her face visible through the flame, the flame partially obscuring her upper body, alpha transparency
この完成例の「構造」「強調構文」「前後関係の書き方」「透けて見える部分の記述」「背景や色の指定」を参考にしながら、私が指定する対象に合わせて内容を変更してください。
完成プロンプトは、上記の例と同じように適度な改行と空行を入れ、コピーしやすいコードブロックで出力してください。
これを食べさせると、だいたいやりたいことを理解してくれます。
以下みたいな反応をしてくれると思います。
↓

続いて、以下のように指示します。
↓
銀髪の少女、青い瞳、セーラー服、傘を持っている。濡れた道路、街、曇り空, upper body, from side,
上記に記述されているプロンプト内容を確認してください。
そのうえで、先ほどの記述方式に合わせて同じ程度の文章量・粒度でプロンプトをコードブロックで出力してください。
ただし、私が記述した部分はそのまま記載すること。
↓

ChatGPTへの指示例

生成結果
このように、透過表現で必要になる前後関係の、ちょっと長めの英語の自然言語部分をチャッピーが書いてくれます。
あとは、それを使って生成を試していくやり方です。
「銀髪の少女、青い瞳、セーラー服、傘を持っている。濡れた道路、街、曇り空, upper body, from side」
この部分は、最初に自分で「こんなシーンを再現したい」と書いた原文です。
ここは日本語でも英語でも、どちらでも問題ありません。
自分で書いた原文部分は変更しないように指示しておくと、あとから微調整もしやすくなります。
一発で決まる場合もありますが、実際に生成してみると微調整が必要になることもあります。
このあたりは、全部チャッピーに相談しながら直していくスタイルです。
alpha transparencyを使った透過表現の作例・プロンプト集
最後に、「alpha transparency」を使って、色々な透過表現を試してみた作例とプロンプトを紹介します。
ラムネ瓶の透過表現 × 夏の縁側

girl, solo, upper body, black hair, brown eyes,
light summer dress, holding a ramune bottle, drinking ramune, side profile,
summer engawa, green garden, bright afternoon light, nostalgic summer atmosphere,
2::transparent ramune bottle::,
2::alpha transparency::,
a transparent ramune bottle in the foreground near the character's mouth, the character visible through the clear bottle, her lips and part of her cheek visible through the glass, the bottle partially overlapping her lower face, soft light passing through the bottle, alpha transparency
湯気越しに顔を透かす
こういう、さりげないところで透過が出せるのは、けっこう嬉しいかもしれません。

girl, solo, upper body, silver hair, blue eyes,
soft cardigan, holding a warm drink, gentle steam,
cozy cafe, warm brown tones, soft amber light,
2::translucent steam::,
2::alpha transparency::,
translucent steam in the foreground, in front of the character, the character standing behind the steam, her face visible through the steam, the steam partially obscuring part of her face, alpha transparency
宇宙船コックピット × 透明ホログラムディスプレイ

girl, solo, upper body, silver hair, blue eyes,
white futuristic pilot suit, hands near the controls,
spaceship cockpit, dark metallic interior, stars and blue planet outside,
2::transparent blue holographic display::,
2::alpha transparency::,
a large transparent blue holographic display floating in the foreground between the viewer and the character, glowing navigation lines and interface graphics across the display, the character seated behind the hologram, her face and upper body clearly visible through the transparent screen, the holographic display partially obscuring her body, a star field and luminous blue planet visible through the cockpit windows in the background, alpha transparency
ホログラムAI少女 × キャラクターの重なり
これは、やや再現が不安定です(ガチャ必要)。

girl, solo, upper body, silver hair, blue eyes,
black futuristic serafuku, looking forward, hands on desk, leaning on desk,
futuristic control room, dark blue walls, cyan and violet lights,
2::translucent beautiful holographic AI girl projection::,
2::alpha transparency::,
a translucent holographic AI girl projection floating in the foreground beside and partially in front of the character, the holographic figure is clearly a beautiful girl seen from behind, her back facing the viewer, with a sleek feminine silhouette, long flowing hair falling down her back, and a form-fitting futuristic bodysuit that clearly shows the body line from the back, the hologram made of transparent cyan, violet, and pink light, glowing scan lines, fine particles, and luminous edges, the real character standing behind the holographic projection, parts of her face and upper body visible through the transparent hologram, the two figures partially overlapping, the holographic girl appearing elegant, high-tech, and visually striking rather than simple or cheap, futuristic control room lights in the background, alpha transparency
透過する前景の炎 × 女騎士

girl, solo, full body shot, silver hair, blue eyes,
white and silver knight armor, fighting stance, holding a sword in both hands, ready stance, glowing particles, wind, detailed flames,
battlefield, broken weapons, smoke, ruined ground, dark red sky,
2::large translucent orange flames::,
2::alpha transparency::,
detailed flames, large semi-transparent orange flames dominating the foreground, tall flames in front of the character, the character standing farther back in the midground, full body visible from head to toe, holding a sword in a fighting stance, her figure clearly seen through the translucent flames, the flames partially obscuring her body, a war-torn battlefield in the background with drifting smoke, scattered ruins, and a dark red sky, alpha transparency
オーガンジー生地の透け感
シアー素材の透け感がどこまで出せるのか、試してみた作例です。

girl, solo, upper body, silver hair, blue eyes,
white dress, light organza fabric, soft wind,
studio set, pale pink backdrop, soft white light,
2::translucent organza fabric::,
2::alpha transparency::,
a translucent organza fabric in the foreground, in front of the character, the character standing behind the fabric, her face visible through the organza, the fabric partially obscuring her upper body, alpha transparency
ネオンが反射するガラス越し
都会的でドラマ感が出しやすいです。

girl, solo, upper body, silver hair, blue eyes,
dark jacket, standing behind a neon-lit glass panel, soft reflections,
cyberpunk street, blue and pink neon lights, rainy night,
2::transparent neon-lit glass::,
2::alpha transparency::,
a transparent glass panel in the foreground, neon reflections across the glass, the character standing behind the glass, her face visible through the transparent panel, the glass partially obscuring her upper body, alpha transparency
透過する魔法陣

girl, solo, upper body, silver hair, blue eyes,
detailed clothes, black dress, raising one hand forward, glowing particles,
ruined temple, cool gray stone floor, dark blue night sky, pale moonlight,
2::translucent blue magical circle::,
2::alpha transparency::,
a semi-transparent blue magical circle in the foreground, in front of the character, the character standing behind the magical circle, her face visible through the magical circle, the magical circle partially obscuring her upper body, alpha transparency
反射と透過が混ざるガラス表現
透過だけではなく、ガラスへの映り込みも一緒に試してみたプロンプトです。

girl, solo, upper body, silver hair, blue eyes,
black dress, standing behind a glass panel, soft reflections,
modern interior, cool gray walls, soft city light,
2::transparent reflective glass::,
2::alpha transparency::,
a transparent reflective glass panel in the foreground, the character standing behind the glass, her face visible through the transparent glass, subtle reflections on the surface, the glass partially obscuring her upper body, alpha transparency
雨の日の電車 × 窓ガラス越しの顔
少し切ない感じの日常系です。
窓の反射と透過が混ざるので、けっこう雰囲気が出ます。

girl, solo, upper body, black hair, brown eyes,
school coat, standing inside a train, looking out the window,
train interior, rainy evening, blurred city lights outside, cool dim light,
2::transparent train window::,
2::alpha transparency::,
a transparent train window in the foreground, the character standing behind the window, her face visible through the glass, faint reflections on the window surface, the glass partially obscuring her upper body, alpha transparency
透過する火の粉 × 戦闘シーン
炎そのものより、火の粉で見せるタイプです。

girl, solo, upper body, silver hair, blue eyes,
battle outfit, serious expression, embers and sparks,
battlefield, smoke, dark red sky,
2::translucent glowing embers::,
2::alpha transparency::,
translucent glowing embers in the foreground, in front of the character, the character standing behind the embers, her face visible through the sparks, the embers partially obscuring part of her upper body, alpha transparency
薄い青霧 × 神秘的な透過表現

girl, solo, upper body, silver hair, blue eyes,
white dress, soft expression, glowing particles,
moonlit forest, pale blue moonlight, dark trees,
2::translucent blue mist::,
2::alpha transparency::,
translucent blue mist in the foreground, in front of the character, the character standing behind the mist, her face visible through the mist, the mist partially obscuring her upper body, alpha transparency
色付きサングラス越しに目を透かす

girl, solo, upper body, silver hair, blue eyes,
white blouse, smile, wearing transparent sunglasses, soft reflections,
summer street, pale blue sky, bright daylight,
2::transparent sunglasses::,
2::alpha transparency::,
transparent sunglasses over the character's eyes, the character visible through the transparent lenses, her eyes clearly visible through the lenses, the sunglasses partially overlapping her face, alpha transparency
まとめ:NovelAI V5の背景透過・透過表現でできること
今回は、NovelAI V5で使える「transparent background」と「alpha transparency」を中心に、背景透過とイラスト内の透過表現のプロンプトを紹介してきました。
NovelAI V5の透過用プロンプトの全体像はざっくりと以下です。
| 透過用プロンプト | ひとことで言うと | 主な用途 |
|---|---|---|
transparent background | 背景を透明にする指定 | 立ち絵、素材化、切り抜き用画像、あとで背景を合成したい時 |
alpha transparency | 画像内の物体そのものを半透明にする指定 | ホログラム、魔法、炎、ガラス感、透明素材、半透明エフェクト |
has alpha | アルファ情報を使うことを広く示す指定 | 透過要素を含む画像全般、抽象的なアルファ利用 |
今回の記事内では紹介しませんでしたが、「has alpha」は、アルファを使うように広く指定する抽象的なプロンプトです。
ざっくり分けると、「transparent background」は背景そのものを透明にしたいとき、「alpha transparency」は炎やガラス、霧、ホログラムなど、イラストの中にあるものを透かしたいときに使う、という感じです。
今回試していて特に大事だと思ったのは、「alpha transparency」と書くだけではなく、何を透かすのか、その前後に何があるのか、透かした先に何が見えるのかまで書いてあげることでした。
「何が前」「何が後ろ」「何が透けて見える」という関係を自然言語で追加していくと、かなり狙った透過表現に近づけやすくなります。
NovelAI V5の透過表現は、単純に「透明なものを描ける」というだけではなく、炎、霧、ガラス、ホログラム、魔法陣などを人物の前に重ねながら、その向こう側まで見せられるのが面白いところだと思います。
今回掲載したプロンプトも、そのまま使ったり、透過させる対象や背景だけ入れ替えたりしながら、色々試してみてもらえたらと思います。

最後まで読んでいただき、ありがとうございました。
コメントもお待ちしています!気軽に残していってもらえたら嬉しいです。


コメント