1. Project Specifications - LariWa/BoidSimulation GitHub Wiki
Background
To create a realistic simulation of swarms (e.g. flocks of birds), Craig Reynolds developed the Boid-model for the flocking and schooling behaviour of swarm animals. The individuals of the swarm are called Boid, Every boid has its own perception of space and tries to follow three main rules. The Boid avoids collisions with nearby Boids. It attempts to match its velocity with nearby Boids and stay close to nearby Boids. [1]
These three main rules are visualized in Figure 1.
Figure 1: Boid behaviour rules from left to right: Collision Avoidance, Velocity Matching and Flock Centering (Figure from [2])
Reynolds flocking algorithm was developed further since its proposal. For example, Delgado-Mata et. al. [3] extended the algorithm to incorporate fear and Hartman et. al. added an external leading force [4].
Raynold’s algorithm is widely used in computer graphics for example it was used in the movie Batman Return to simulate bat swarms and flocks of penguins. [5]
Problem
During this project we will try to implement Reynold's algorithm, to simulate a swarm in a realistic way. The swarm should be able to avoid obstacles and move in a natural way. We are aiming for an A-grade.
Implementation
We intend to implement the algorithm with the cross-platform game engine Unity. In a first version of the implementation we will make use of 2D elements similar to the Flocking Algorithm Tutorial [6]. Subsequent to this, we will extend the project and use 3D objects. With these assets we will create an underwater world scenario to let the user explore and observe the behavior of a swarm/swarms of fish. To which extent and detail we will refine this underwater world is still an open question as this will heavily depend on how much time we will have left after implementing the algorithm. As the focus of this project is the implementation of the algorithm, we will not create the assets ourselves but rather use free assets provided online.
Problems we might face with this project are performance troubles which could appear due to the hardware we use, the number of boids and how well we implement the algorithm.
Evaluation
We do not intend to carry out a perceptual study. However, a study could evaluate the realism of the behavior of the fish swarm. The user would be presented with videos of real fish. Additionally, the underwater scenario created as part of this project work would be tested out by the user. After having taken a look at both, the user would then be able to grade the algorithm on its realism. The study would be carried out with 7 to 10 participants.
References
-
C. W. Reynolds, “Flocks, herds and schools: A distributed behavioral model,” SIGGRAPH Comput. Graph., vol. 21, no. 4, pp. 25–34, Aug. 1987, doi: 10.1145/37402.37406.
-
U. Erra, R. D. Chiara, V. Scarano, and M. Tatafiore, “Massive simulation using GPU of a distributed behavioral model of a flock with obstacle avoidance,” p. 8.
-
C. Delgado-Mata, J. I. Martinez, S. Bee, R. Ruiz-Rodarte, and R. Aylett, “On the Use of Virtual Animals with Artificial Fear in Virtual Environments,” New Gener. Comput., vol. 25, no. 2, pp. 145–169, Feb. 2007, doi: 10.1007/s00354-007-0009-5.
-
C. Hartman and B. Benes̆, “Autonomous boids,” Computer Animation and Virtual Worlds, vol. 17, no. 3–4, pp. 199–206, 2006, doi: 10.1002/cav.123.
-
I. L. Bajec and F. H. Heppner, “Organized flight in birds,” Animal Behaviour, vol. 78, no. 4, pp. 777–789, Oct. 2009, doi: 10.1016/j.anbehav.2009.07.007.
-
Flocking Algorithm in Unity, Part 1: Introduction https://www.youtube.com/watch?v=mjKINQigAE4
-
Coding Adventure: Boids https://www.youtube.com/watch?v=bqtqltqcQhw