Boids
Boids are my favourite hello world for 3D simulation environments. For the last few weeks, I&#x27;ve been using boids to update my GPU programming skills and knowledge of related algorithms in Unity and Unreal.<p>Yesterday I got 0.5 million boids simulating in Unreal Engine at 45 fps on a GTX 1080 [0]. The bottle neck is rendering so many instanced cone meshes, the simulation without rendering can do 1 million boids at 120 fps. I&#x27;m borrowing a common data structure used in GPU fluid simulations, the dynamic hashed grid, to calculate the neighbourhood of each boid (cool tutorial here with full source code [1]). We need the neighbourhoods to calculate their urges. My code is a mess at the moment, but if there is interest I can post it to GitHub (Unity and Unreal).<p>Boids are an example of agent-based modelling and swarm systems. I used agent-based modelling in my PhD thesis to construct and simulate realtime, interactive 3D biomolecular models of mitochondria and neuromuscular synapses [2,3]. Now that I&#x27;m free (graduated), I&#x27;m building an iPad app to teach and communicate structural and molecular biology with immersive, and realtime simulations. Our vision is to make molecular and structural biology immersive and fun. It&#x27;s not a textbook, it&#x27;s a little more like Neil Stephenson&#x27;s young lady&#x27;s illustrated primer! :D<p>[0]: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;timd_ca&#x2F;status&#x2F;1243941167005192192?s=20" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;timd_ca&#x2F;status&#x2F;1243941167005192192?s=20</a><p>[1]: <a href="https:&#x2F;&#x2F;wickedengine.net&#x2F;2018&#x2F;05&#x2F;21&#x2F;scalabe-gpu-fluid-simulation&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wickedengine.net&#x2F;2018&#x2F;05&#x2F;21&#x2F;scalabe-gpu-fluid-simula...</a><p>[2]: <a href="https:&#x2F;&#x2F;prism.ucalgary.ca&#x2F;handle&#x2F;1880&#x2F;111493" rel="nofollow">https:&#x2F;&#x2F;prism.ucalgary.ca&#x2F;handle&#x2F;1880&#x2F;111493</a><p>[3]: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;6CsxADBpal0" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;6CsxADBpal0</a>