Murmuration Lab simulates the breathtaking aerial displays of starling murmurations — massive flocks that form swirling, shape-shifting clouds against the twilight sky. The simulation captures the emergent behavior that arises from simple local interaction rules between individual birds.
The shader implements a continuous velocity field approach inspired by Reynolds' Boids algorithm, where each particle (bird) responds to three local forces: separation (avoid crowding neighbors), alignment (steer toward average heading of neighbors), and cohesion (move toward average position of neighbors). The velocity field is driven by layered noise that creates the large-scale sweeping motions characteristic of real murmurations.
Individual birds are rendered as elongated silhouettes oriented along their velocity vectors. A density accumulation pass creates the characteristic dark swarm cloud effect where birds overlap. The twilight gradient sky provides atmospheric context. Interactive controls adjust flock size, separation distance, alignment strength, and noise turbulence.