Effect

Firefly Swarm

Kuramoto-coupled fireflies drifting on a divergence-free flow: random blinking slowly locks into sync, with ripples of light rolling through the swarm. Use for night, garden, forest, magical scenes.

  • fireflies
  • synchrony
  • kuramoto
  • night
  • glow
  • swarm
  • nature
  • magic

Settings and defaults

Intensity
1
Speed
1
Opacity
1
Color
#6f7d45
Count
150
Coupling
1
Frequency
0.55
Spread
2.4
Drift Speed
1
Glow Size
1
Flash Color
#d4ff5c

Firefly Swarm fills the air around an object with fireflies that blink at random at first and then slowly fall into step, until waves of light roll through the swarm. Then the rhythm loosens again and the cycle repeats, so the scene never settles into one pattern.

How it works

Every firefly has its own inner clock and flashes each time it completes a cycle: a quick rise and a fast fade. Each one is nudged toward the timing of its close neighbours. Because the pull is local, synchronised patches form here and there, grow and meet, and the small timing differences between them show up as ripples of light travelling across the swarm. The strength of that pull slowly rises and falls, so the swarm drifts in and out of sync instead of locking up for good. Between flashes each firefly is a faint dot. The swarm wanders on gentle currents that stir it without bunching it up, and keeps clear of the object and the floor.

Settings

  • Count: from twenty to four hundred fireflies.
  • Coupling: how strongly neighbours pull each other into step; 0 never syncs.
  • Frequency: flashes per second.
  • Spread and Drift Speed: the size of the swarm and how fast it wanders.
  • Glow Size, Color (the bodies) and Flash Color.

Use it for

Night gardens, forests, summer evenings, romantic and magical scenes. Pair it with Sea Sparkle for glowing water.

Code and API

Ready-to-paste React Three Fiber code and the 3DRise API are included in paid plans, inside the studio.

See plans

More effects

Works well with