ai21.net
语言

软体果冻猕猴桃块模拟

演示视频

软体果冻猕猴桃块模拟 — 1

提示词

Build "Kiwi Jelly Wedge" — a single self-contained HTML file (inline JS/CSS, no libraries): a real-time WebGPU soft-body gummy kiwi wedge you can grab, stretch, lift and twist.
Object
One sixth of a thick kiwi slice: a pie-shaped wedge with 30° half-angle, radius ≈ 1.8 and thickness 0.56. Rounded corners (iq's exact pie SDF minus a rounding radius) and bevelled top/bottom edges.
Regions, measured from the tip in rest space:a cream core at the tip with a slightly lobed edge;
thin pale rays fanning out of the core every 2π/56, each with its own random brightness and length;
a darker, glassier ring around the seeds (blushes red in the Ruby variety);
bright juicy outer flesh with radial cell grain and a lighter band just under the skin;
a thin brown fuzzy skin on the arc wall.

Seeds:small flattened black teardrops, pointed end toward the core, in radial rows between the rays, at four depths;
the face layers break the cut surfaces like real seeds; the others float inside and show through the jelly;
wet glossy shading.

A few small air bubbles in the outer flesh.
Varieties: Green, Gold, Ruby.
Physics (XPBD tetrahedral soft body)
Mesh: 2D Delaunay of the rounded outline plus a hex lattice, extruded into prisms → tets.
Co-rotational per-tet shape matching (warm-started quaternion) plus volume constraints.
Stiffer skin and core tets; edge-velocity damping; floor contact with Coulomb friction.
Soft patch grab with bounded reach; scroll or a second finger twists the held patch.
Fixed 60 Hz step with 10 substeps; gentle settling.
Seeds and bubbles are separate meshes embedded in the tets by barycentric weights, so they ride with the flesh.
Rendering (WebGPU / WGSL)
Procedural photo-studio cyclorama with softboxes. Soft PCSS key shadow tinted green, plus contact AO from a top-down height map.
Seeds and bubbles are drawn in the scene pass. A back-face pass gives the view-ray thickness.
Jelly:refraction of the scene, with per-tap Beer–Lambert absorption by material (flesh, glassy seed ring, milky core and rays, opaque skin);
scattering, back-lit glow at thin edges, Fresnel studio reflections and GGX highlights;
a velvet sheen on the fuzzy skin;
sparse sugar glints in the flesh.

Post: exposure, Khronos PBR Neutral tone mapping, sRGB, dither.
UI (editorial "Material Studies / No. 028", English)
Italic serif title "Kiwi / Jelly." with the caption "An emerald wedge. A halo of seeds. A gentle wobble."
Status pill "WEBGPU · LIVE".
Panel "The Specimen": variety chips (skin / core / flesh bands); Firmness ("trembling → set") and Internal damping ("lively → syrupy") sliders; Give it a nudge, Reset, Pause; ¼ speed and Show mesh.
Readouts: Mass (g, 1 unit ≈ 1.6 cm at 1.3 g/cm³), Volume (% of rest), Kinetic (µJ).
A collapsible "Inside the experiment" with notes on the method.
Fallback "This kiwi needs WebGPU." Stacked mobile layout with no horizontal scroll.

中文译文

构建“Kiwi Jelly Wedge”——一个单独的自包含 HTML 文件(内联 JS/CSS,不使用任何库):一块实时的 WebGPU 软体果冻猕猴桃楔形块,你可以抓取、拉伸、提起和扭转。
对象
厚切猕猴桃片的六分之一:一块扇形楔块,半角 30°,半径 ≈ 1.8,厚度 0.56。圆角(iq 的精确 pie SDF 减去一个圆角半径),上下边缘倒角。
区域,在静止空间中从尖端量起:尖端处有一块奶油色核心,边缘略带浅裂;
每隔 2π/56 从核心向外放射的细长浅色射线,每一道都有自己的随机亮度和长度;
种子周围一圈更深、更具玻璃质感的环带(在 Ruby 品种中泛红);
明亮多汁的外层果肉,带径向细胞纹理,紧贴表皮下方有一条更浅的色带;
弧形外壁上的一层薄薄的棕色绒毛表皮。

种子:小的扁平黑色泪滴形,尖端朝向核心,位于射线之间的径向行列中,分四个深度;
朝向切面的种子层像真实种子一样突破切面;其余的在内部漂浮,透过果冻显现;
湿润光泽的着色。

外层果肉中有几个小气泡。
品种:Green、Gold、Ruby。
物理(XPBD 四面体软体)
网格:对圆角轮廓做二维 Delaunay 三角剖分,再加六边形晶格,挤出为棱柱 → 四面体。
逐四面体的协同旋转形状匹配(四元数热启动)加体积约束。
表皮与核心的四面体更硬;边速度阻尼;地面接触使用库仑摩擦。
作用范围有限的软性局部抓取;滚动或第二根手指可扭转被抓取的局部。
固定 60 Hz 步进,10 个子步;轻柔地稳定下来。
种子和气泡是独立的网格,通过重心权重嵌入四面体中,因此随果肉一起运动。
渲染(WebGPU / WGSL)
程序化摄影棚无缝背景,配柔光箱。柔和的 PCSS 主光阴影带绿色调,另有来自俯视高度图的接触 AO。
种子和气泡在场景通道中绘制。背面通道给出视线方向的厚度。
果冻:对场景的折射,按材质(果肉、玻璃质感的种子环、乳白色核心与射线、不透明表皮)在每次采样时进行 Beer–Lambert 吸收;
散射、薄边缘的背光透亮、菲涅尔摄影棚反射与 GGX 高光;
绒毛表皮上的丝绒光泽;
果肉中稀疏的糖晶闪光。

后期:曝光、Khronos PBR Neutral 色调映射、sRGB、抖动。
UI(编辑式“Material Studies / No. 028”,英文)
斜体衬线标题“Kiwi / Jelly.”,配说明文字“An emerald wedge. A halo of seeds. A gentle wobble.”
状态胶囊“WEBGPU · LIVE”。
面板“The Specimen”:品种标签(skin / core / flesh bands);Firmness(“trembling → set”)和 Internal damping(“lively → syrupy”)滑块;Give it a nudge、Reset、Pause;¼ speed 和 Show mesh。
读数:Mass(g;在 1.3 g/cm³ 下,1 单位 ≈ 1.6 cm)、Volume(% of rest)、Kinetic(µJ)。
一个可折叠的“Inside the experiment”,内含方法说明。
回退提示“This kiwi needs WebGPU.”。移动端采用堆叠布局,无横向滚动。

溯源

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