Interactive WebGL Simulation of a Starling MurmurationInteractive WebGL Simulation of a Starling Murmuration
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Where I grew up, starlings gather over the marsh at dusk. We call it sort sol. Black sun. So I tried to build it.
The animation starts on the ground in Ribemarsken, the marsh outside Ribe, Denmark's oldest town, on the west coast. The cathedral is behind you. Then you rise toward the flock and end up flying inside it.
Fun fact: my father used to play the organ in that cathedral.
There's no video in it. Everything is calculated live in the browser with plain JavaScript and WebGL. 7,000 birds are simulated, and each one is drawn several times, so you see up to 140,000 on a big screen. The sound is generated live too. No audio files.
The fun part was the research. The numbers come from scientists in Rome who filmed real flocks with several cameras and rebuilt them in 3D.
What they found, in plain words:
Every bird watches only 6 to 7 neighbours Not the whole flock. Not a leader. Just the seven closest birds, whether they're 70 cm or 1.5 m away.
A murmuration is mostly air They keep about a metre between them and almost never come closer than one wingspan. It looks solid from the ground. From inside it's open.
The flock is a thin, flat sheet Not a ball. It slides almost level over the marsh. The dark patches you see are where the sheet folds or tilts, so you look through more birds at once.
Nobody decides a turn A few birds at the edge turn, and it passes from neighbour to neighbour like a wave. Much faster than the birds actually fly.
The same wave beats the falcon When a falcon attacks, dark bands run through the flock away from it. Each bird copies a quick sideways roll from its neighbour. The more waves, the less the falcon catches.
One detail I didn't expect: birds keep their head steady while the body rolls and turns. So I steadied the camera the same way. The view used to tilt up to 23 degrees. Now it's under 8, and it stopped feeling like a rollercoaster.
Some things nobody knows. Nobody has filmed from inside a murmuration, and nobody has measured how hard a starling banks in a turn. Those parts are my best guess.
You can fly with them here: attabird.com/sortsol
Turn the sound on.
VSN's avatar
Rising from the marsh with the cathedral behind you and then ending up inside the flock is a beautiful way to open it, and doing 7,000 birds plus live sound with no video file at all is seriously impressive. The 6–7 neighbours rule is such a good detail to build on. Your...
Henrik's avatar
Thank you for that comment! That's really nice of you!
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started