images with Boids

    Nov 11 2009 | 2:44 am
    I have been playing around with jit.boids 2d and 3d. I would like to know if there is a way to get other shapes or objects (such as birds or fish as examples) to replace the orbs or squares within the jit.boids objects.
    Any help would be greatly appreciated.

    • Nov 11 2009 | 7:25 pm
      you can send the matrix out of jit.boids3d into an jit.iter object, and use the 3 values as the position attribute for any gl object you wish. encapsulating your 3d object in a poly~ is one possible solution. another is drawing a single gl object multiple times (the number of boids) each draw call. a third is sending the boids3d matrix to the position input of a object.
      one thing you will have to figure out with objects that have a direction (unlike circles or spheres) is how to orient them based on their velocity vector. the quaternion externals found in the COSM library can assist with that.
      alternatively, you could try the jit-ogre external, which will allow you to load 3d objects with pre-made animations. this external has an auto_orient attribute which will automatically orient the object based on it's velocity vector.
      here is a youtube link of the boids3d object controlling a bunch of animated fish meshes using jit-ogre.
    • Nov 12 2009 | 1:45 am
      wow nice stuff
    • Nov 12 2009 | 7:06 pm
      Also, have a look at the Jitter Recipes. Lots of sprite rendering examples in there, using a jit.matrix to drive animations.
      Best, Andrew B.
    • Nov 17 2009 | 6:18 pm
      Thanks for all the help thus far. Whenever I try to change the color within the boids of the patch, the boids within the boids subpatch they change shape from nice orbs (what I want) to squares (not what I want). Then when I change everything back to what it started at it stays as squares. I would like to change the color of the boids while keeping them the orbs. How do you accomplish this.
      bellow is my patch thus far.
    • Nov 17 2009 | 6:37 pm
      the following should work.
      next time, try and post only the part of your patch that relates to your question. it makes it easier for us to offer advice.
    • Nov 17 2009 | 10:14 pm
      Thanks again for the help. Sorry about the large patch. Wasn't exactly sure what you needed to understand everything.
    • Sep 03 2014 | 4:21 pm
      Tx got it working on Max6.1.8