School of fish in a tank

Hi. I am trying to recreate an aquaculture fish tank. I have my fish and a volume the size of the water. I assigned to the volume a particle system. The particle system has the physics set to Boids and and “bold brain” has a follow the leader, separate and flock active.

I set an icosphere to be the " leader " in order to replicate the movement of fish moving towards a direction. I was planning to animate a few icospheres and have different particle systems making a “cloud” of fish going in “random” directions within my volume.

The issues:

  1. The fish move backwards…so the tail is the one leading the direction. I want, of course, the fish moving forward…in direction of the head. Now they look like going in reverse.
  2. The fish fly away from the emitter (volume) looking like a slow mo explosion of fishes. I need to control the fish in order to have them flying in a reservoir.

If you know or have a different idea of how to make multiple (thousands) of fish within a volume and looking naturally swimming I am open to try your advice.

this could help

Thank you , but I am not sure this is giving any guidance to the issues commented previously. He is not confining the fish to a specified volume. I think this is a good tip to create what he is doing.


I will try and help with some of the things you mentioned.
Firstly, you could prevent the issue of the fish explosion by emitting the fish elsewhere. Specifically, you can choose to emit by volume instead.

In this way, you could make up regions for the fish to start off at.

As for backwards fish, is it possible to just rotate the fish mesh?

And finally, control.
It’s down to the settings of the boid physics.


Using some simple rules, I was able to achieve the above.

The follow leader allows for controlling the fish to move towards a target, which in this case is the empty named “Target”.

1 Like

Thank you so much for the detailed explanation. The settings I am using are kind of similar. The main issue is that I can not make the fish to be only within the volume. The idea is to replicate a fish tank and not having the fish going beyond those limits.

In your third demonstration, where the fishes are following the empty in my case they are just kind of moving weirdly in their own place…they do not follow anything. In your case they look like swimming correctly.

This can be achieved by adding physics to the fish tank walls. You need the “collision” physics. I left all the settings as default.

Make a basic box to hold the fish in, like this:

You can see how the fish are just unable to escape even though they want to reach the target. Of course, without the target, the fish can swim around randomly and they will fill the entire tank, without escaping.

And finally, for the fish not actually following the target or doing anything right, it comes down to the rules. I am using the random rule evaluation to get what I showed in the gif before so they will appear more realistic (each fish constantly chooses a random rule to follow).

It appears in your video that the fish are set wrong in some way. Perhaps you are using the rule order wrong (if not using random), or that you have an avoid rule or something added. With rules like avoid, the boids avoid the entire object, and not the actual geometry of it.

If you need it, I have also provided the .blend file to see what I set up.

Boids example.blend (2.4 MB)

1 Like