jit.gl.render: Control 3D obj WITHIN the patch window+ ALSO in floating window?
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 !
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:
----------begin_max5_patcher---------- 893.3oc0X1rjhBCDG+r9TjhytVDPAcOMOE6kslxJRhXlERXSBp6N09tu4CvO lQc.Fzx4BTjz.c+K+S2M75vAdK46HROv2A+DLXvqCGLvNjYfAUWOvKGsKICI sl4kSjRTJwajaNEYmxNtbMRPv.X8Dq3Lkj9WhYRXvX+pgKPpj0TV5BAIQ4du g95YAASsmhBMGgyG6Cdt5VXk4TVFQYe+AUCRw12Je4KeCN06fk7RUsovi7DF J25Id+fHvHFp9Nblq9SAw4KddfmMy7ugCMGF0PnvHa0dx6XRFGgWhXoclIAy szv2cE7RPAdFn32iPwFC8IXdgpFiXz7wXAcCA7TIcQFUpHrtnel5fkS+.i6. qhOOqB5j.ZTWEQI77bBS8NXkjQS9E.wv.r.kBVSDDfhCDbERQ.5.PSBvVpZM HMa7ZscY62clQYjDdIS81vogpPGLCCbL0ICm32FzFU6JKKWtLibrYmBa+qA6 9U4owzFJlvKxPLs3SIPL4JtHWG4RhBDzWzCNwpHmF6Ro4OdplkQsgdS5QgoN xWjiTB5ttKQaLTKDjMTx1aGbmB8+rvM7KEbYb7QXMAUnJ04A5P5xf462Fa.W b6SWBOO3B6J3RyVXhVc7XgWmAngTEaoLLea86qvn5X5DkTN6HFXi8SxscRVs KWPN9x2zGgsYWWtcoBI02TMPqj.8eJQAggIhZIV60UvJEUfaGYXXqEV84FRW aW2lshoBJV2tagt1g6jhKJkcnwEWA0p16fyl0ZhE7fkBSwSSOz8wk2F41Es+ Xii24GdzBcboHhEDFppuB+q1v66hWpozSOJNTfk.h.IIcsa+Y1MNQSZsJH9F ruwEI8Ie9sd8RvAS6JdbU5ihtNdNy2GF8n+kPtRVfmVIQH.zlT4S8ozvYUME 0dozjuHofcEq5LfppQ0kuq9gAPHkRTR+.DXLxZ8pLttInC+JhKylosiMlUlE aoX0ZynQy1+pOBZ2tePi02reKwa9IV13yL9oDTxKEI0Op5edD3PHhIRMkrsK djQyNwl0TLlvNthClJMEgrAr+YWJar632.24M97szeZBclb27l3F3Mg2UuA9 kxafOTqT2OuIpAdS7cyal2.uI59kwA1.gSv80c9PkS3Cl+b+RABaxNqttb4p lhJJ1PDxpGo0Szcd7B21HQzH6kTl6R6Szy7KCpsexPyS6eC+O7bAwrB -----------end_max5_patcher-----------
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.
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)
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:
----------begin_max5_patcher---------- 876.3oc2XtzbaBCD.9r8uBMb10CBLX6dJ+J5kNY7HiViUJHQExwtMS+uW8.7 iF+.RHLN8fwCKhUq9XeI8xvAdKE6fROzWQeGMXvKCGLvJxHXP08C7xI6RxHk 1g4wgshkO4Mx8HErSYE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TLY what I wanted ! I really appreciate the help !
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…
Here is what I am working with ,,,
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.
Forums > Jitter