Going deeper into particle systems and that sort of things. I was thinking on steering wills, which would be a different force that would be applied to a particle inside a system. Being stubborn, I didn’t feel like using someone else’s library but wanted to make my own little bugs which would be working as a Flocking particle system.
For applet goodness click here
For some reason i do not understand at all, flocking and crowd management plug-ins exist in 3d applications but not in Motion Graphics/Compositing applications… since i saw Robert Hodgin’s birds, it had become an obsession for me to use flocks, and schools as motion graphic tools.
As an antecedent, the classic flocking logic and algorithms come from the Craig Reinold’s Boids which implement rules for steering based on cohesion, separation and alignment. So I started by using those rules and for the sake of interactivity and the so needed control added a “follow” behavior to make my little bugs follow the mouse.
This was a 2d project since at the time, my 3d programming skills were very lame -and still are-.
This was a challenging project since there is a new problem with this kind of ‘force’ being applied to a particle system, and is the fact that every particle has to check every other particle to know what force will be applied to it… and i had no idea how to solve this. Obviously, the solution was to pass the whole array of particles as a parameter when calling the update function for every particle and looping trough it to check which particles where close to the current one and finally compute the steering will for the current particle.
In my example, and for the sake of a nicer visualization, i made the local flock-mates visible by connecting lines, Red for avoiding and black for cohesion… i ended up ignoring the alignment desire since it probed itself useless when introducing a forced follow desire.
I also tried some cumulative results for the flock behavior and used the flock of particles to draw simple images, the results are not very predictable, but with a small group of particles and their joined lines, making every click a single stroke, very interesting results are possible.
In the future i hope to implement a 3d version of this and probably add more behaviors for the steering will force.
Very Recently i made some changes to the code to make it draw stuff and hence for typographic experiments. I hope to enhance it a lot soon.