Forums > Jitter

Best GL object for rendering multiple objects

July 28, 2014 | 2:52 pm

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.


July 30, 2014 | 9:25 am

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.


August 22, 2014 | 9:34 am

Hope this gets you started

– Pasted Max Patch, click to expand. –
  • This reply was modified 2 months by  phiol.

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