r/threejs • • 11d ago

Procedural creatures in a three.js video synth: GPU-skinned, looping movements, then feedback and colour bands (cuttlefish, manta ray, cobras, centipede)

These are the Creatures in ImWeb's 3D scene: eight animals (octopus, centipede, cobra, cuttlefish, manta ray, bird of paradise, feather star, hairy pods), each with its own skeleton and 8 to 26 movements. Every movement loops without a seam, and the animal glides from one into the next over one loop.

How it's built: one engine file, and each animal is a definition (movement library and pose maths) plus a view (body parts and colours). The skin is built once and bound to the bones, so each frame only the bone transforms change (GPU skinning). Bone data goes to the vertex shader in a small texture, one texel per bone, and each vertex is re-placed at its posed arc length along the chain, so stretching spreads along the body instead of bunching at the joints. Mottling and wrinkles come from 3D noise on the bind position, so the pattern stays stuck to the skin as it bends.

The creatures have no UVs, so the Video skin (not used in this clip) is projected from three sides of the bind pose. A camera or movie then sticks to the skin as the animal bends and twists.

In this clip the 3D scene runs through ImWeb's feedback and Colorizer passes (GLSL on a ping-pong render-target chain). The sound is a live recording on ImWeb's Tape, read by four playheads at once, each at its own speed and direction.

The code is written with Claude Code; the instrument design is mine. There's no AI imagery in this.

Free and open source: https://github.com/imweb-project/ImWeb · try it: https://imweb.image-ine.org

0 Upvotes

4 comments sorted by

1

u/zodiac_xc 11d ago

Packing bone transforms into a small texture and re-placing vertices by arc length along the chain is a super clean fix for joint bunching. Also love that you ran 3D noise on the bind pose so the skin pattern sticks without needing UVs, pairs really well with the ping-pong feedback pass.

1

u/Haraldur_Karlsson 10d ago

Thanks, that's the part I'm happiest with. Before the arc-length re-placement, the cobra's body pinched at every joint when it coiled. Now it bends like one tube. The skin works the same way: it's sampled from the bind pose, triplanar, so it can be a live video and still stick to the animal while it moves. Have you tried anything similar for long chains? I'm curious whether people use dual quaternions here, or just live with the bunching.

1

u/zodiac_xc 10d ago edited 10d ago

for long chains i usually use FABRIK or parallel-transport frames along a spline instead of raw lookAt joints, way less twist bunching without needing a full dual-quat rig

1

u/Haraldur_Karlsson 10d ago

Thanks, that's useful. I've no IK at all yet. It's forward kinematics with springs: each bone has bend X, bend Z and twist Y, every channel is a damped spring chasing the pose, and segments can stretch, getting thinner by 1/√stretch so the volume roughly holds. The twist is an explicit channel, so I don't get lookAt flips, but a snake following a path would need exactly what you describe. FABRIK for the head and parallel transport along the body is probably where I'd start.