jit.qt.grab + openGL

Mar 11, 2010 at 11:34am

jit.qt.grab + openGL

hello all,

alright i am just going to try my hardest to be clear and understandable (i appreciate it in advance… )

i have been putting together a live media project which i want to be finished with before the end of the semester (6 weeks and counting), and so i’ve been learning the basics about open gl, well, trying to anyway, and right now i am trying out the different rendering destinations. that chapter of the tutorial makes sense to me, but i am having trouble with the render to a matrix. what i would like to do is use the opengl with a jit.qt.grab. at first i was going to make a texture on the opengl using the live grab, but i’m not sure how to do that because the opengl that i am using is basically everything from the example patch called “plur”, and the opengl texture tutorial does not show a way of using live video feed as a texture. so now i am just trying any possible way to use both the opengl and the jit.qt.grab simultaneously, whether thats with mathematical operations for blending, or crossfading with xfade, or whatever. so in order to do that, i think it is necessary to render the opengl in a matrix, right? well i can’t seem to get the opengl to transfer from the jit.window to a jit.matrix anyway, i don’t know why. and also, the live grab (which is from another patch i made specifically for my new firewire camera, and from which a nice uncompressed image quality with camera driver settings are located) went to complete doo-doo when i sent it to a jit.matrix….

so! not sure if that is possible or not. i would love it if somebody shared a method for using a live video feed and open gl together, or at least pointed me in the right direction! the only reason that i plan on using the plur example is, well, cos its awesome number one, but also it seems like it would take some time to put together a way of using even simple polygons and shapes like that which can be controlled and moved and so on.. time that i don’t really have right now… so thanks so much for any feedback!

#49086
Mar 11, 2010 at 2:40pm

I suppose you want to use live camera input in a 3D environment (using openGL)? You don’t need to render to a matrix in that case. You’re talking about blending the grab output and openGL, I’m not sure I understand you completely here. Or do you want to post-process the rendering output?

Here’s a patch that shows how to use a video and OpenGL together. It’s a very simple patch though. If this isn’t what you mean, maybe you can explain again?

– Pasted Max Patch, click to expand. –
#176297
Mar 11, 2010 at 10:37pm

that patch was a great help – i think i was not routing properly or something… anyway, i've attached a picture of a test using the plur example and live input together… now, is there a way to use the live input as texture for the gl that i have in this patch? (so that i can manipulate the live input, just like the gl can be manipulated in this patch?) because right now i have the same plur gl as before but now the live input appears too… could i just attach gl “control parameters” to the live input now? thanks again!

[attachment=126978,206]

Attachments:
  1. Screen_shot_2010-03-11_at_5.21.54_PM.png
#176298
Mar 12, 2010 at 1:49am

ok i have fiddled around with it some more as you can see… the live input is now mapped onto a 3d object. you can also see that i have some objects and messages that are not connected to anything… i'm wondering how to use them – specifically the x and y step messages, gang, x and y range, and mode (i would like to use them to manipulate the live input). so now i can ask a more refined question(s): can jit.plur pass through my new 3d live input, so that it can be treated like so? and if so, how do i do that? do i need to make another jit.plur object?
i have attached another picture and i'll post my patch, too. in the picture, you can see the live input, which is an open cube 3d shape, and you can also see other lines which come from the jit.plur. what i would like to be able to do is to treat the live input like how these other lines and shapes are appearing in the picture i've attached (the ones that are not the live input, which is everything except the open cube shape). i'll be playing with it some more and i appreciate the help anyone. i will post results, too. :) :)

[attachment=126999,207]

Attachments:
  1. Screen_shot_2010-03-11_at_8.32.19_PM.png
#176299
Mar 12, 2010 at 1:54am

… and here is the actual patch of below…

– Pasted Max Patch, click to expand. –
#176300
Mar 12, 2010 at 4:36am

alright now i have it figured out… just took some patience (and sleep lol)

#176301

You must be logged in to reply to this topic.