Forums > Jitter

Best way to mix a varying number of matrices together

Feb 08 2014 | 6:48 pm


I am trying to make a patch which combines a (potentially quite large) number of video inputs into one matrix. I want to be able to control the opacity of each video. Say there were 5 videos I might like them to all show at 20% opacity, or I might like one to show at 40% and the rest and 15% and so on.

The number of videos may change, so I would like the patch to adapt to this circumstance.

The ways I’ve thought about doing this is with straight jitter and probably javascript or using opengl and slabs (and probably still javascript).

I would really appreciate some feedback on a good approach to aim for because I haven’t done a lot of work with opengl, shaders or javascript within max. I don’t want to dive into shaders right now if it’s not necessary for my project.

Jitter tutorial 43 (a slab of your very own) is pretty much what I want, but I want to make the number of videos variable.

Thanks in advance!

Feb 09 2014 | 1:28 am

I’d do it with openGL en poly~ by making a poly-voice that contains a going into a for each video. Lets you control the number of video’s by changing the voice count and has messaging built-in for sending commands to individual voices/videos.

Feb 09 2014 | 1:29 am

Plus the number crunching for mixing your matrices will be off loaded to your graphics card.

Btw, no need for slabs, you can control the mixing with the opacity of the videoplanes (unless you need more funky mixing modes).

Feb 14 2014 | 12:20 am

Thank you for your response. I had no luck rendering multiple videoplanes with different videos, but I was able to to sequentially add videos to a single videoplane after altering their alpha values and setting the videoplane @blend to alphaadd. Making the number of clips variable is a work in progress, thanks for the poly~ suggestion :)

Feb 14 2014 | 3:14 pm

Did you set @blend_enable 1 @depth_enable 0 on the videoplanes?

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

Forums > Jitter