Friday, 5 November 2010
Boids in Python
Coding boids in blender's python API might seem like a lot of unnecessary work, but when the built in simulation system doesn't offer quite the options you need there really isn't much choice! At least there's the hope that the python prototyping I'm doing might inspire a competent coder to leap to the mantle and take on the hard work. Boids generally work in 3D space without stable collisions and don't have the ability to be constrained to a surface/mesh (ie a mesh offset from the ground plane which represents the translational limits of say their torso/root bone). On the tube project we'll soon be starting work on a scene which requires a large scale crowd simulation. Over the last 4 days I've put down the foundations of an almost-stable collisions system in python with some basic flock awareness. More importantly I've implemented some important optimisations which make slow python less painful than it otherwise would be. Black specks on a grey background might look pretty boring, but this is a big milestone (almost) successfully reached in implementing my half typed up design docs!