ai21.net
言語

ぬいぐるみドラゴンの物理エフェクト比較

ぬいぐるみドラゴンの物理エフェクト比較 — 1

プロンプト

Build "Plush Dragon" — Material Studies No. 014: a single self-contained HTML file, native WebGPU, fully procedural (no assets, no libraries), in the same editorial style as the series (serif masthead, side specimen panel, live readouts, "Inside the experiment" notes).

The specimen:
- A chubby plush baby dragon sitting on a table, all made from one signed distance field.
- Minky body: a big round head with a short snout and two felt horns, a pale belly quilted in horizontal bands, stubby arms, round haunches with padded feet and tiny felt claws.
- A tail curled round to one side, ending in a soft spade.
- A row of flat felt spikes down the head, back and tail.
- Face: glossy bead eyes, blushing cheeks, embroidered nostrils, a stitched smile with one little felt fang.
- Two quilted plush wings sewn on at the shoulders.

Physics:
- Body: XPBD soft body on a hex-cell lattice (co-rotational shape matching plus tetrahedral volume), 60 Hz, 6 substeps. Gravity and floor friction; the seat keeps its footing and the toy slowly rights itself like a weighted plush.
- Muscles instead of forces: the belly breathes (cells' rest shapes and rest volumes swell); the tail wags by lengthening cells on one side of its centre line and shortening them on the other, faster when the dragon is happy.
- Wings:
- each wing is a small XPBD cloth cut from a curved fan-shaped 3D pattern (stretch, shear and bend links), its two root rows embedded in the body lattice;
- a pose (fold back about the vertical, flap about a hinge along the body, both riding a shoulder frame from embedded points) pulls every point toward its target: firmly at the root, barely at the edge, so the stuffed wings lag and flop;
- collider spheres riding the body keep the wings off it.
- Flapping: downstrokes lift the dragon with a hover controller (about 6 cm off the table, bobbing with each beat), then it drops back onto its seat.
- Pulling a wing past its slack tows the body by that shoulder.

Rendering:
- Shell fur (base + N instanced shells, alpha-to-coverage under 4× MSAA): fur lie carried by the deformation gradient, damped-spring tip lag, Kajiya–Kay highlights, velvet sheen, a comb tool.
- Regions painted in rest space: belly with quilting seams, short-nap felt horns and spikes in the wing colour, padded soles, cheeks, smile groove.
- Wings drawn each frame as stuffed slabs swept from the cloth:
- a rolled leading edge in the body colour;
- three panels puffed between stitched ribs;
- a scalloped trailing edge;
- a shorter pile of the same minky.
- Glossy eyes, embroidery thread, felt fang and claws.
- Soft PCSS key-light shadows, contact occlusion on the studio floor, Khronos PBR Neutral tone mapping.
- NaN-safe WGSL (clamped pow/smoothstep, clamped post).

Interaction:
- Hand: lift and squash the dragon, or grab a wing to stretch it open (pull harder to tow the dragon).
- Finger: a finger reaches in from the viewer; poke to dent the stuffing; hold it pressed in to tickle — the dragon giggles, its wings shiver and its tail wags.
- Comb: brush the pile.
- Buttons: Flap, Stretch (wings spread wide), Boop (a sneeze: head bobs back, wings flare), Toss, Smooth fur, Reset.
- Sliders: Stuffing, Pile, Wingbeat.
- Palettes: Mint (lilac wings), Ember (coral with gold wings), Dusk (lavender with pink wings).
- Readouts: mass, volume % of rest, live wingspan in cm, lift off the table in cm.
- Orbit and zoom; responsive stacked layout on phones; adaptive quality; reduced-motion support.

日本語訳

「Plush Dragon」を作ってください — Material Studies No. 014:単一の自己完結型 HTML ファイル、ネイティブ WebGPU、完全プロシージャル(アセットなし、ライブラリなし)、シリーズと同じエディトリアルスタイル(セリフ体のマストヘッド、横の標本パネル、ライブの読み取り値、"Inside the experiment" の注記)。

標本:
- テーブルの上に座った、ぽっちゃりしたぬいぐるみの赤ちゃんドラゴン。すべて 1 つの符号付き距離場から作られます。
- ミンキー生地のボディ:短い鼻先と 2 本のフェルトの角を持つ大きな丸い頭、横方向の帯状にキルティングされた淡い色の腹、短い腕、詰め物入りの足と小さなフェルトの爪を持つ丸い臀部。
- 片側に巻き付いた尻尾で、先端は柔らかなスペード形。
- 頭、背中、尻尾に沿った一列の平らなフェルトのスパイク。
- 顔:光沢のあるビーズの目、赤らんだ頬、刺繍の鼻孔、小さなフェルトの牙が 1 本あるステッチの笑み。
- 肩に縫い付けられた 2 枚のキルティングされたぬいぐるみの翼。

物理:
- ボディ:ヘックスセル格子上の XPBD ソフトボディ(コーポテーショナル形状マッチング+四面体体積)、60 Hz、6 サブステップ。重力と床摩擦。座面は足場を保ち、おもちゃは重り入りのぬいぐるみのようにゆっくりと起き上がります。
- 力ではなく筋肉:腹が呼吸します(セルのレスト形状とレスト体積が膨らむ)。尻尾は中心線の片側のセルを伸ばし反対側を縮めることで振られ、ドラゴンが嬉しいときはより速くなります。
- 翼:
- 各翼は、湾曲した扇形の 3D パターンから切り出した小さな XPBD クロスで(ストレッチ、シアー、ベンドのリンク)、その 2 列の根元はボディ格子に埋め込まれます。
- ポーズ(鉛直軸まわりに後ろへ折る、ボディに沿ったヒンジまわりに羽ばたく、どちらも埋め込み点からのショルダーフレームに乗る)が各点をターゲットへ引き寄せます:根元ではしっかりと、縁ではほとんど引かず、詰め物をした翼が遅れてだらりと揺れます。
- ボディに追従するコライダー球が翼をボディから離しておきます。
- 羽ばたき:ダウンストロークでホバーコントローラによりドラゴンが持ち上がり(テーブルから約 6 cm、1 拍ごとに上下)、その後、座面に戻ります。
- 翼をたるみを超えて引っ張ると、その肩でボディが引きずられます。

レンダリング:
- シェルファー(ベース+N 個のインスタンス化シェル、4× MSAA 下の alpha-to-coverage):毛流れは変形勾配に従い、減衰スプリングによる毛先の遅れ、Kajiya–Kay ハイライト、ベルベットの光沢、コームツール。
- レスト空間でペイントされた領域:キルティングの縫い目がある腹、翼と同じ色の短毛フェルトの角とスパイク、詰め物入りの足裏、頬、笑みの溝。
- 翼は毎フレーム、クロスから掃引した詰め物入りのスラブとして描画:
- ボディ色の巻かれた前縁。
- 縫い付けられたリブの間で膨らんだ 3 つのパネル。
- スカラップ状の後縁。
- 同じミンキー生地の短いパイル。
- 光沢のある目、刺繍糸、フェルトの牙と爪。
- 柔らかな PCSS キーライトの影、スタジオの床のコンタクトオクルージョン、Khronos PBR Neutral トーンマッピング。
- NaN セーフな WGSL(クランプした pow/smoothstep、クランプしたポスト処理)。

インタラクション:
- ハンド:ドラゴンを持ち上げてつぶす、または翼をつかんで広げる(強く引くとドラゴンが引きずられる)。
- フィンガー:視聴者側から指が伸びてきます。突くと詰め物がへこみ、押し込んだままにするとくすぐられ、ドラゴンは笑い、翼が震え、尻尾が振れます。
- コーム:パイルをブラッシングします。
- ボタン:Flap、Stretch(翼を大きく広げる)、Boop(くしゃみ:頭が後ろに仰け反り、翼が広がる)、Toss、Smooth fur、Reset。
- スライダー:Stuffing、Pile、Wingbeat。
- パレット:Mint(ライラックの翼)、Ember(コーラルにゴールドの翼)、Dusk(ラベンダーにピンクの翼)。
- 読み取り値:質量、レストに対する体積の割合(%)、ライブの翼幅(cm)、テーブルからの浮き上がり(cm)。
- オービットとズーム。スマートフォンではレスポンシブなスタックレイアウト。適応的な画質。reduced-motion 対応。

出典

原作者
vib3coded
公開日
2026-10-05(由推文 ID 反解)
原典
元の投稿を見る ↗
収録元
zhuyansen/awesome-opus-5.5-video · 2107020311380033949 · ライセンス未表明