Forums > Jitter

modulating alpha videoplane

December 17, 2011 | 5:11 am

I realized today that my jitter patch is slowed down by modulating the alpha of a videoplane. I want to map the amplitude of the sound to the alpha of some videoplanes. I used speedlim 30 to avoid it to be modulated faster than the speed of the images.

Someone has an idea how to do it without losing performance?

Thanks!


December 17, 2011 | 8:54 am

I’m not really sure but
[ jit.qball ] instead of [ speedlim ] might help.


December 21, 2011 | 8:13 pm

I tried to use jit.qball instead of speedlim or one after the other and it’s about the same.

When I remove that mapping, I win 10 fps more on 8 videoplanes at the same time. It’s quite a lot and make think about removing that mapping…


December 27, 2011 | 5:54 pm

How are you modulating the alpha channel? Could you post a simple patch that demonstrates the technique?


December 28, 2011 | 2:57 am

with pleasure

note that it is normally inside a M4L device.

– Pasted Max Patch, click to expand. –

Thanks


December 28, 2011 | 5:46 am

I see no reason why this patch would cause a significant slowdown. It’s not doing anything computationally intensive. You could get rid of the unpack/pack combo in favor of [zl slice 3] and reduce your object count though.


December 28, 2011 | 1:18 pm

Hmm… julienrobert,
the patch you attached is not sufficient to guess the reason.

But I’m trying to guess:
Since slow-down problems when working with open-gl objects are often caused by multiple, traditional Max timing objects such as [ metro ], [ snapshot ], [ line ], etc., I’d recommend you to check if you are using [ metro ] instead of [ qmetro ], and try to use only one [ qmetro ] as a ‘master clock’.

This is also why I told you to use [ jit.qball ] instead of [ speedim ] in the last post of mine.


December 28, 2011 | 9:23 pm

Yes, I’m using a qmetro 30 as a master clock for all the videoplanes.

Note that I’m modulating the alpha of 8 videoplanes at the same time and together, when I shut the modulation off, I save about 10 fps. It means that each modulated alpha reduces the fps of about 1-2 fps…


December 28, 2011 | 10:09 pm

Do you have depth_enable on or of? How big is the window and do the videoplanes fill the entire window? When you overdraw a window many times, you can start to become fill rate bound, meaning the GPU can’t process the number of pixels you’re asking it to. If you could make a normal Max patch that demonstrates the same problem, that would help.


December 29, 2011 | 1:25 am

ok. I’ve found that the patch works well in Max alone. The problem comes when I use it inside M4L.
This is the live set with the M4L device.

I tried to clean the patch the much as I could.


December 29, 2011 | 2:56 am

deph enable = 0

it’s running around 20 fps with modulating alpha activated and above 25 fps when it’s off. keep in mind that this patch is running 3 videoplanes and in the big patch, there are 5.

macbook pro, 2.8 GHz Intel Core 2 Duo, 8 gig, 10.6.8, NVIDIA GeForce 9400M

thanks


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