Best GL object for rendering multiple objects

radiotonga's icon

Hi everybody, I have 3 questions:

What is the best GL object for rendering multiple objects a la boids? jit.gl.sketch, jit.gl.mesh? I'm thinking of having at least 5 instances of this same object rendering each a group of 10-20 voids.

Also, what would be the most economical shape for rendering these boids? I suppose "point" would be the most economical, but it's a shame it won't allow me to use a texture on it, or am I wrong? It looks like it will accept only one pixel from a texture object.

And finally, how can I make these boids leave a trail on their path, like a comet? Right now I'm just using the alpha of the color property of the jit.gl.render object, but this isn't very sophisticated because the trail is not smooth and it affects the whole group, including jit.gl.handle, etc.

Rob Ramirez's icon

jit.gl.multiple, poly~, javascript

for trails, you either do it in 2D screen-space (the erase_color method), or you need to create your own system that duplicates the geometry for the trail and fades and scales as the trail disappears. not simple but certainly possible.

phiol's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Hope this gets you started