capture javascript with jit.gl.node
Hi I am very interested to work with this js glvideotrail.js.
I wonder if it is posible to use it in separate render context.
Either by achieving this effect with jit.gl.multiple with a texture argument.
or be able to capture it in a jit.gl.node
in any cases to incorporate this effect in a big patches with other effect.
thanks
Have you tried jit.gl.pass @fxname smear @ erase color 1. 1. 1. 0.1
Max 7 only.
you can capture jsglvideotrails to a gl.node, but you have to make some changes first.
since you've already created a render and window context, you need to remove those objects from the js file. you've correctly created a gl.node with the same name as the context that the js videoplanes are drawing to, so that's good.
another caveat, is you can't render in non-automatic mode when capturing to texture, so you must set automatic=1, and remove the videoplane draw call. i've pasted in the changed functions below:
// our jit.gl.videoplane objects and associated attribute arrays
var current = 0;
var vcount = 32;
var vspacing = 1.;
var vrotate = 0.;
var vscale = 1.;
var vbrightness = 2.;
var aplanes = new Array();
var apos = new Array();
var arot = new Array();
var ascale = new Array();
count(32);
function count(c)
{
if (c=vcount)
current = 0;
outlet(0,"bang");
}
then you simply trigger your movie with the same metro that triggers your rendering, and you should be good:
i posted an example of capturing with node and JS:
https://cycling74.com/forums/js-capture-jit%C2%B7gl%C2%B7mesh-to-texture-%C2%ABwith-jit%C2%B7gl%C2%B7node-and-automatic-0%C2%BB