arrange Jit.gl.videoplane in grid

MIB's icon

I have 20 jit.gl.videoplane objects and would like to arrange them in rows and columns creating the appropriate size for each. Is there an easy way to do this? I haven't had any luck so far. Both the sizing and the arrangement have me stumped right now. I have a certain aspect ratio I'd like for the videoplanes but again I am not sure how to incorporate it.

I'd like to be able to have either 4x5 or 5x4 arrangement. I am still using Max 7 at the moment (if that makes a difference).

Thanks in advance.


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

Jesse's icon

Take a look at jit.gl.multiple

MIB's icon

I will have another look at jit.gl.multiple but I was under the impression I can only have 1 texture for it. I need a different image for each videoplane...

Jesse's icon

No you can texture each plane individually. Just pass in a list of named textures for the @texture attribute

MIB's icon

Just revisited the help file. Seems to be what I need. Thanks!

Pedro Santos's icon

There are many ways one could achieve the intended result: many individual instances, jit.gl.multiple, or even poly~. In any of them, though, you have to find a way to automate the calculation of the size and position of each plane...
Here's an example using poly~ and jit.gl.cornerpin instead of jit.gl.videoplane (jit.gl.cornerpin lets you define the 4 coordinates of the plane, while jit.gl.videoplane only lets you define position and scale).

X*Y Planes.zip
application/zip 5.65 KB

MIB's icon

Very cool thanks. I haven't used cornerpin before.

Brian Del Toro's icon

Pedro that patch is fantastic, thanks so much for sharing it!

Pedro Santos's icon

Thank you, glad I could be useful!