Material studies / No. 016 · three.js

Spider Melon.

Four gummy spiders, set in the jelly. They felt the knife coming. Cut carefully. Or don't.

Tool · Hand
Citrullus arachnis · set jelly, sugar, four spidersToxic variety
The Specimenfig. 16
Mass
≈ 0 g
Pieces
1
Loose
0/4
Spiders
Sealed in

40
tremblingset
25
livelysyrupy

Inside the experiment

The jelly

The slice is a rounded sector, extruded with bevelled edges and filled with about seven hundred tetrahedra. Every step runs extended position-based dynamics in ten substeps: each tetrahedron is matched to its rest shape through its own best rotation, found by a quaternion iteration that starts from last frame's answer, while a volume constraint keeps it from squashing. Damping only acts along the edges, so the jelly keeps its wobble but loses its buzz. The table pushes back with static and sliding friction.

Your hand is a soft spring on the particles near the point you grab. Flick to throw it, scroll or turn two fingers to twist it, tap to jolt it.

The knife

Your stroke is read on the jelly's surface and becomes a vertical blade plane. For each piece it crosses, the piece's best-fit rotation carries the plane back to rest space, where it is a straight line through the piece's convex outline. Both halves are meshed in advance. The blade presses a groove first; when it breaks through, the new pieces take over the old particles' positions and velocities through barycentric embedding and the blade wedges them apart. Every piece stays its own soft body, collides with the others, and can be cut again.

The light

  1. Moonlight shadow map with a blocker search for soft, jelly-tinted penumbras.
  2. A top-down height map, tagged jelly or spider, blurred into contact shadows and the jelly's light pool.
  3. The table, seeds, spiders and knife in a half-float, multisampled pass that stores depth in alpha.
  4. Jelly back faces for thickness.
  5. The jelly itself: refraction at an index of 1.42, absorption tap by tap, milky scattering in the pale band, glow that the seeds and spiders block, studio reflections, highlights and sugar glints.
  6. Bloom and Khronos PBR Neutral tone mapping.

The spiders

Each gummy spider is two ellipsoids, four bead eyes and eight two-bone legs. Sealed in, they ride their piece and twitch. A cut that passes close sets one free: it struggles, climbs out through the new face, runs along the top and jumps down. On the table they walk on alternating sets of four legs, circle the jelly, keep their distance from each other and run from your pointer and the blade.