Forums > Jitter

possible to render a opengl scene offsceen to send it via syphon ?

December 10, 2011 | 6:02 pm

Hello Jitter community,

I am trying to render a opengl scene with 2 videoplanes and one gridshape to a texture without displaying the scene to a window.
The question is: is it possible to render a scene offline ?

Later I want to pipe this texture with the jit.syphonserver to an other max application.

Here is a smal examplepatch.
Setting the visible to 1, everything is working fine.
If i set it to 0, my texture (dst) is empty :-(

Switching to max6 is not an option, because the syphon externals does not working …

My workaround is placing the jit.window offscreen with the position message, which is not very elegant …

Best,
TT

– Pasted Max Patch, click to expand. –


dtr
December 12, 2011 | 1:43 pm

i have the same issue: http://cycling74.com/forums/topic.php?id=33397

but i can live with hiding the window somewhere. jit.gl.node in Max6 might be a solution though. haven’t tried yet.


December 12, 2011 | 2:03 pm

The simple question is:
Is it possible to get a texure from jit.gl.render object without a visible [jit.window] or jit.pwindow ?
Perhaps someone found a solution ….
Thanks in advance !
TT


December 12, 2011 | 6:13 pm

I believe Vade is pretty close to having a fix for syphon in Max 6, if it’s not already done. The easiest way will be to use jit.gl.node @capture 1. You can make the render context any size if you use @adapt 0 on jit.gl.node.

In Max 5, your best bet is to use jit.gl.sketch "drawobject" commands.


December 13, 2011 | 11:50 am

Thanks a lot for the answer, Andrew !
I will go the jit.gl.sketch "drawobject" route.

I have to finsh my project soon, so i can not wait till
syphon is ready for max6.
TT


December 17, 2011 | 4:15 pm

Hi, sorry I missed this thread. I am away from home and don’t have great internet.

Here is a test version that has some fixes for @capture to work with node and other capture mechanisms. We had a bug with our OpenGL implementation which was assuming some state was never changed. We never had an issue anywhere else, except for with Jitter, which in some rare cases *does* change this state, and we never reset ours back to the assumed default. Programming is fun. This should fix many odd issues with the Jitter implementations.

Try this out, let me know if it works for you, and stay tuned for a legit release. Thanks,

http://dl.dropbox.com/u/42612525/jit.gl.syphon.zip

Note this also works with the implicit contexts in Max 6 (no need to specify a context name), which will make life much nicer for folks starting with GL.

Many thanks to JKC and Rob Ramirez for general Max API help.


February 1, 2012 | 2:03 am

Hi,
I’m not sure if this is the same thing, but I am missing how I can get my gl sphere to show up in the syphon window (I’m going into VPT and/or Madmapper). The capture 1 does get the background color changes, but not the object.

I am sure this is something I am totally blanking on, really new to gl and syphon… but here is the lighting patch I was trying to test this with.

thanks!

– Pasted Max Patch, click to expand. –

February 1, 2012 | 7:08 am

This patch has a few issues.

If you are going to capture a node to a texture, ensure the node is correctly drawing things. That node had nothing hooked up to it at all.

Secondly, since you texture is your ‘scenes’ destination, you probably want to ensure that you see what you are sending to syphon, via drawing your texture to a video plane.

Finally, I really highly recommend using the @layer or @automatic 0 feature to manually control order of operations with GL. Its gives you more explicit control as to render order, and you can ensure things happen when and how you need them.

See if you can find some ‘render to texture’ examples, and get them working in a cleaned up/simplified version of your patch.


February 1, 2012 | 2:39 pm

Hey- had this issue in a recent project- I found the easiest way is to send jit.gl.render a "to_texture texturex" message with every frame. Let me know if this solution is missing anything.

Rock and roll,

: j

– Pasted Max Patch, click to expand. –

February 2, 2012 | 1:25 am

Thank you ! Thank you! Thank you!

That got it! I am experimenting with projection mapping for the first time and wanted to make a cube with some lighting and Jitter goodness.

@ vade… I am sure you have heard it a billion times, but thank you for all of your contributions, both to the forum and to the craft in general.

@ goto10 this is exactly what I needed, I had never seen the to_texure trick before, thanks!

here is where I am going to start off, with vades rules to follow :)

– Pasted Max Patch, click to expand. –

March 26, 2014 | 1:08 pm

hi, am also very new to open gl processing and trying out projection mapping for the first time. Ive been experimenting with using the camera and the mesh. Problem am having is sending what can be viewed in the window to mad mapper. the stream is picked up but no graphics. probably just being slow but i know theres someone on here to shine the light on what on earth am not doing right please.

And still trying to figure out how to get my patch uploaded on here correctly…

– Pasted Max Patch, click to expand. –

got it but can’t get rid of the attachment. just ignore.


March 26, 2014 | 2:21 pm

you need to capture your scene with gl.node

– Pasted Max Patch, click to expand. –

March 28, 2014 | 12:27 pm

Hey Rob thanks. Tried messing around with your solution there but for some reason, it still wont stream any graphics through to mad mapper.The only difference now is that the patch renders to the servercontext and not the window. Head scratching….


March 28, 2014 | 1:36 pm

sorry, i misinterpreted your patch.
you don’t need that second context, if all you’re trying to do is send out through syphon.
check out the updated patch below:

<code>

– Pasted Max Patch, click to expand. –

</code>


March 28, 2014 | 2:26 pm

Tell you what, You are a Straight up legend. Problem solved. had my head pickled left right and centre to what it was. cheers Rob.


June 4, 2014 | 4:56 pm

Hi, maybe you can help me. I have been trying to record into syphon from the Tiny video patcher of the recipes. But I cannot find which object to plug into syphonserver. I tried the jit.gl.node capture method you mentioned above with no luck.
Thanks
Adina


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