u/CodeSessionStudio

▲ 13 r/p5js

Follow-up: a new p5.js engine for long focus videos, with flow lines that loop seamlessly in 150 s without storing any particle state

A few days ago I posted a domain-warped mist piece here and got some great feedback, so here's the next engine.

Visuals ("fluxo"):

  • Thin wavy lines drifting left to right, with brighter streaks travelling along them like packets.
  • Two layers: the back one is denser, dimmer and slower, which gives a bit of depth.
  • The loop trick: nothing is stored from frame to frame. The streak pattern repeats along each line, and in every 150 s loop each line advances a whole number of repeats, so frame 4500 is exactly frame 0.

Sound ("pulso"): a separate synth engine with a warm pad, a brown-noise bed and a soft felt-hammer pulse at 70 BPM. The 10-min audio loop is exactly 700 beats, so the pulse never skips at the seam.

Follow-up on the "muddy darks" question from last time: I tested 1080p H.264, 1080p with a ±1-level dither, and 1440p HEVC 10-bit. After YouTube's re-encode the 1440p upload won: it got VP9 right away, and it's about 5× smaller.

The first piece felt more "sleep" than "focus" to me, so this one was designed the other way around.

Two questions:

  1. Does this read as "focus" to you, or still too calm?
  2. If you've done stateless looping particles in p5, how did you approach it?
u/CodeSessionStudio — 12 days ago
▲ 10 r/p5js

Made a 2-hour ambient piece in p5.js: domain-warped noise, rendered as a seamless 150 s loop

Sharing a project where p5.js does the visuals for long focus/ambient videos.

  • A domain-warped noise field with two slow speed layers (0.090 / 0.084 noise units per second).
  • Rendered frame by frame from p5.js and piped to ffmpeg. The bottleneck turned out to be moving about 8 MB per frame from the browser to ffmpeg, which gave roughly 11 fps on render.
  • A seamless 150 s loop, checked by measuring the seam against neighbouring frames. It came out invisible.
  • The audio is a separate synth engine, seeded like the visuals.

Two questions for people who've done this:

  1. How do you handle long renders from p5? Headless, or a faster way to get frames out?
  2. Any tricks for keeping domain-warped noise from looking "muddy" on very dark palettes?
u/CodeSessionStudio — 17 days ago