Bird flocks: modelisation and animation

As part of one of my course (computer animation, made by Ronen Barzel), I made with one of my friends a little soft which shows in real time the evolution of a bird flock - actually, the model we used is one of a bat :).

TAKE CARE : when loading big terrains, it can easily eat all of your RAM.

Needed libraries


In order to work, it needs a text file which contains :

There is a commented example of such a file in the source tree


We wanted to be real-time, we had to get a very simple way of deforming the bird shape: we define a set of 'control points', and we define a weight of these control points on each vertices by expf(-a * distance), where

When the control points are moved, we move the vertices by computing a weighted average of the control points' movements

Flock evolution

How birds are influenced

We use a force field model: flock/bird, bird/bird and terrain/bird interactions are modelised as forces, which are either vectors or rotations. At each step, we calculate for each bird the evolution of his speed vector by computing the sum of the forces.

Bird/bird interaction

It is based on the boids model. Basically, it tells that birds are only influenced by the other birds near them, and that one bird try to have the same speed, that it is attracted to the mean position and that it exists a short-distance repulsion between birds.

Flock/flock interaction

Sometimes, the flock gets divided into two or more little flocks. We try to avoid that by creating an attraction force between these flocks.

Bird/terrain interaction

We definitely want the birds not to go into the terrain. To achieve that, we compute a repulsing force field near the ground.

Screenshots & videos

Used to be "coming soon", but, well, it has been coming soon during a year... Let's say "coming someday"