multiple rendering

Apr 23, 2007 at 9:17am

multiple rendering

Hi list ,

Is there a way to render one jit.gl.videoplane on several windows.
I tryed something like that but doesn’t work anymore.

max v2;
#N vpatcher 71 219 825 785;
#P toggle 332 28 15 0;
#P window setfont “Sans Serif” 9.;
#P message 502 84 29 196617 stop;
#P message 468 84 33 196617 start;
#P newex 468 64 41 196617 sel 1 0;
#P newex 332 51 37 196617 metro;
#P newex 427 106 162 196617 jit.qt.movie 160 120 autostart 0;
#P message 542 46 76 196617 read bball.mov;
#P newex 332 72 30 196617 t b b;
#P newex 380 175 87 196617 jit.matrix stereo;
#P newex 222 98 87 196617 jit.matrix stereo;
#P newex 252 168 83 196617 jit.gl.render asd;
#P newex 252 140 56 196617 t b l erase;
#P flonum 128 77 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 92 77 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 56 77 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 56 108 97 196617 pak camera 4. 4. 0.;
#P newex 380 139 228 196617 jit.gl.videoplane @automatic 0 @matrixoutput 1;
#P message 364 258 118 196617 name asd , size 320 240;
#P user jit.pwindow 363 284 322 242 0 1 0 0 1 0;
#X name asd;
#P message 15 261 121 196617 name qwe , size 320 240;
#P user jit.pwindow 14 287 322 242 0 1 0 0 1 0;
#X name qwe;
#P newex 162 168 86 196617 jit.gl.render qwe;
#P newex 162 140 56 196617 t b l erase;
#P connect 3 0 2 0;
#P fasten 8 0 7 1 61 100 90 100;
#P fasten 9 0 7 2 97 100 119 100;
#P fasten 10 0 7 3 133 100 148 100;
#P fasten 13 0 0 0 227 127 167 127;
#P fasten 7 0 1 0 61 165 167 165;
#P fasten 0 1 1 0 190 161 167 161;
#P connect 0 0 1 0;
#P fasten 0 2 1 0 213 161 167 161;
#P fasten 15 0 13 0 337 93 227 93;
#P fasten 13 0 11 0 227 127 257 127;
#P fasten 7 0 12 0 61 165 257 165;
#P fasten 11 2 12 0 303 161 257 161;
#P fasten 11 1 12 0 280 161 257 161;
#P connect 11 0 12 0;
#P connect 22 0 18 0;
#P connect 18 0 15 0;
#P connect 5 0 4 0;
#P connect 15 1 6 0;
#P fasten 17 0 6 0 432 131 385 131;
#P connect 6 0 14 0;
#P fasten 21 0 17 0 507 100 432 100;
#P fasten 20 0 17 0 473 100 432 100;
#P fasten 16 0 17 0 547 102 432 102;
#P fasten 22 0 19 0 337 46 473 46;
#P connect 19 0 20 0;
#P fasten 19 1 21 0 488 82 507 82;
#P pop;

#31534
Apr 23, 2007 at 9:34am

sorry, better like that :

