Greetings, beautiful community.
I am currently dabbling in the boids flocking algorithms examples and research papers available online, trying to make sense of how I should implement it for my game.
My aim is to give my player the ability to control the flock using virtual or physical gamepad axis, and so as always, I am aiming for performance since the project is mobile-oriented and controlling the flock is one of the many things which will happen in the game…
While searching for WebGL examples, I stumbled across this example, try it, it runs butter smooth on mobile. Furthermore, there is a modified version using an imported gltf. Heck, this scene contains 4096 animated meshes and still manages to be above 30 FPS on my OG 2016 google pixel xl.
Quite impressive in comparison to the vast majority of other examples I’ve found, even 2D.
The whole thing is coded in GLSL, with which I am almost completely illiterate still…So I fail at seeing what exactly is going on. (Would be ready to learn, but the ressources online are not helping me to go further than a red triangle)
…And so this is why I am reaching out to the community, in case someone would know a little more about why this example performs so well and how one would go about making a similar thing in Babylon, perhaps by assembling it in the Node Material Editor…? Idea for a future tutorial video?
Here is a link to the HTML containing the whole code, so that you can have a look yourself at what black magic is going on exactly: three.js/webgl_gpgpu_birds.html at dev · mrdoob/three.js · GitHub
In hope to gain some insights and trigger a conversation that might help current & future boids-explorers…!