Tuesday, July 21, 2009

Boids are back

Just committed:

Initial code for boids v2

Too many new features to list! But here are the biggies:
  • Boids can move on air and/or land, or climb a goal object.

  • Proper interaction with collision objects.
    • Closest collision object in negative z direction is considered as ground.
    • Other collision objects are obstacles and boids collide with them.

  • Boid behavior rules are now added to a dynamic list.
    • Many new rules and many still not implemented.
    • Different rule evaluation modes (fuzzy, random, average).

  • Only particle systems defined by per system "boid relations" are considered for simulation of that system.
    • This is in addition to the boids own system of course.
    • Relations define other systems as "neutral", "friend" or "enemy".

  • All effectors now effect boid physics, not boid brains.
    • This allows forcing boids somewhere.
    • Exception to this is new "boid" effector, which defines boid predators (positive strength) and goals (negative strength).

Boids are nowhere near finished yet, but at least now there's something to play with. I'll make some tutorial vids later on, but for now the best advice I can give you guys is:

  1. Reduce particles amount
  2. Set particle life time & size bigger
  3. Set physics to boids
  4. Set gravity to something negative
  5. Go wild and experiment!


  1. awesome ! I didn't know that current blender had even boid v1 , !!! I have to do some flock simulation soon :D but Im eager to see your tutorial.

    you are truly one of interwebs heroes. :D

  2. hey man!

    is it going to be possible to change some object animation after a particle hits something?, like a bird flying and then fallin because it hit an wall?

  3. Great work, keep it up! I'd also consider renaming relations from "neutral, friend, enemy" to "neutral, positive, negative" since I'm sure there are more uses of an negative behavior that just acting like an enemy.

  4. These would also be much easier to build using nodes, don't you think? Then you could just wire in any combination of rules, collisions, effectors, etc. I guess the same goes for particles. Would love to see that!

  5. Henrique:
    The current dupliobject animation code is a real mess, so it's not possible right now. But I am nearly certain that these things will be worked out for the Durian movie project and become possible.

    Bart Robinson:
    Naming can be discussed yes, but as the boids system is yet far from final I'll try to keep these kinds of trivial changes to a minimum. And yes you're right, nodes would be a great way to do it, but I'm afraid particle nodes are still quite a long way in the future.

  6. Jahka:
    Yes perhaps these things are far in the future, but you've already got a lot of us dreaming of things to come. As always, good work.