Forum

Fish swarm but not everywhere (particle collision)

hello all,

please see atched patch …
i try to simulate a fish swarm, so far so good.
but now i would like to avoid that the “fishes” swim in certain areas (red ones).
tried it already with attractor, but then you get always strange movments aka not so fish like.

any idea?

thanks benedikt

fish_swarm.v4p (20.8 kB)

hi benedikt,

attractors repelling the fish doesn’t look very satisfying.

i tried it the other way round:
set a matrix of attractors (attracting) without the “forbidden” zones. see patch: http://vvvv.org/tiki-download_file.php?fileId=930
the “red ones” are excluded from the matrix of “green ones”

i don’t know if this is usable but it is an idea.
well, different settings leading to very funny behaviour.
for sure you have to use very small strength settings.
my family doesn’t allow me the fine tuning right now…

btw.: thx for DetectObject! really great!

Quite like the patch, but of course this swarm is 2d, be interesting to see this in 3d.

you know that boid patch by mrtof?
Boids

@kalle
tried that already :) can’t find a nice behavieor with that way. shit.

@ele
hmm quite complex have to study that patch more :)

@SuperflysiNZ
3d should be easy … maybe later on

but i have now kind of ugly workaround solution, see new patch.
trick here to combine all “no go areas” with all particle positions and scale them out if they are in a no go area … okay not really cool, but visually a more or less solution :)

fish_swarm2.v4p (26.5 kB)