Unity Flocking Save Abandoned

CPU and GPU implementations of Craig Reynold's boids in Unity.

Project README

Flocking in Unity

A Unity implementation of Craig Reynold's boids.

gif

20,000 boids simulated entirely on the GPU, running at 60 fps (watch on Youtube).

About

Includes CPU and GPU implementations.

Both are naïve O(N2) implementations. The CPU version can handle about 150 boids at 60 fps, while the GPU version can handle about 20,000. (As tested on a Ryzen 5, Nvidia GTX 1060 machine. Your mileage may vary).

The GPU version requires a graphics card that supports Compute shaders and GPU instancing in Unity.

The CPU version includes a script to visualize some of the parameters of the boids. (Nearest neighbors, forces, and path over time).

To-do

  • Implement vertex animations for swimming fish and flying birds.
  • Improve performance with some kind of spatial data structure.
  • Add environmental awareness / obstacle avoidance.
Open Source Agenda is not affiliated with "Unity Flocking" Project. README Source: danielshervheim/unity-flocking
Stars
33
Open Issues
0
Last Commit
4 years ago
License

Open Source Agenda Badge

Open Source Agenda Rating