max v2;
#N vpatcher 138 93 920 800;
#P toggle 332 28 15 0;
#P window setfont “Sans Serif” 9.;
#P message 502 84 29 196617 stop;
#P message 468 84 33 196617 start;
#P newex 468 64 41 196617 sel 1 0;
#P newex 332 51 37 196617 metro;
#P newex 427 106 162 196617 jit.qt.movie 320 240 autostart 0;
#P message 542 46 76 196617 read bball.mov;
#P newex 332 72 30 196617 t b b;
#P newex 380 163 87 196617 jit.matrix stereo;
#P newex 222 98 87 196617 jit.matrix stereo;
#P newex 252 168 83 196617 jit.gl.render asd;
#P newex 252 140 56 196617 t b l erase;
#P flonum 128 77 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 92 77 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 56 77 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 56 108 97 196617 pak camera 4. 4. 0.;
#P newex 380 139 225 196617 jit.gl.videoplane @automatic 0 @matrixoutput 1;
#P message 364 258 118 196617 name asd , size 320 240;
#P user jit.pwindow 363 284 322 242 0 1 0 0 1 0;
#X name asd;
#P message 15 261 121 196617 name qwe , size 320 240;
#P user jit.pwindow 14 287 322 242 0 1 0 0 1 0;
#X name qwe;
#P newex 162 168 86 196617 jit.gl.render qwe;
#P newex 162 140 56 196617 t b l erase;
#P connect 3 0 2 0;
#P fasten 8 0 7 1 61 100 90 100;
#P fasten 9 0 7 2 97 100 119 100;
#P fasten 10 0 7 3 133 100 148 100;
#P fasten 13 0 0 0 227 127 167 127;
#P fasten 7 0 1 0 61 165 167 165;
#P fasten 0 1 1 0 190 161 167 161;
#P connect 0 0 1 0;
#P fasten 0 2 1 0 213 161 167 161;
#P fasten 15 0 13 0 337 93 227 93;
#P fasten 13 0 11 0 227 127 257 127;
#P fasten 7 0 12 0 61 165 257 165;
#P fasten 11 2 12 0 303 161 257 161;
#P fasten 11 1 12 0 280 161 257 161;
#P connect 11 0 12 0;
#P connect 22 0 18 0;
#P connect 18 0 15 0;
#P connect 5 0 4 0;
#P fasten 17 0 6 0 432 131 385 131;
#P connect 6 0 14 0;
#P fasten 21 0 17 0 507 100 432 100;
#P fasten 20 0 17 0 473 100 432 100;
#P fasten 16 0 17 0 547 102 432 102;
#P fasten 15 1 17 0 357 97 432 97;
#P fasten 22 0 19 0 337 46 473 46;
#P connect 19 0 20 0;
#P fasten 19 1 21 0 488 82 507 82;
#P pop;

#102651
Apr 24, 2007 at 1:20pm
#102652
Apr 24, 2007 at 10:36pm

Thank you Mattijs, the thread and overall the patch you’ve posted on provide some hope for me.
Nonetheless the way to render to two windows keeps its mystery with jit.gl.videoplane.

here’s 3 patch
1-yours, it works :
two jit.gl.render -> double destination for one jit.gl.gridshape

2-mine, the same without gridshape but videoplane
this solution doesn’t work anymore, problem of texture
(probably I have to look back tutorials)

3-at last, another method I tryed,
two jit.gl.render -> double destination for one videoplane
better, but not perfect….stays the way I have to carry on

Derrick
====================1==================================
max v2;
#N vpatcher 300 151 819 403;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 270 41 152 196617 loadmess rotatexyz 0. 24. 54.;
#P newex 227 73 95 196617 jit.gl.handle rnd1;
#P newex 328 73 95 196617 jit.gl.handle rnd2;
#P newex 33 107 85 196617 s renderSceneTo;
#P newex 7 81 114 196617 t b rnd2 b rnd1 erase;
#P newex 7 18 60 196617 loadmess 1;
#P newex 127 61 85 196617 r renderSceneTo;
#P newex 127 83 80 196617 prepend drawto;
#P toggle 7 39 15 0;
#P newex 7 59 57 196617 qmetro 40;
#P newex 7 202 276 196617 jit.window rnd2 @depthbuffer 1 @rect 360 500 680 740;
#P newex 7 181 342 196617 jit.gl.render rnd2 @camera 0. 0. 5. @lookat 1.63 0. 0. @lens_angle 27.5;
#P newex 127 106 370 196617 jit.gl.gridshape @automatic 1 @shape torus @color 0. 0. 1. @lighting_enable 1;
#P newex 93 159 266 196617 jit.window rnd1 @depthbuffer 1 @rect 40 500 360 740;
#P newex 92 138 350 196617 jit.gl.render rnd1 @camera 0. 0. 5. @lookat -1.63 0. 0. @lens_angle 27.5;
#P connect 9 0 6 0;
#P connect 6 0 5 0;
#P connect 5 0 10 0;
#P connect 10 4 3 0;
#P connect 10 0 3 0;
#P connect 10 1 11 0;
#P fasten 10 3 11 0 90 102 38 102;
#P connect 10 2 0 0;
#P connect 10 4 0 0;
#P connect 8 0 7 0;
#P connect 7 0 2 0;
#P fasten 13 0 2 0 232 102 132 102;
#P fasten 12 0 2 0 333 102 132 102;
#P connect 14 0 13 0;
#P connect 14 0 12 0;
#P pop;

