if you want behavior similar to jit.glue, then using jit.glue with matrices prior to turning in to textures is the simplest route.
otherwise, you can roll up your sleeves with jit.gl.pix to accomplish this. "sample" and "norm" are the operators to look at. you will need to set the output texture dimensions to whatever you want using a dummy texture in the left most outlet.
here's a basic example that glues together to video inputs to a single texture:
By the way - what's wrong with jit.glue? It's the obvious choice (unless you want to use usesrcdim / usedstdim and their friends srcdimstart, srcdimend, dstdimstart, and dstdimend to write to a named matrix, maybe)....
I am using jit.grab and doing fx with some shaders so I cann't combine those with jit.glue.
And jit.glue is hoggy when it comes to using multiple columns and rows. At least this is what I remember since I last used it intensively a few years ago.
Max, I will try that definitely. Christopher, that is what I was thinking of when I said I would need to add a jit.gl.node as there are many things that happen in the main render. Both solutions are great! And thanks again, Rob!
Just found this thread and have a question for those in the know.
If I wanted to construct a larger grid of videos (16x12 using 6 videos), than the jit.gl.pix option would be the best route in terms of performance over the other options offered...?
Yes, I have resized my video appropriately. I have constructed this 'video fabric' using the jit.glue route but would say it is not functioning at a performance level that cuts the mustard—particularly when switching videos.
I think I will roll up my sleeves and give the jit.gl.pix a try. To date, everything I have constructed in jit.gen has outperformed all other options.
Update on the 'video fabric' efforts and additional question.
To construct a 10x10 grid of video's I ended up using 6 x (jit.movie @output_tecture 1 @ texture_name (name) @colormode uyvy) to 100 x (jit.gl.gridshape @texture (name) @transform_reset 2 @automatic 1 @drawto cat) to (jit.world cat @fps 60).
I have 40 videos that are randomly read into the jit.movie objects.
Up until this past weekend, I had no issues and am loving the results. The ultimate test, however, is if the installation can run all night.
The issue is, after a few hours of running, I get an error message stating the movie file can not be found when the jit.movie attempts to read. I have to close the patch and reopen it to reconnect the file pathway. I'm working on a Mac Book Pro and have set the Energy Saver to 'Never' and have clicked the Prevent App Nap in Max. I added a counter during the last test to see how many read messages were successful before the error. 130 x 6.
I will test again this weekend and perhaps move the movie files to another location but other than that, I can't figure out what might be the issue. I'm stumped. Any thoughts?
sounds like maybe you're relying on the the current working directory path to load your movies. this will change to the location of the most recently loaded file, and so is not reliable if that location changes. you should either look into using absolute file paths for your movie files, or better yet use Projects.
This weekend I tested a few methods and ended up with the same issue. I even placed the movies in the media folder where all the Max demo video are located. But no go. After a few hours of running the installation, I get the “can’t find movie file” error.
But before that error message, there is always a series of jit.gl.fbo_texture draw begin: GL Error: Invalid value
I thought that perhaps the jit.movie was losing the connection with @output_texture 1 so I set up a periodic bang message to the jit.movie.
The weird thing is, and this is what confuses me, if I am working on the patch; as in manually triggering buttons etc., this error issue does not occur. I've work a whole day on this patch with no problems. I might give PHIOL's jit.gl.polymovie a go to see of that might work better.
Hi Rob, Thanks for the reply. I'm running in 64 bit. I stopped doing anything in 32 bit some time ago.
Hi PHIOL, Thanks A BUNCH for that! I will give it a go.
My issue was not fps as I was (joyfully) getting a solid 60 fps for the whole during when the installation ran.
It's just the patch stopped finding the movies after a few hours.
I placed all movies in a Projects folder, then placed them all into the OS Movie folder with a direct search link, and then (going old school) into the Max program media folder. Same thing happened, after running for a few hours the jit.moive kicked out the error message that the movie could not be found, preceded by the (jit.gl.fbo_texture draw begin: GL Error: Invalid value) error.
I’ll spend the weekend looking at your patch, and thanks again for that.
> I have 40 videos that are randomly read into the jit.movie objects.
>130 x 6
This is where I believe my patch will help you.
All videos are read only once(on startup), then (in my patch setup ) each video texture are called using noise to call @texture attribute. As you can see this occurs directly in the jit.gl.multiple object.
As common practice, you load everything on startup , then put it to sleep.
Then wake it up when needed. This is how thing are done in 3D gl gaming software.
If the camera does not see your geos , there are not processed. But still everything is loaded on startup and waiting for a go!
Here below (objects in blue),
I make it obvious how to change a single cell's texture