nrt recording of glfeedback

May 19, 2006 at 1:44pm

nrt recording of glfeedback

dear list,
i’m stuck with this opengl patch. it is built with the texture
feedback technique described in andrew’s GLfeedBack recipe, and now i
wonder how i could get the data back into a matrix for non-realtime
recording? (this computer of mine, a tibook 1ghz x.3.9 with latest
max/jitter, is too old for shaders i’m afraid so i couldn’t use randy’s
render_node)
i tried replacing the jit.window with a jit.matrix with the same dim
and then grab a texture from there but i couldn’t make it work. any
hints?
thanks/fredrik

simplified example…

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 163 103 56 196617 s v_rmain;
#P newex 128 39 51 196617 qmetro 2;
#P user jit.fpsgui 85 98 60 196617 0;
#P newex 157 229 30 196617 t b b;
#P newex 40 268 56 196617 r v_rmain;
#P newex 177 307 283 196617 jit.gl.videoplane test @rotatexyz 0 180 0
@scale 1 1.001 1.;
#P objectname jit.gl.videoplane;
#P newex 40 307 86 196617 jit.gl.render test;
#P objectname jit.gl.render;
#P newex 177 274 215 196617 jit.gl.texture test @name feed @dim 320 240;
#P objectname jit.gl.texture;
#P newex 157 210 48 196617 loadbang;
#P message 157 248 81 196617 usetexture feed;
#P newex 128 65 126 196617 t b erase to_texture b b b;
#P toggle 128 22 15 0;
#P newex 220 140 255 196617 jit.gl.gridshape test @shape opencube
@poly_mode 1 1;
#P newex 73 435 189 196617 jit.window test @size 320 240 @fsaa 1;
#P newex 268 114 84 196617 jit.gl.handle test;
#P button 107 39 15 0;
#N counter 0 359;
#X flags 0 0;
#P newobj 332 71 74 196617 counter 0 359;
#P newex 268 95 126 196617 pak rotatexyz 10. 0. -10.;
#P number 190 33 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 73 481 108 196617 jit.qt.record 320 240;
#P message 204 481 122 196617 write ttest.mov 25. jpeg;
#P window linecount 2;
#P comment 281 437 149 196617 how to get this into matrix and record in
nrt???;
#P connect 17 0 15 0;
#P connect 12 0 15 0;
#P connect 1 0 2 0;
#P connect 11 0 19 0;
#P connect 10 0 20 0;
#P connect 6 0 11 0;
#P connect 20 0 11 0;
#P connect 13 0 18 0;
#P connect 18 0 12 0;
#P connect 11 1 21 0;
#P connect 11 3 21 0;
#P connect 11 2 21 0;
#P connect 3 0 20 1;
#P connect 18 1 14 0;
#P connect 14 0 16 0;
#P connect 7 0 9 0;
#P connect 11 4 9 0;
#P connect 4 0 7 0;
#P connect 11 5 5 0;
#P connect 5 0 4 2;
#P window clipboard copycount 22;

#|
fredrikolofsson.com klippav.org musicalfieldsforever.com
|#

#26058
May 19, 2006 at 2:52pm

For non realtime acess of gl picels in a matrix, use jit.gl.sketch and
the message glreadpixels.

best,
wes

#77403
May 19, 2006 at 9:32pm

> For non realtime acess of gl picels in a matrix, use jit.gl.sketch and
> the message glreadpixels.

all right! thank you wesley. that worked really well. now off to
fight nrt audio.
and here’s the updated example…

#P user jit.pwindow 504 386 82 62 0 1 0 0 1 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 624 217 48 196617 loadbang;
#P newex 163 103 56 196617 s v_rmain;
#P newex 128 39 51 196617 qmetro 2;
#P user jit.fpsgui 85 98 60 196617 0;
#P newex 157 229 30 196617 t b b;
#P newex 40 268 56 196617 r v_rmain;
#P newex 177 307 283 196617 jit.gl.videoplane test @rotatexyz 0 180 0
@scale 1 1.001 1.;
#P objectname jit.gl.videoplane;
#P newex 40 307 86 196617 jit.gl.render test;
#P objectname jit.gl.render;
#P newex 177 274 215 196617 jit.gl.texture test @name feed @dim 320 240;
#P objectname jit.gl.texture;
#P newex 157 210 48 196617 loadbang;
#P message 157 248 81 196617 usetexture feed;
#P newex 128 65 134 196617 t b erase b to_texture b b b;
#P toggle 128 22 15 0;
#P newex 220 140 255 196617 jit.gl.gridshape test @shape opencube
@poly_mode 1 1;
#P newex 73 435 189 196617 jit.window test @size 320 240 @fsaa 1;
#P newex 268 114 84 196617 jit.gl.handle test;
#P button 107 39 15 0;
#N counter 0 359;
#X flags 0 0;
#P newobj 332 71 74 196617 counter 0 359;
#P newex 268 95 126 196617 pak rotatexyz 10. 0. -10.;
#P number 190 33 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 73 481 108 196617 jit.qt.record 320 240;
#P message 204 481 122 196617 write ttest.mov 25. jpeg;
#P window linecount 2;
#P comment 583 171 149 196617 this is needed to write the opengl back
into a matrix;
#P window linecount 1;
#P newex 624 277 149 196617 jit.gl.sketch test @automatic 0;
#P message 624 236 148 196617 glreadpixels grab 0 0 320 240;
#P newex 593 317 152 196617 jit.matrix grab 4 char 320 240;
#P newex 577 220 30 196617 t b b;
#P newex 505 358 303 196617 jit.matrix @usesrcdim 1 @srcdimstart 0 239
@srcdimend 319 0;
#P message 204 501 29 196617 stop;
#P connect 4 0 5 0;
#P connect 2 1 5 0;
#P connect 28 0 4 0;
#P connect 2 0 3 0;
#P connect 17 2 2 0;
#P connect 1 0 8 0;
#P connect 1 0 29 0;
#P connect 3 0 1 0;
#P connect 11 0 10 2;
#P connect 17 6 11 0;
#P connect 10 0 13 0;
#P connect 17 5 15 0;
#P connect 13 0 15 0;
#P connect 20 0 22 0;
#P connect 24 1 20 0;
#P connect 9 0 26 1;
#P connect 17 1 27 0;
#P connect 17 4 27 0;
#P connect 17 3 27 0;
#P connect 24 0 18 0;
#P connect 19 0 24 0;
#P connect 26 0 17 0;
#P connect 12 0 17 0;
#P connect 16 0 26 0;
#P connect 17 0 25 0;
#P connect 7 0 8 0;
#P connect 0 0 8 0;
#P connect 18 0 21 0;
#P connect 23 0 21 0;
#P window clipboard copycount 30;

#|
fredrikolofsson.com klippav.org musicalfieldsforever.com
|#

#77404

You must be logged in to reply to this topic.