Forums > Jitter

images with Boids

November 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.


November 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 jit.gl.multiple 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.
http://www.allosphere.ucsb.edu/cosm/

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.
http://www.jitogre.org

here is a youtube link of the boids3d object controlling a bunch of animated fish meshes using jit-ogre.
http://www.youtube.com/watch?v=QViEumckqkk


November 12, 2009 | 1:45 am

wow nice stuff


November 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.


November 17, 2009 | 6:18 pm

Thanks for all the help thus far. Whenever I try to change the color within the jit.gl.mesh 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.

– Pasted Max Patch, click to expand. –

November 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.

– Pasted Max Patch, click to expand. –

November 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.


September 3, 2014 | 9:21 am

Hello

Tx got it working on Max6.1.8


Viewing 8 posts - 1 through 8 (of 8 total)