Forging Station | Simple Flocking Simulation - Boids - Unity ECS/DOTS @ForgingStation | Uploaded November 2020 | Updated October 2024, 1 hour ago.
Today we are going to code & play around with some boids!!
You might have already come across this term as this is what Craig Reynolds called these entities in his flocking simulation proposed way back in 1986.
I have been messing around with collision avoidance recently, and I simply could not resist realizing boids.
******
IMPORTANT BUG FIX - Boid_Movement - Line #73 should be : alignment = alignment / total
The same result / massive flocking behavior can be obtained by playing around with exposed variables.
GITHUB has been updated.
******
Craig Reynolds - Boids
red3d.com/cwr/boids
The system is not fully optimized - not yet - because, if a given cell has more boids at any one point / cell, the frame rate drops which makes sense as alignment, separation, and cohesion have to be calculated for all the boids in the same cell - this can be reduced by having a smaller cell size but we may not get a nice flocking behaviour.
We can implement quad tree to improve performance but we also have to rearrange the data before processing (IJobParallelFor / shared key indices)
Source Code -
github.com/ForgingStation/Simple-Flocking-Simulation---Boids---Unity-ECS-DOTS
An amazing flocking simulation -
youtube.com/watch?v=mhjuuHl6qHM&vl=en
Today we are going to code & play around with some boids!!
You might have already come across this term as this is what Craig Reynolds called these entities in his flocking simulation proposed way back in 1986.
I have been messing around with collision avoidance recently, and I simply could not resist realizing boids.
******
IMPORTANT BUG FIX - Boid_Movement - Line #73 should be : alignment = alignment / total
The same result / massive flocking behavior can be obtained by playing around with exposed variables.
GITHUB has been updated.
******
Craig Reynolds - Boids
red3d.com/cwr/boids
The system is not fully optimized - not yet - because, if a given cell has more boids at any one point / cell, the frame rate drops which makes sense as alignment, separation, and cohesion have to be calculated for all the boids in the same cell - this can be reduced by having a smaller cell size but we may not get a nice flocking behaviour.
We can implement quad tree to improve performance but we also have to rearrange the data before processing (IJobParallelFor / shared key indices)
Source Code -
github.com/ForgingStation/Simple-Flocking-Simulation---Boids---Unity-ECS-DOTS
An amazing flocking simulation -
youtube.com/watch?v=mhjuuHl6qHM&vl=en