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”注释)。

标本:
- 一只胖乎乎的毛绒幼龙坐在桌上,整体全部由同一个有符号距离场构成。
- Minky 绒布身体:大大的圆脑袋,短口鼻和两只毛毡角,浅色肚皮以水平条带绗缝,粗短的胳膊,圆润的臀部配软垫脚掌和极小的毛毡爪子。
- 一条尾巴卷向一侧,末端是一个柔软的铲形尾尖。
- 一排扁平的毛毡棘刺,沿头部、背部和尾部排列。
- 面部:有光泽的珠状眼睛、泛红的脸颊、绣制的鼻孔、缝线的微笑,配一颗小小的毛毡獠牙。
- 两只绗缝毛绒翅膀,缝在肩部。

物理:
- 身体:六边形单元晶格上的 XPBD 软体(共旋转形状匹配加四面体体积),60 Hz,6 个子步。重力和地面摩擦;坐部保持支撑,玩具像加了配重的毛绒玩偶一样缓慢自行扶正。
- 用肌肉代替力:肚皮会呼吸(单元的静止形状和静止体积膨胀);尾巴通过让中心线一侧的单元伸长、另一侧缩短来摆动,龙开心时摆得更快。
- 翅膀:
- 每只翅膀都是一小块 XPBD 布料,裁自弯曲的扇形 3D 版型(拉伸、剪切和弯曲连接),其两排根部嵌入身体晶格;
- 一个姿势(绕垂直方向向后折叠、绕沿身体的铰链扇动,两者都挂载在由嵌入点生成的肩部坐标系上)会把每个点拉向它的目标:根部拉得很紧,边缘几乎不拉,因此填充的翅膀会滞后并松垮地摆动;
- 附着在身体上的碰撞球体让翅膀不会碰到身体。
- 扇动:向下拍翅通过悬停控制器把龙抬起(离桌面约 6 厘米,随每次拍击上下浮动),然后它落回坐姿。
- 把翅膀拉过它的松弛量,就会通过那一侧肩膀拖动身体。

渲染:
- 壳层毛发(基础层 + N 个实例化壳层,4× MSAA 下使用 alpha-to-coverage):毛发的伏倒方向由变形梯度承载,阻尼弹簧带来毛尖滞后,Kajiya–Kay 高光,天鹅绒光泽,以及一把梳理工具。
- 在静止空间中绘制的区域:带绗缝缝线的肚皮、与翅膀同色的短绒毛毡角与棘刺、加了软垫的脚底、脸颊、微笑凹槽。
- 翅膀每帧绘制为由布料扫掠而成的填充板片:
- 与身体同色的卷曲前缘;
- 三块在缝制肋条之间鼓起的板面;
- 扇贝形后缘;
- 同一 Minky 绒布上更短的绒毛。
- 有光泽的眼睛、刺绣线、毛毡獠牙和爪子。
- 柔和的 PCSS 主光阴影、影棚地面上的接触遮蔽、Khronos PBR Neutral 色调映射。
- 对 NaN 安全的 WGSL(钳制的 pow/smoothstep、钳制的后处理)。

交互:
- 手:抬起并挤压龙,或抓住一只翅膀把它拉开(拉得更用力就能拖动龙)。
- 手指:一根手指从观察者方向伸进来;戳一下会让填充物凹陷;按住不放来挠痒 —— 龙会咯咯笑,翅膀颤抖,尾巴摆动。
- 梳子:梳理绒毛。
- 按钮:Flap、Stretch(翅膀大幅张开)、Boop(打喷嚏:头向后仰,翅膀张开)、Toss、Smooth fur、Reset。
- 滑块:Stuffing、Pile、Wingbeat。
- 调色板:Mint(淡紫色翅膀)、Ember(珊瑚色配金色翅膀)、Dusk(薰衣草色配粉色翅膀)。
- 读数:质量、相对静止状态的体积百分比、实时翼展(厘米)、离桌高度(厘米)。
- 环绕与缩放;手机上为响应式堆叠布局;自适应画质;支持 reduced-motion。

溯源

原作者
vib3coded
发布日期
2026-10-05(由推文 ID 反解)
原始出处
查看原帖 ↗
收录来源
zhuyansen/awesome-opus-5.5-video · 2107020311380033949 · 未声明许可