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 · 未聲明授權