I’m working on a performance patch for a university project.
I’ve currently trying to mix between two patches – one which does a simple crossfade between two images, the other uses jit.gl to perform a number of manipulations and distortions to an image on a jit.gl plane.
The problem I’m having is I’m using gl.asyncread to convert from the gl plane back into data which I can easily mix with my crossfade patch, it doesn’t look very good, it totally degrades the output of the image from the WTW-wobble patch. I think this is stemming from gl.asyncread as it looks great when I view it through jit.window. I’ve included all three patches – Thunderstorm is the main control interface and WTW-wobble is the patch i’m having trouble with. I hope theres a simple solution for this problem. Thanks
Check the dim and size attributes of the objects in your patch. I bet one of ‘m is defaulting to 320×240 resolution. Perhaps asyncread itself is the culprit.
You’re right. The asyncread objects destination dim is set to 320×240. I’ve tried changing it to 1200×800 but it keeps reverting to 320×240 any ideas why?
It gets the same resolution as the render context, which is the window size. You can get around this by rendering to a matrix directly, if you don’t really need the window. There’s just been another thread on this: http://cycling74.com/forums/topic.php?id=44440
Thanks. I’ve gone through the thread and have tried changing the drawto in the patch so as to send it to a matrix but haven’t been successful. I’ve tried resizing the jit.window and this sorts out the low quality issue, just leaves me with a massive window in the background- so it would be useful if i could get rid of this too and just have it rendering to a matrix.
why do you want to read back your gl image into a matrix?
it will be much more efficient and give you many more options if you instead send your matrix to your GL context and do the mixing there.
you really want to go in one directions (matrix to GL) and keep things in GL for the final display output, unless you have a specific reason not to do that.
in the patch below i’ve demonstrated how you can achieve the same thing as your patch, without using asyncread.
you want to draw your geometry using jit.gl.mesh, instead of the older gl.render messages.
you can then use jit.gl.node to capture this geometry to a texture (this replaced the gl.asyncread in your patch) and jit.gl.pix @gen xfade to crossfade this texture with another matrix.
----------begin_max5_patcher---------- 1256.3oc4ZtsipaCEF9Z3ovJWSQ1Nm6USUeG5MUUHODSvixossYFZ2Z+tWeH YFlcgfgIDBpZjl.wINK+k052qkMee9Lumq2SEdfeE7mfYy997YyLmRehYsee lWIY+5BhvbYdUz2pe9EuE1ljz8Ryo4.4V5yjp7tVp2IKnR4e2Ps8tmG3uZap gHWukUkuhSWKssFD.WBW.7SM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