Undergraduate Capstone:
Flock Control Techniques for Visual Effects [2013]

Flocking Banner Image

Alexander Clegg, Greg Turk


Using the fundamental concept of simulated flocking as described by Craig Reynolds in Flocks, Herds, and Schools: A Distributed Behavioral Model, we set out to model several effects commonly seen in games and motion pictures.

Multi-Flock Interaction:

We hypothesized that by altering the kinetic properties of multiple flocks with respect to one another, we could produce a number of interesting effects. Our primary interest was modelling predator-prey interactions such as those shown by A.K. Dewdney's Wa-Tor simulation. Our results can be seen in the above video, and confirm our hypothesis that a stable predator-prey relationship can be modelled with simple local perception and flocking forces.

Mesh Flocking:

Our goal was animated mesh flocking: applying control forces along with locally perceived flock forces to each particle in order to smoothly direct the flock into some shape defined over time by a collection of polygonal mesh key-frames.

Mesh Interpolation Image

Figure 1: Mesh keyframes (left). Particles flocking into shape (center). Flock filling mesh volume (right).
Full Video Below.

We solved this problem by Voxelizing the mesh at each frame of animation and computing a signed distance field for the volume. We then applied a new flocking force for each particle along the distance gradient. We found that this force alone would gather the particles in the deepest regions of the mesh and ignore thin structures such a the tail and legs of the mesh shown in Figure 1. We therefore replaced the distance gradient force with a diffusion force once a particle reaches the interior of the mesh volume. This pulls particles to neighbouring voxels with lower population. The combination of these techniques caused the flocks to naturally fill a shape, while still interacting with one another. However, in order to animate this process while keeping the shape recognizable, simply updating the distance field to the new frame was not enough. Thin, fast moving structures such as the legs of the horse mesh in Figure 1 would de-materialize as soon as animation began. To address this problem, we form a correspondence between the voxels at each frame and apply an impulse velocity at the moment of frame transition to each particle based on its voxel's approximate displacement. This tends to preserve local particle position relative to the animating volume.