====================2==================================

max v2;
#N vpatcher 113 94 617 469;
#P toggle 185 31 15 0;
#P window setfont “Sans Serif” 9.;
#P message 260 97 29 196617 stop;
#P message 226 97 33 196617 start;
#P newex 226 77 41 196617 sel 1 0;
#P newex 185 54 37 196617 metro;
#P newex 185 119 167 196617 jit.qt.movie 320 240 @autostart 0;
#P message 304 70 76 196617 read bball.mov;
#P newex 282 162 152 196617 loadmess rotatexyz 0. 24. 54.;
#P newex 239 194 95 196617 jit.gl.handle rnd1;
#P newex 340 194 95 196617 jit.gl.handle rnd2;
#P newex 45 228 85 196617 s renderSceneTo;
#P newex 19 202 114 196617 t b rnd2 b rnd1 erase;
#P newex 19 139 60 196617 loadmess 1;
#P newex 139 182 85 196617 r renderSceneTo;
#P newex 139 204 80 196617 prepend drawto;
#P toggle 19 160 15 0;
#P newex 19 180 57 196617 qmetro 40;
#P newex 19 323 276 196617 jit.window rnd2 @depthbuffer 1 @rect 360 500 680 740;
#P newex 19 302 342 196617 jit.gl.render rnd2 @camera 0. 0. 5. @lookat 1.63 0. 0. @lens_angle 27.5;
#P newex 139 227 146 196617 jit.gl.videoplane @automatic 1;
#P newex 105 280 266 196617 jit.window rnd1 @depthbuffer 1 @rect 40 500 360 740;
#P newex 104 259 350 196617 jit.gl.render rnd1 @camera 0. 0. 5. @lookat -1.63 0. 0. @lens_angle 27.5;
#P connect 9 0 6 0;
#P connect 6 0 5 0;
#P connect 5 0 10 0;
#P connect 10 4 3 0;
#P connect 10 0 3 0;
#P connect 10 1 11 0;
#P fasten 10 3 11 0 102 223 50 223;
#P connect 10 2 0 0;
#P connect 10 4 0 0;
#P connect 8 0 7 0;
#P fasten 12 0 2 0 345 223 144 223;
#P fasten 13 0 2 0 244 223 144 223;
#P connect 7 0 2 0;
#P connect 16 0 2 0;
#P connect 21 0 17 0;
#P fasten 20 0 16 0 265 113 190 113;
#P fasten 19 0 16 0 231 113 190 113;
#P fasten 15 0 16 0 309 115 190 115;
#P connect 17 0 16 0;
#P fasten 21 0 18 0 190 51 231 51;
#P connect 18 0 19 0;
#P connect 14 0 13 0;
#P fasten 18 1 20 0 246 95 265 95;
#P connect 14 0 12 0;
#P pop;

====================3==================================

