Boids
Boids are my favourite hello world for 3D simulation environments. For the last few weeks, I'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'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'm free (graduated), I'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's not a textbook, it's a little more like Neil Stephenson's young lady's illustrated primer! :D<p>[0]: <a href="https://twitter.com/timd_ca/status/1243941167005192192?s=20" rel="nofollow">https://twitter.com/timd_ca/status/1243941167005192192?s=20</a><p>[1]: <a href="https://wickedengine.net/2018/05/21/scalabe-gpu-fluid-simulation/" rel="nofollow">https://wickedengine.net/2018/05/21/scalabe-gpu-fluid-simula...</a><p>[2]: <a href="https://prism.ucalgary.ca/handle/1880/111493" rel="nofollow">https://prism.ucalgary.ca/handle/1880/111493</a><p>[3]: <a href="https://youtu.be/6CsxADBpal0" rel="nofollow">https://youtu.be/6CsxADBpal0</a>