Interactive WebGPU soft-body jelly whale physics toy
Prompt
The author shared the full prompt.
Build a single-file interactive WebGPU soft-body study called "Whale Jelly" (Material Studies / No. 043), matching the quality of an earlier watermelon-slice jelly study. Subject: a humpback whale cast in two layers of gummy jelly, lying on its belly on a studio table. Geometry: a signed-distance whale — an elliptical section swept along a curved spine (broad head with a flat crown, deep chest, narrow keeled tail stock), the belly pressed flat on the floor, smoothly joined to notched flukes with a scalloped trailing edge, long flippers with knobs along the leading edge, a small dorsal fin and twin blowhole dimples. Mesh it with surface nets and Newton projection; simulate it with a snapped hex lattice (5 tets per cell, a node layer on the floor) and XPBD (60 Hz, 10 substeps, co-rotational shape matching, volume constraints, edge damping, floor friction). Make the fins firmest and the clear body jelly softest. Look: clear tinted jelly over a milky layer. The milky layer is its own embedded surface, cut by a wavy line along the flank that rises at the head into the mouth. Light it with key light absorbed through the jelly above it, measured from shadow-map depth. Draw throat pleats, a dark mouth groove, head tubercles and tail-stock knuckles in the shader from rest-space coordinates as bump-mapped relief. Add glossy dark bead eyes and a few trapped air bubbles.
Prompt by @vib3coded, from their reply
- Stack
- Physics, WebGPU
- From the author
- $9.26; first try, no fixes or follow-up prompts.
- On X
- 995 likes · 54K views · 435 saves