max v2;
#N vpatcher 101 200 743 766;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 284 379 49 196617 delay 50;
#P newex 243 237 92 196617 t b b b b b b b;
#P newex 243 213 48 196617 loadbang;
#P newex 109 514 59 196617 r 2renders;
#P newex 219 444 93 196617 jit.gl.handle droite;
#P newex 98 259 30 196617 t b b;
#P newex 98 373 81 196617 jit.matrix geom;
#P newex 158 666 32 196617 print;
#P toggle 379 276 15 0;
#P message 284 399 142 196617 texture film , usetexture film;
#P newex 152 346 103 196617 prepend texture film;
#P toggle 98 217 15 0;
#P message 173 293 29 196617 stop;
#P message 139 293 33 196617 start;
#P newex 139 273 41 196617 sel 1 0;
#P newex 98 240 37 196617 metro;
#P newex 98 315 167 196617 jit.qt.movie 160 120 @autostart 0;
#P message 62 292 76 196617 read bball.mov;
#P newex 468 270 80 196617 prepend symbol;
#P message 468 251 46 196617 tri_grid;
#P user ubumenu 469 290 68 196617 0 1 1 0;
#X add points;
#X add lines;
#X add line_strip;
#X add line_loop;
#X add triangles;
#X add tri_strip;
#X add tri_fan;
#X add quads;
#X add quad_strip;
#X add polygon;
#X add tri_grid;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P message 380 293 84 196617 matrixoutput $1;
#B color 14;
#P message 532 391 59 196617 usetexture;
#P button 310 290 15 0;
#P window linecount 2;
#P message 432 391 98 196617 texture grid 64 64 , usetexture grid;
#P window linecount 1;
#P newex 455 457 59 196617 s 2renders;
#P newex 310 342 121 196617 jit.matrix geom;
#P newex 310 320 239 196617 jit.gl.videoplane @matrixoutput 1 @depth_enable 1;
#P newex 30 433 55 196617 t b l erase;
#P newex 155 434 55 196617 t b l erase;
#P window linecount 2;
#P newex 155 475 98 196617 jit.gl.render droite @camera -0.2 0. 4.;
#P window linecount 1;
#P message 317 33 198 196617 name droite , depthbuffer 1 , size 160 120;
#P message 115 33 201 196617 name gauche , depthbuffer 1 , size 160 120;
#P user jit.pwindow 316 62 162 122 0 1 0 0 1 1;
#X name droite;
#P user jit.pwindow 114 62 162 122 0 1 0 0 1 1;
#X name gauche;
#P window linecount 2;
#P newex 30 468 98 196617 jit.gl.render gauche @camera 0.2 0. 4.;
#P connect 29 0 7 0;
#P connect 32 0 0 0;
#P connect 7 2 0 0;
#P connect 7 1 0 0;
#P connect 7 0 0 0;
#P fasten 31 0 0 0 224 465 35 465;
#P connect 34 4 18 0;
#P connect 34 0 24 0;
#P connect 24 0 20 0;
#P connect 20 0 30 0;
#P fasten 23 0 19 0 178 309 103 309;
#P fasten 22 0 19 0 144 309 103 309;
#P fasten 18 0 19 0 67 311 103 311;
#P connect 30 1 19 0;
#P connect 30 0 29 0;
#P connect 3 0 1 0;
#P fasten 24 0 21 0 103 237 144 237;
#P connect 21 0 22 0;
#P fasten 19 0 25 0 103 337 157 337;
#P connect 29 0 6 0;
#P connect 6 2 5 0;
#P connect 6 1 5 0;
#P connect 6 0 5 0;
#P fasten 31 0 5 0 224 469 160 469;
#P connect 32 0 5 0;
#P fasten 21 1 23 0 159 291 178 291;
#P connect 33 0 34 0;
#P connect 34 6 35 0;
#P connect 35 0 26 0;
#P connect 34 2 12 0;
#P connect 12 0 8 0;
#P fasten 14 0 8 0 385 315 315 315;
#P connect 8 0 9 0;
#P connect 4 0 2 0;
#P connect 27 0 14 0;
#P connect 25 0 10 0;
#P fasten 26 0 10 0 289 424 460 424;
#P fasten 11 0 10 0 437 424 460 424;
#P fasten 13 0 10 0 537 424 460 424;
#P connect 15 1 10 0;
#P connect 16 0 17 0;
#P connect 17 0 15 0;
#P pop;

#102653
Apr 25, 2007 at 8:40am

Sorry to insist,
Is there anyone to clear me about why this patch doen’t work correctly ?

