modulating alpha videoplane

Dec 17, 2011 at 5:11am

modulating alpha videoplane

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!

#60716
Dec 17, 2011 at 8:54am

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

#218556
Dec 21, 2011 at 8:13pm

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…

#218557
Dec 27, 2011 at 5:54pm

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

#218558
Dec 28, 2011 at 2:57am

with pleasure

note that it is normally inside a M4L device.

– Pasted Max Patch, click to expand. –

Thanks

#218559
Dec 28, 2011 at 5:46am

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.

#218560
Dec 28, 2011 at 1:18pm

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.

#218561
Dec 28, 2011 at 9:23pm

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…

#218562
Dec 28, 2011 at 10:09pm

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.

#218563
Dec 29, 2011 at 1:25am

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.

#218564
Dec 29, 2011 at 2:56am

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

#218565

You must be logged in to reply to this topic.