Skip to content

sallam-ahmed/GPU-Flock-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GPU-Flock-Simulation

Untiy3D Implementation of flock simulation, GPU Powered.

Implementation Details:

Computation happens on the GPU using ComputeShaders, then the buffer with data is set in another SurfaceShader that calculates the view matrix for each boid -flock handled as a big mesh-, they're then rendered on the screen, thus eliminating the overhead of recieving the data from the GPU buffer to the CPU and drawing them again.

How to Run:

Start the sample scene Scenes/BasicFlocking and hit play.

Tweak the parameters of BasicFlockController to control the general behaviour of boids.

Unity Version:

  • 2018.3.9f1

ToDo Features:

  • Add Predation Behaviour (Some boids will act as a predator, seek to hunt other boids)
  • Add Flee Behaviour (Boids will run away from predators)
  • Add different ranges for each behaviour.
  • Add Boid Specific Skinned Animation.
  • Add Collision Avoidance (Boids will avoid collisions around the scene, will probably be baked static colliders) Collision Avoidance won't be feasible for the general purpose of the whole system!

Inspired by:

About

Untiy3D Implementation of flock simulation, GPU Powered.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published