r/creativecoding • • 15h ago Bravo

1kb WebGL demo (2 lines of code)

90 Upvotes

<canvas id=c style=position:fixed;inset:0><script>c.width=W=innerWidth;c.height=H=innerHeight;with(c.getContext`webgl2`){P=createProgram();S=(T,s)=>attachShader(P,x=createShader(T),shaderSource(x,`#version 300 es

precision highp float;`+s),compileShader(x));S(35633,`void main(){int i=gl_VertexID;gl_Position=vec4(i%24-1,i/24-1,0,1);}`);S(35632,`uniform vec3 r;out vec4 o;float s;float M(vec3 p){p.xy=mat2(cos(p.z.2+vec4(0,33,11,0)));float k;s=1.;for(int j=0;j++<8;)p=2.fract(p.5+.5)-1.,k=1.3/dot(p,p),p=k,s=k;return abs(p.y)/s*.2;}void main(){float t=r.z,z=0.,d=1.,i=0.,q;vec3 D=normalize(vec3(gl_FragCoord.xy2.-r.xy,r.y)),c=vec3(0,.7,t.3),p;for(;i++<99.&&d>z/1e3;)p=c+z*D,z+=d=M(p);q=log(s);vec2 e=vec2(z/1e3,0);t=abs(dot(normalize(vec3(M(p+e.xyy),M(p+e.yxy),M(p+e.yyx))-d),D));o=vec4(sqrt((1.+cos(q+r.z+vec3(0,1,2)))t(1.-i/99.)+pow(t,60.))/exp(z*.15),1);}`);useProgram(P,linkProgram(P));F=t=>requestAnimationFrame(F,uniform3f(getUniformLocation(P,`r`),W,H,t/1e3),drawArrays(4,0,3));F(0)}</script>


r/creativecoding • • 14h ago

Creatures with their own skeletons in a browser video synth: GPU skinning, arc-length re-placement, then feedback (three.js + GLSL)

5 Upvotes

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. Each bone bends in two planes and twists about its own axis, and every channel is a damped spring chasing the pose, so tips lag and follow through. Mottling and wrinkles come from 3D noise on the bind position, so the pattern stays stuck to the skin as it bends.

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


r/creativecoding • • 21h ago

Turning soil moisture data into pixel animations

3 Upvotes

I made myself a plant pot with an ESP32, a soil moisture sensor, and a tiny OLED screen.

The pixel animations change based on soil moisture readings. I wanted to explore how environmental data could be expressed through a few pixels instead of numbers.

Just wanted to share this little experiment!✨


r/creativecoding • • 21h ago

[for hire] creative developer looking for his next opportunity

3 Upvotes

hoping this reaches someone who might be looking for a creative developer like me.

i work with three.js, webgl, 3d, shaders and interactive web experiences. i love experimenting with visuals, pushing creative boundaries and bringing ideas to life through code.

i'm still early in my career and just looking for an opportunity to keep doing what i genuinely love.

open to full-time, remote and freelance opportunities.

- portfolio: https://curllmooha.com

- sketchbook: https://sketchbook.curllmooha.com

- x: @curllmooha

if you know someone who's hiring or have something interesting to work on, please reach out. even a small lead would mean a lot to me right now.

thanks for reading :)


r/creativecoding • • 14h ago

Looking for places around experimental typography and visual poetry

2 Upvotes

Hi, I’m a musician also working with text and visuals. I’m looking for communities around visual/concrete poetry, generative text art and animated experimental typography. I’m interested in work that explores letters and words as organic entities or moves back and forth between language, abstract visual forms, movement, sound and music etc. Can anyone suggest relevant places here on reddit or elsewhere? Also recommendations for artists or works exploring these ideas would be nice!


r/creativecoding • • 4h ago

Emacs + Agents: coding agents that show their work in Emacs, run workflows, and work as a crew

Thumbnail gallery
0 Upvotes

r/creativecoding • • 5h ago

No video model: a 3D singer who obeys gravity, inertia and a measuring rule. Blender, Python, and a long list of mistakes.

Thumbnail
youtu.be
0 Upvotes

Upfront, since it matters here: the music is AI-generated (ACE-Step). Her body is an AI-generated 3D model (Hunyuan3D), rigged in Mixamo. The movement is motion capture of real people. The code was written by an AI (Claude). I'm the human: I set the rules, saw what was wrong, and debugged. No video model drew a single frame. Everything is rendered in Eevee on my own laptop.

Inertia means an object will continue its current motion until some force causes its speed or direction to change.

That was rule one. A jump plays at real speed. Stretch it and gravity changes, and everyone sees it, even if nobody can say why. Floor moves may follow the beat by about 10 %. Jumps never.

Rule two: measure, don't guess.

Skeletal animation or rigging is a technique in computer animation in which a character is represented in two parts: a surface representation used to draw the character and a hierarchical set of interconnected parts.

Wikipedia makes it sound tidy. Here is what went wrong, so you don't have to:

- Her right leg moved at 205 m/s. CMU mocap converted to FBX. Gimbal lock is the loss of one degree of freedom in a three-dimensional, three-gimbal mechanism. Could not be fixed safely after the fact. The original BVH files were fine.

- 40 % of the first version was standing still. It looked like a ballet recital, not pop. Switched to Mixamo pop moves, cut on the beat, poses on the lyrics. Stillness is an accent, not filler.

- She danced the whole night with her back to the camera. Stick figures look the same from both sides. Mixamo's heading is flipped compared to CMU. I only saw it in Blender.

- Thin arms. The upper arm twisted up to 168 degrees around its own axis and the skin collapsed like a candy wrapper. Twist clamped to 70 degrees with a swing-twist split.

- The shoulder still sank in. Mixamo's auto weights are made for arms down. Blender's bone heat weights gave a round shoulder.

- Light dots in her hair. The AI mesh had 1711 open edges and the bright wall showed through. Fill holes, recalc normals.

- Ghosting. Motion blur is the apparent streaking of moving objects in a photograph or a sequence of frames. Blender wants subframes, the dance only had whole frames. A frame_change_pre handler now interpolates between them. 180 degree shutter, like a real film camera.

- My computer at 100 % after I stopped a render. Orphan Blender processes. The launcher now kills its children.

Rendering: five Blender instances in parallel, each taking every fifth frame. One instance: 0.35 s per frame. Five kept the GPU (RTX 2080) at 65 to 80 %.

The camera follows a cut list, every cut on the beat: full body, half body, hand, feet, shadow on the wall. One beat in the second drop is slow motion, zoomed in. Only one.

You never see her face. The uncanny valley hypothesis predicts that an entity appearing almost human will risk eliciting cold, eerie feelings in viewers. So she stays a shadow that stepped out of the wall.

Still not solved: her feet slide a little, and her hair is stiff as a helmet. Next video.

My first pixels were on an ABC80, about 1x1 mm each. I don't complain about graphics much.