Orbserve Paints the Picture by Where the Pixels Land

A still image becomes a field of falling particles. Each one learns its color only after it stops moving.

8 min read • View on GitHub • More from jnsahaj

A wide editorial illustration of a transparent container with holes along its upper edges. Hundreds of identical white spheres pour in and cascade downward, and at the bottom the settled spheres have piled into the silhouette of a human face. Only the settled spheres are shaded with crosshatching; the falling ones are bare outlines. One sphere mid-fall has a dotted line dropping to the exact point where it will land. The image shows the core idea that a picture is assembled by physics rather than drawn in advance.
Particles fall uncolored and only take on shade once they settle. The dotted line marks the pixel a single falling sphere is about to claim.
Key Takeaways

The Picture Is Not Drawn. It Falls Into Place.

Most particle systems decide what a particle looks like before they set it in motion. They read the target image, hand each particle a color, and then animate it toward a destination it already knows. Orbserve runs that process backwards.

Particles spawn blank. They are identical white balls with no idea what they will become. Rapier, a Rust physics engine compiled to WebAssembly, drops them through a container, bounces them off walls, and lets restitution and friction decide where each one stops. Only then does Orbserve look down at the pixel beneath the settled ball and copy that pixel's color into the ball.

The picture is not drawn. It is discovered, one collision at a time.

That inversion changes what the image feels like. In a conventional system the target picture is a plan the particles are following, and the eye can sense the plan early. In Orbserve the image only resolves at rest. Until the balls stop, there is nothing to see but chaos.

Reproducibility is what makes the trick usable rather than merely pretty. The same seed, the same parameters, and the same holes reconstruct the same image from the same tumble. Run it again and the fountain finds the identical picture.

An extreme close-up editorial illustration of one sphere touching down on a grid of square image pixels. The sphere is half shaded, its fill just arriving. Beneath it a single pixel square is drawn in heavy crosshatch inside a magnifying-glass callout, showing the pixel's tone being copied into the sphere. Nearby spheres sit on their own pixels, each shaded differently. The image explains that color assignment happens locally, per particle, at the moment of contact.
The mechanical heart of the project: a settled sphere reads the pixel underneath it and takes that pixel's tone. Every particle does this on its own.

How a Pixel Becomes a Particle

Orbserve builds a run in six steps, all of them visible in the source tree.

  1. Container sizing. A helper called containerForAR fits the image's aspect ratio into a box capped at 720 by 480 pixels, tightening the limits on small viewports to leave room for UI chrome.
  2. Quality derivation. deriveQuality turns the container area and a fill ratio into a ball count with the formula N = round(area x fillRatio / (pi r squared)), then derives a spawn frame count from that number.
  3. Source rasterization. A hidden canvas is sized to the container and filled by a drawer function, which is either a procedural sample or an uploaded image.
  4. Precompute request. A newRun call posts a precompute message carrying a seed, the parameters, the holes, and the viewport to the worker.
  5. Simulation and recording. The worker steps Rapier forward, letting particles fall and settle, and records the resulting frames.
  6. Replay. The main thread plays the recording back as a smooth animation.

The ball count is not arbitrary. It falls out of the container's area and a target fill ratio, so a denser picture simply means more spheres. The seed threads through the whole run, which is why the same inputs always land the same image.

Two Threads, One Loop

Physics is expensive and bursty. Rendering has to be smooth and continuous. Orbserve splits them across two threads so neither one waits on the other.

Rapier runs inside a module worker, loaded with new URL("./worker.js", import.meta.url). The worker owns the simulation. It steps the world, watches for particles that have come to rest, samples the source canvas at each resting position, and writes the results into a recording.

The main thread owns PixiJS v8. It draws through a ParticleContainer, which is built for pushing thousands of sprites cheaply, and it prefers WebGPU with a fallback when the browser cannot provide it. The two sides never share objects. They talk only through typed messages, which keeps the boundary clean and the coupling minimal.

The payoff is that an expensive, uneven simulation can run to completion off the critical path while the visible animation stays steady. The recording is the handoff, and replay is what the reader actually watches.

Color is assigned the moment a particle stops moving. The worker simulates and records; the main thread replays the recording.

What Orbserve Is Not

The difference between Orbserve and a standard particle image is a difference in philosophy, not a checklist of features.

DimensionConventional particle imageOrbserve
Color assignmentBefore simulation, per particleAfter simulation, at resting pixel
What drives the picturePre-computed target positionsPhysics decides landing spots
ReproducibilityTied to the target mapTied to seed, params, and holes
Visual characterParticles fly toward a known imageImage emerges from collisions
Failure modeParticles reveal the plan earlyThe picture only resolves at rest

Two limits are worth stating plainly. The README promises export to video, but the visible code only carries export state in App.tsx, an exporting flag and an exportProgress value. The mechanism that would produce the file is not verifiable from the source tree, so treat the feature as advertised rather than demonstrated.

The repository is also thin on metadata. It ships with no description, no license, and no topics, and the README is terse. None of that changes what the code does, but it does tell you how the project is being positioned: as an experiment rather than a product.

What the Repo Tells Us About Its Making

The artifact discloses its own character. The source is organized with unusual discipline for a personal project. Simulation lives in worker.js, rendering in usePixiRenderer.ts, state in Zustand stores, and pure domain logic in lib. The boundaries are clean, and the only coupling between physics and graphics is a set of typed messages.

State is split deliberately. Settings a user would want to keep, such as parameters, holes, theme, and speed, persist to localStorage with versioned migrations. Ephemeral simulation state stays in memory. Uploaded images go to IndexedDB through the idb library. Each kind of state gets the storage that fits it.

What the repo does not disclose is who built it or why. There is no verified author statement, interview, or documentation of intent. The honest reading is that Orbserve is a personal experiment that lets its code speak for itself, and the code is worth listening to.