Forum

GPU Boids

So I’ve been trying to make a boids implimentation in dx11, but my coding skills are so lacking, that I don’t know where I’m going wrong!
I have a move to centre, which works, and an avoid neighbours, which almost works but doesn;t quite!
Either they join up into clusters, or they wiggle around like crazy!
Anyone care to suggest away to make this work?
I’m presuming its something really simple that I’m too dumb to work out!
again I’m working off the pseudocode from http://www.kfish.org/boids/pseudocode.html

(I’ve not really looked at the match velocity but yet!)

All suggests greatfully recieved, I’ve spent hours, asking WHY!!??
:)

dx11 boids (19.7 kB)

I have fixed a litle the wiggle and they don’t seams to join in cluster anymore , didn’t look at velocity match , but i did replace the float3 center with a buffer and a queue from the moving center position so the boids looks more like a boids and not like a moving sphere also you can send a spread of position in the buffer and have multiple boids…
it’s still far to be perfect…

ParticleSystem_Boids.zip (37.0 kB)