Flock Behavior Based on Influence Maps

By Jonas Flensbak, 2007

Feel free to contact me through this page or at jonas at yfu dot dk.

Abstract

Flocking is an approach to simulating flocks of entities, but the traditional procedure suffers from poor performance, when simulating large, compact flocks. In this thesis a new procedure based on influence maps is presented and compared to the traditional procedure. The influence map procedure solves the problem of large, compact flocks and is overall competitive in comparison to the traditional procedure. Extensions for path following and flock shapes are covered and shown to be usable with the influence map procedure. Visualization of the influence maps may additionally make tuning of flocks easier, when compared to the traditional procedure.

Project

The complete report can be downloaded here (6.04MB).

This project is based on the works by Craig Reynolds.

A flash implementation by Chris Benjaminsen of the procedure suggested in this project can be found here.

A Flash 9 implementation by myself can be found here
Controls: hold left-mouse to attract, hold left-mouse + ctrl to repel, hold left-mouse + shift to draw attraction area (blue), hold left-mouse + ctrl + shift to draw repel area (red), press 'x' to clear drawing, press arrow up/down to increase/decrease flock population. If you are interested in the source code for this please contact me.

Tests and videos

All tests include the complete source code and note that the code is strictly developed for testing influence map based flocking. libpng, zlib, and OpenGL are used. Files for Windows are included with the basic test flock found in InfluenceFlocking.zip. However, you should expect to do some setup before it compiles.

Regarding setup, you can download updated libpng and zlib files here: UpdatedPngZlib.zip
If you are using Visual Studio you need to do the following: The dll files need to go in your /Release directory (or /Debug for the files ending on ...d.dll). The .h files need to go in the VC/include directory under the Visual Studio directory and the .exp and .lib files need to go under the VC/lib directory also in the Visual Studio directory.

To find the differences in the tests you must diff them yourself. The videos are encoded with the XviD codec.

Path Following
Test Pathfollowing With alignment behavior: Files | Video (4.55MB)
Test Pathfollowing - No Alignment Without alignment behavior: Files | Video (4.65MB)

Positioned Shape
Positioned Shape Files | Video (49MB)

Shape in Motion
Shape In Motion Files | Video (3.69MB)