max v2;
#N vpatcher 31 44 654 471;
#P origin 0 -29;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 76 329 85 196617 s renderSceneTo;
#P newex 44 302 74 196617 t b rnd2 erase;
#P newex 24 114 30 196617 t b b;
#P newex 56 258 85 196617 s renderSceneTo;
#P newex 219 20 48 196617 loadbang;
#P message 346 72 65 196617 texture grid;
#P message 420 55 59 196617 usetexture;
#P window linecount 2;
#P message 420 73 98 196617 texture grid 64 64 , usetexture grid;
#P window linecount 1;
#P message 346 54 44 196617 texture;
#P newex 24 82 30 196617 t b b;
#P message 346 90 65 196617 texture film;
#P window linecount 2;
#P message 420 103 99 196617 texture film 64 64 , usetexture film;
#P window linecount 1;
#P newex 79 135 103 196617 prepend texture film;
#P message 182 88 29 196617 stop;
#P message 148 88 33 196617 start;
#P newex 148 68 41 196617 sel 1 0;
#P newex 79 115 167 196617 jit.qt.movie 320 240 @autostart 0;
#P message 219 68 76 196617 read bball.mov;
#P newex 244 197 95 196617 jit.gl.handle rnd1;
#P newex 345 197 95 196617 jit.gl.handle rnd2;
#P newex 24 231 74 196617 t b rnd1 erase;
#P newex 144 173 85 196617 r renderSceneTo;
#P newex 144 207 80 196617 prepend drawto;
#P toggle 24 42 15 0;
#P newex 24 62 57 196617 qmetro 40;
#P newex 166 384 268 196617 jit.window rnd2 @depthbuffer 1 @rect 360 500 680 740;
#P newex 166 363 342 196617 jit.gl.render rnd2 @camera 0. 0. 5. @lookat 1.63 0. 0. @lens_angle 27.5;
#P newex 144 230 291 196617 jit.gl.gridshape @shape plane @automatic 1 @lighting_enable 1;
#P newex 249 325 266 196617 jit.window rnd1 @depthbuffer 1 @rect 40 500 360 740;
#P newex 248 304 350 196617 jit.gl.render rnd1 @camera 0. 0. 5. @lookat -1.63 0. 0. @lens_angle 27.5;
#P fasten 25 0 6 0 224 39 29 39;
#P connect 6 0 5 0;
#P connect 5 0 20 0;
#P connect 20 0 27 0;
#P connect 27 0 9 0;
#P connect 27 1 28 0;
#P connect 9 1 26 0;
#P connect 28 1 29 0;
#P fasten 20 1 13 0 49 104 84 104;
#P fasten 16 0 13 0 187 104 84 104;
#P fasten 15 0 13 0 153 104 84 104;
#P fasten 12 0 13 0 224 106 84 106;
#P connect 13 0 17 0;
#P connect 8 0 7 0;
#P hidden connect 24 0 2 0;
#P hidden connect 21 0 2 0;
#P hidden connect 19 0 2 0;
#P fasten 10 0 2 0 350 226 149 226;
#P fasten 11 0 2 0 249 226 149 226;
#P connect 7 0 2 0;
#P fasten 6 0 14 0 29 58 153 58;
#P connect 14 0 15 0;
#P hidden connect 18 0 3 0;
#P hidden connect 23 0 3 0;
#P connect 28 0 3 0;
#P connect 28 2 3 0;
#P connect 17 0 3 0;
#P hidden connect 22 0 3 0;
#P fasten 14 1 16 0 168 86 187 86;
#P connect 25 0 12 0;
#P connect 9 0 0 0;
#P connect 9 2 0 0;
#P connect 17 0 0 0;
#P hidden connect 18 0 0 0;
#P hidden connect 22 0 0 0;
#P hidden connect 23 0 0 0;
#P connect 25 0 19 0;
#P connect 25 0 18 0;
#P pop;

#102654
Apr 25, 2007 at 7:07pm

Hi,

