Forums > Jitter

jit.gl.render: Control 3D obj WITHIN the patch window+ ALSO in floating window?

January 16, 2012 | 6:43 am

I am trying to create a VJ type setup with a jit.gl.render 3D object::: Being able to grab and move around the 3D object on the screen IN THE PATCHER window,, and have that motion / rotation SHOW in REAL TIME in the floating window… This way you could have a full screen external window (Being projected) AND be able to control the 3D object IN the PATCHER window (This way not showing the mouse while the 3D object is being controlled).
The help file for jit.gl.render … It shows how to toggle between views BUT NOT in REAL TIME. So I am lost…
Thanks in advance !


January 16, 2012 | 7:28 pm

there’s a few ways to achieve this, but easiest is probably setting @shared 1 on you preview window and main window, creating a gl.node bound to your preview context, adding all drawing objects to that gl.node, capturing the gl.node to a texture (@capture 1), and displaying that texture on videoplanes in your two drawing contexts.

any animation objects attached to your objects bound to the gl.node which is drawing to the preview context, will receive mouse messages from the preview context.

patch below should get you started. let me know if you have any further questions:

– Pasted Max Patch, click to expand. –

January 16, 2012 | 7:32 pm

You can send jit.gl.handle messages to more than one object at a time.

A good solution in Max 6 would be to parent your whole world under a jit.gl.node. Make a second context that renders to a preview window, which has something like a torus, or basic GL object rendering at a lower FPS in there. Hook up a jit.gl.handle to the torus, but *also* send the messages to the main jit.gl.node on your output. You can then manipulate the jit.gl.handle on the torus in your preview and have it translate, rotate, scale your scene in the VJ output.

I was going to make a demo patch, but Max 6 crashed, and I wrote a bug report instead.


January 16, 2012 | 7:34 pm

Rob, that patch does not work for me under Max 6.0.3, (the scene renders but the handle/jit.anim does not rotate anything in the preview window, or the main window)


January 16, 2012 | 7:55 pm

ahh yes. my apologies, that bug has been fixed for the next release.

here’s a version that uses gl.handle instead of anim.drive that should work in 6.0.3:

– Pasted Max Patch, click to expand. –

January 16, 2012 | 8:44 pm

Thanks so so much ! This is EXACTLY what I wanted ! I really appreciate the help !


January 17, 2012 | 4:27 am

Actually I have another stupid question… It seems that the size of the window in the patcher determines the size / resolution of the floating window’s content (ie The window in the patcher has to be at least as big as the floating window for the resolution to hold up)…
What I really wanted was a small preview window in the patcher that I could grab the 3d objects with to manipulate … But have a HUGE floating window with high quality visual output… This way I could control multiple small windows within the patcher before "mixing" them to the large floating window…


January 17, 2012 | 5:43 am

Here is what I am working with ,,,


January 17, 2012 | 5:46 am

Here is the file … I am super new using gl with max .. Wanted to create a control window for this…


January 17, 2012 | 5:44 pm

on your jit.gl.node set @adapt 0 and @dim to the dimensions of your large window.


January 17, 2012 | 6:51 pm

Ok got it ! Thanks Robert ! … PS can you show me how to connect my above attached patch in order to integrate this method into a patch… Thanks ! Like I said, I am pretty ok using msp … but not jitter .. I am a total novice.


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