matrix feedback for position trails without rota?

llumen's icon

Hi,

I'm having some troubles when using jit.rota in a [poly~ 200] to do matrix feedback and can't figure out how to make this faster.

I get a [jit.matrix 3 float32 100 1] whit positions of boids, I want them to leave a trail when they move, so I use a submatrix dim 1 1 to feed each element to a different matrix. Using jit.rota with an offset of 1 I feedback the matrix over n steps, before I send it to a jit.gl.mesh to be drawn. It works like a charm, but there is a significant loss in fps.
I think the problem arises from the jit.rota, since drawing 500+ gl elements doesn't seem to be a problem.

Could someone set me along the right way to increase fps?

Max Patch
Copy patch and select New From Clipboard in Max.

here is the poly~patch:

Jesse's icon

I didn't read your patch, but if you're rendering to GL you can simply lower the alpha of the erase_color of the render context and you should get movement trails, for free.

llumen's icon

thx Jesse, I know I can do that but then everything in the scene has trails, which is not the way I want it. I did however came a step closer by replacing the rota object doing the fb on a dim 1 30 matrix in the poly~ object by one rota object outside of the poly doing feedback on a 100 30 matrix.

Jesse's icon

You can easily use multiple render contexts then - just take a look at Andrew Benson's Jitter Recipe called Render Master. In the end it will be a lot easier than trying to do trails this way.