try adding shared_context attribute for one jit.gl.render object, to
enable sharing of textures between opengl contexts. here’s your patch
again, but with The Attribute added:

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 76 329 85 196617 s renderSceneTo;
#P newex 44 302 74 196617 t b rnd2 erase;
#P newex 24 114 30 196617 t b b;
#P newex 56 258 85 196617 s renderSceneTo;
#P newex 219 20 48 196617 loadbang;
#P message 346 72 65 196617 texture grid;
#P message 420 55 59 196617 usetexture;
#P window linecount 2;
#P message 420 73 98 196617 texture grid 64 64 , usetexture grid;
#P window linecount 1;
#P message 346 54 44 196617 texture;
#P newex 24 82 30 196617 t b b;
#P message 346 90 65 196617 texture film;
#P window linecount 2;
#P message 420 103 99 196617 texture film 64 64 , usetexture film;
#P window linecount 1;
#P newex 79 135 103 196617 prepend texture film;
#P message 182 88 29 196617 stop;
#P message 148 88 33 196617 start;
#P newex 148 68 41 196617 sel 1 0;
#P newex 79 115 167 196617 jit.qt.movie 320 240 @autostart 0;
#P message 219 68 76 196617 read bball.mov;
#P newex 244 197 95 196617 jit.gl.handle rnd1;
#P newex 345 197 95 196617 jit.gl.handle rnd2;
#P newex 24 231 74 196617 t b rnd1 erase;
#P newex 144 173 85 196617 r renderSceneTo;
#P newex 144 207 80 196617 prepend drawto;
#P toggle 24 42 15 0;
#P newex 24 62 57 196617 qmetro 40;
#P newex 166 384 268 196617 jit.window rnd2 @depthbuffer 1 @rect 360
500 680 740;
#P newex 166 363 342 196617 jit.gl.render rnd2 @camera 0. 0. 5.
@lookat 1.63 0. 0. @lens_angle 27.5;
#P newex 144 230 291 196617 jit.gl.gridshape @shape plane @automatic
1 @lighting_enable 1;
#P newex 249 325 266 196617 jit.window rnd1 @depthbuffer 1 @rect 40
500 360 740;
#P window linecount 2;
#P newex 248 283 236 196617 jit.gl.render rnd1 @camera 0. 0. 5.
@lookat -1.63 0. 0. @lens_angle 27.5 @shared_context rnd2;
#P hidden connect 23 0 3 0;
#P hidden connect 23 0 0 0;
#P hidden connect 22 0 3 0;
#P hidden connect 22 0 0 0;
#P hidden connect 18 0 3 0;
#P hidden connect 18 0 0 0;
#P connect 17 0 3 0;
#P connect 17 0 0 0;
#P connect 9 0 0 0;
#P connect 9 2 0 0;
#P fasten 25 0 6 0 224 39 29 39;
#P connect 25 0 12 0;
#P connect 25 0 19 0;
#P connect 25 0 18 0;
#P fasten 14 1 16 0 168 86 187 86;
#P connect 28 2 3 0;
#P connect 28 0 3 0;
#P connect 14 0 15 0;
#P connect 6 0 5 0;
#P fasten 6 0 14 0 29 58 153 58;
#P connect 7 0 2 0;
#P fasten 11 0 2 0 249 226 149 226;
#P fasten 10 0 2 0 350 226 149 226;
#P hidden connect 19 0 2 0;
#P hidden connect 21 0 2 0;
#P hidden connect 24 0 2 0;
#P connect 8 0 7 0;
#P connect 13 0 17 0;
#P fasten 12 0 13 0 224 106 84 106;
#P fasten 15 0 13 0 153 104 84 104;
#P fasten 16 0 13 0 187 104 84 104;
#P fasten 20 1 13 0 49 104 84 104;
#P connect 28 1 29 0;
#P connect 9 1 26 0;
#P connect 27 1 28 0;
#P connect 27 0 9 0;
#P connect 20 0 27 0;
#P connect 5 0 20 0;
#P window clipboard copycount 30;

best,
nesa

#102655
Apr 26, 2007 at 4:45pm

#102656
Apr 26, 2007 at 5:32pm

> why don’t they use each their own copy of the texture?

You mean two ‘old school’ textures with the same name, but on
different contexts? I don’t know for sure, but it is probably just a
‘symbol already in use’ issue…

best,
nesa

#102657

You must be logged in to reply to this topic.