matrix feedback for position trails without rota?

Nov 1, 2010 at 9:17am

matrix feedback for position trails without rota?

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?

here is the poly~patch:

– Pasted Max Patch, click to expand. –
#53039
Nov 1, 2010 at 5:23pm

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.

#190766
Nov 2, 2010 at 5:49am

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.

#190767
Nov 2, 2010 at 7:19am

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.

#190768

You must be logged in to reply to this topic.