wired alpha using scenewarp

May 12, 2008 at 8:08pm

wired alpha using scenewarp

following the scenewarp example im using sketch, layers and drawobjects to
capture parts of my scene.
but im getting strange results on the alpha channel

#P button 259 40 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 259 61 40 9109513 t 1 b b;
#P user jit.pwindow 471 393 62 42 0 0 0 0 1 0;
#P user jit.pwindow 532 350 62 42 0 0 0 0 1 0;
#P user jit.pwindow 470 350 62 42 0 0 0 0 1 0;
#P newex 472 307 66 9109513 jit.matrix;
#P user jit.pwindow 533 393 62 42 0 0 0 0 1 0;
#P newex 471 328 123 9109513 jit.unpack;
#P message 376 104 224 9109513 reset , drawobject ol2_plane 0 , drawobject
ol_plane 0;
#P newex 72 258 99 9109513 jit.op @op < @val 0.9;
#P newex 72 279 85 9109513 jit.pack;
#P newex 73 224 85 9109513 jit.unpack;
#P window linecount 3;
#P newex 71 327 161 9109513 jit.gl.videoplane test @automatic 0 @name
ol2_plane @blend_enable 1 @position 0.25 0. -0.2;
#P user jit.pwindow 336 510 62 42 0 0 0 0 1 0;
#P user jit.pwindow 260 510 62 42 0 0 0 0 1 0;
#P user jit.pwindow 176 512 82 62 1 0 0 0 1 0;
#P window linecount 1;
#P newex 178 468 66 9109513 jit.matrix;
#P user jit.pwindow 415 510 62 42 0 0 0 0 1 0;
#P newex 177 489 314 9109513 jit.unpack;
#P comment 45 38 87 9109513 2. turn on qmetro;
#P flonum 137 38 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 71 182 77 9109513 read dvkite.mov;
#N vpatcher 53 128 196 272;
#P window setfont “Sans Serif” 9.;
#P newex 41 99 41 9109513 s draw;
#P newex 17 52 58 9109513 t b b erase;
#P inlet 17 32 15 0;
#P outlet 17 83 15 0;
#P connect 1 0 2 0;
#P fasten 2 2 0 0 70 75 22 75;
#P connect 2 0 0 0;
#P connect 2 1 3 0;
#P pop;
#P newobj 28 85 42 9109513 p Draw;
#P newex 27 131 181 9109513 jit.window test @size 640 480 @floating 1;
#P toggle 28 37 15 0;
#P newex 28 56 120 9109513 qmetro 33;
#P newex 28 110 165 9109513 jit.gl.render test @erase_color 0 0 0 1;
#P newex 30 404 226 9109513 jit.gl.texture test @name fb_tex @dim 640 480;
#P newex 30 432 310 9109513 jit.gl.videoplane test @transform_reset 2
@automatic 0 @name fb_plane;
#P newex 30 163 41 9109513 r draw;
#P newex 72 202 136 9109513 jit.qt.movie 640 480 @uniqe 1;
#P window linecount 3;
#P newex 233 326 172 9109513 jit.gl.videoplane test @automatic 0 @name
ol_plane @blend_enable 1 @position -0.32 0. -0.4;
#P window linecount 1;
#P message 289 175 126 9109513 reset , drawobject fb_plane 0;
#P newex 289 93 48 9109513 loadbang;
#P message 359 129 224 9109513 reset , drawobject ol_plane 0 , drawobject
ol2_plane 0;
#P newex 289 195 116 9109513 jit.gl.sketch test @layer 3;
#P newex 359 149 208 9109513 jit.gl.sketch test @layer 1 @capture fb_tex;
#P window setfont “Sans Serif” 18.;
#P window linecount 2;
#P comment 44 502 123 9109522 whats up with the alpha? >>;
#P window setfont “Sans Serif” 14.;
#P window linecount 1;
#P comment 278 39 100 9109518 < << start;
#P fasten 5 0 6 0 294 173 294 173;
#P fasten 5 0 4 0 294 122 364 122;
#P connect 16 0 12 0;
#P connect 38 0 37 0;
#P fasten 37 1 17 0 279 175 76 175;
#P connect 37 0 14 0;
#P connect 37 2 5 0;
#P connect 14 0 13 0;
#P connect 13 0 16 0;
#P connect 27 2 28 2;
#P connect 18 0 13 1;
#P connect 22 0 20 0;
#P connect 20 0 23 0;
#P connect 20 2 25 0;
#P connect 20 1 24 0;
#P fasten 20 3 21 0 410 511 421 511;
#P connect 30 0 2 0;
#P connect 4 0 2 0;
#P connect 6 0 3 0;
#P connect 17 0 8 0;
#P connect 27 1 28 1;
#P fasten 31 3 32 0 559 348 595 348 595 393 539 393;
#P fasten 31 1 35 0 504 349 538 349;
#P fasten 31 2 36 0 532 393 477 393;
#P connect 31 0 34 0;
#P connect 33 0 31 0;
#P connect 8 0 27 0;
#P connect 29 0 28 0;
#P connect 27 3 28 3;
#P fasten 27 3 29 0 132 250 77 250;
#P fasten 28 0 33 0 77 302 477 302;
#P fasten 28 0 7 0 77 312 238 312;
#P connect 28 0 26 0;
#P connect 9 0 8 0;
#P fasten 9 0 11 0 35 367 35 367;
#P fasten 11 0 22 0 35 428 183 428;
#P connect 11 0 10 0;
#P window clipboard copycount 39;

#37732
May 12, 2008 at 10:20pm

ok, while the drawobject method of glreadback is nice, it’s not stable and
has odd behaviours on my xp 7900geforce machine.

like,
1. textures which i capture to tend to remember the previous successful
dimension from a closed patch.
2. successful dimension is not easy to come by, only if i connect a slab to
the output of the named texture can i change the dimension (of the texture).
without it the dim attribute doesn’t do anything, and the texture tend to
choose its own dim, or revert to 1
3.if i don’t loadbang the drawobject i get a dim 1, sporadically.

after ranting i found its problem is with cpu readback, connecting a
jit.matrix anywhere in the chain cause this behivours. it seems to only
happen if the connection is on startup. so yuo can gate it and then it look
to be ok.

#P toggle 431 445 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 398 445 29 9109513 gate;
#P number 323 381 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 286 381 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 269 399 77 9109513 pak dim 640 480;
#P user jit.fpsgui 500 525 60 9109513 3;
#P button 266 47 15 0;
#P newex 266 68 40 9109513 t 1 b b;
#P message 383 111 224 9109513 reset , drawobject ol2_plane 0 , drawobject
ol_plane 0;
#P newex 79 265 99 9109513 jit.op @op < @val 0.9;
#P newex 79 286 85 9109513 jit.pack;
#P newex 80 231 85 9109513 jit.unpack;
#P window linecount 3;
#P newex 78 334 161 9109513 jit.gl.videoplane test @automatic 0 @name
ol2_plane @blend_enable 1 @position 0.25 0. -0.2;
#P user jit.pwindow 343 548 62 42 0 0 0 0 1 0;
#P user jit.pwindow 267 548 62 42 0 0 0 0 1 0;
#P user jit.pwindow 183 550 82 62 1 0 0 0 1 0;
#P window linecount 1;
#P newex 185 506 66 9109513 jit.matrix;
#P user jit.pwindow 422 548 62 42 0 0 0 0 1 0;
#P newex 184 527 314 9109513 jit.unpack;
#P comment 52 45 87 9109513 2. turn on qmetro;
#P flonum 144 45 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 78 189 77 9109513 read dvkite.mov;
#N vpatcher 53 128 196 272;
#P window setfont “Sans Serif” 9.;
#P newex 41 99 41 9109513 s draw;
#P newex 17 52 58 9109513 t b b erase;
#P inlet 17 32 15 0;
#P outlet 17 83 15 0;
#P connect 1 0 2 0;
#P fasten 2 2 0 0 70 75 22 75;
#P connect 2 0 0 0;
#P connect 2 1 3 0;
#P pop;
#P newobj 35 92 42 9109513 p Draw;
#P newex 34 138 181 9109513 jit.window test @size 640 480 @floating 1;
#P toggle 35 44 15 0;
#P newex 35 63 120 9109513 qmetro 33;
#P newex 35 117 165 9109513 jit.gl.render test @erase_color 0 0 0 1;
#P newex 37 411 226 9109513 jit.gl.texture test @name fb_tex @dim 640 480;
#P newex 37 470 310 9109513 jit.gl.videoplane test @transform_reset 2
@automatic 0 @name fb_plane;
#P newex 37 170 41 9109513 r draw;
#P newex 79 209 136 9109513 jit.qt.movie 640 480 @uniqe 1;
#P message 296 182 126 9109513 reset , drawobject fb_plane 0;
#P newex 296 100 45 9109513 loadbang;
#P message 366 136 129 9109513 reset , drawobject ol2_plane 0;
#P newex 296 202 116 9109513 jit.gl.sketch test @layer 3;
#P newex 366 156 208 9109513 jit.gl.sketch test @layer 1 @capture fb_tex;
#P window setfont “Sans Serif” 18.;
#P window linecount 2;
#P comment 51 540 123 9109522 whats up with the alpha? >>;
#P window setfont “Sans Serif” 14.;
#P window linecount 1;
#P comment 285 46 100 9109518 < << start;
#P user panel 359 429 127 60;
#X brgb 255 52 25;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 11 0 10 0;
#P fasten 11 0 37 1 42 437 422 437;
#P connect 38 0 37 0;
#P fasten 37 0 22 0 403 494 190 494;
#P connect 22 0 20 0;
#P connect 22 0 33 0;
#P fasten 20 3 21 0 417 549 428 549;
#P connect 30 0 3 0;
#P connect 5 0 3 0;
#P fasten 6 0 7 0 301 180 301 180;
#P fasten 6 0 5 0 301 129 371 129;
#P connect 20 2 25 0;
#P connect 36 0 34 2;
#P connect 35 0 34 1;
#P connect 7 0 4 0;
#P connect 20 1 24 0;
#P connect 32 0 31 0;
#P connect 20 0 23 0;
#P fasten 27 3 29 0 139 257 84 257;
#P connect 27 3 28 3;
#P connect 18 0 13 1;
#P connect 27 2 28 2;
#P connect 27 1 28 1;
#P connect 8 0 27 0;
#P connect 29 0 28 0;
#P connect 17 0 8 0;
#P fasten 9 0 11 0 42 374 42 374;
#P connect 9 0 8 0;
#P connect 28 0 26 0;
#P fasten 31 1 17 0 286 182 83 182;
#P connect 34 0 11 0;
#P connect 16 0 12 0;
#P connect 13 0 16 0;
#P connect 14 0 13 0;
#P connect 31 0 14 0;
#P window clipboard copycount 39;

On Mon, May 12, 2008 at 11:08 PM, yair reshef wrote:

> following the scenewarp example im using sketch, layers and drawobjects to
> capture parts of my scene.
> but im getting strange results on the alpha channel
>
> #P button 259 40 15 0;
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P newex 259 61 40 9109513 t 1 b b;
> #P user jit.pwindow 471 393 62 42 0 0 0 0 1 0;
> #P user jit.pwindow 532 350 62 42 0 0 0 0 1 0;
> #P user jit.pwindow 470 350 62 42 0 0 0 0 1 0;
> #P newex 472 307 66 9109513 jit.matrix;
> #P user jit.pwindow 533 393 62 42 0 0 0 0 1 0;
> #P newex 471 328 123 9109513 jit.unpack;
> #P message 376 104 224 9109513 reset , drawobject ol2_plane 0 ,
> drawobject ol_plane 0;
> #P newex 72 258 99 9109513 jit.op @op < @val 0.9;
> #P newex 72 279 85 9109513 jit.pack;
> #P newex 73 224 85 9109513 jit.unpack;
> #P window linecount 3;
> #P newex 71 327 161 9109513 jit.gl.videoplane test @automatic 0 @name
> ol2_plane @blend_enable 1 @position 0.25 0. -0.2;
> #P user jit.pwindow 336 510 62 42 0 0 0 0 1 0;
> #P user jit.pwindow 260 510 62 42 0 0 0 0 1 0;
> #P user jit.pwindow 176 512 82 62 1 0 0 0 1 0;
> #P window linecount 1;
> #P newex 178 468 66 9109513 jit.matrix;
> #P user jit.pwindow 415 510 62 42 0 0 0 0 1 0;
> #P newex 177 489 314 9109513 jit.unpack;
> #P comment 45 38 87 9109513 2. turn on qmetro;
> #P flonum 137 38 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 71 182 77 9109513 read dvkite.mov;
> #N vpatcher 53 128 196 272;
> #P window setfont “Sans Serif” 9.;
> #P newex 41 99 41 9109513 s draw;
> #P newex 17 52 58 9109513 t b b erase;
> #P inlet 17 32 15 0;
> #P outlet 17 83 15 0;
> #P connect 1 0 2 0;
> #P fasten 2 2 0 0 70 75 22 75;
> #P connect 2 0 0 0;
> #P connect 2 1 3 0;
> #P pop;
> #P newobj 28 85 42 9109513 p Draw;
> #P newex 27 131 181 9109513 jit.window test @size 640 480 @floating 1;
> #P toggle 28 37 15 0;
> #P newex 28 56 120 9109513 qmetro 33;
> #P newex 28 110 165 9109513 jit.gl.render test @erase_color 0 0 0 1;
> #P newex 30 404 226 9109513 jit.gl.texture test @name fb_tex @dim 640 480;
> #P newex 30 432 310 9109513 jit.gl.videoplane test @transform_reset 2
> @automatic 0 @name fb_plane;
> #P newex 30 163 41 9109513 r draw;
> #P newex 72 202 136 9109513 jit.qt.movie 640 480 @uniqe 1;
> #P window linecount 3;
> #P newex 233 326 172 9109513 jit.gl.videoplane test @automatic 0 @name
> ol_plane @blend_enable 1 @position -0.32 0. -0.4;
> #P window linecount 1;
> #P message 289 175 126 9109513 reset , drawobject fb_plane 0;
> #P newex 289 93 48 9109513 loadbang;
> #P message 359 129 224 9109513 reset , drawobject ol_plane 0 ,
> drawobject ol2_plane 0;
> #P newex 289 195 116 9109513 jit.gl.sketch test @layer 3;
> #P newex 359 149 208 9109513 jit.gl.sketch test @layer 1 @capture fb_tex;
> #P window setfont “Sans Serif” 18.;
> #P window linecount 2;
> #P comment 44 502 123 9109522 whats up with the alpha? >>;
> #P window setfont “Sans Serif” 14.;
> #P window linecount 1;
> #P comment 278 39 100 9109518 < << start;
> #P fasten 5 0 6 0 294 173 294 173;
> #P fasten 5 0 4 0 294 122 364 122;
> #P connect 16 0 12 0;
> #P connect 38 0 37 0;
> #P fasten 37 1 17 0 279 175 76 175;
> #P connect 37 0 14 0;
> #P connect 37 2 5 0;
> #P connect 14 0 13 0;
> #P connect 13 0 16 0;
> #P connect 27 2 28 2;
> #P connect 18 0 13 1;
> #P connect 22 0 20 0;
> #P connect 20 0 23 0;
> #P connect 20 2 25 0;
> #P connect 20 1 24 0;
> #P fasten 20 3 21 0 410 511 421 511;
> #P connect 30 0 2 0;
> #P connect 4 0 2 0;
> #P connect 6 0 3 0;
> #P connect 17 0 8 0;
> #P connect 27 1 28 1;
> #P fasten 31 3 32 0 559 348 595 348 595 393 539 393;
> #P fasten 31 1 35 0 504 349 538 349;
> #P fasten 31 2 36 0 532 393 477 393;
> #P connect 31 0 34 0;
> #P connect 33 0 31 0;
> #P connect 8 0 27 0;
> #P connect 29 0 28 0;
> #P connect 27 3 28 3;
> #P fasten 27 3 29 0 132 250 77 250;
> #P fasten 28 0 33 0 77 302 477 302;
> #P fasten 28 0 7 0 77 312 238 312;
> #P connect 28 0 26 0;
> #P connect 9 0 8 0;
> #P fasten 9 0 11 0 35 367 35 367;
> #P fasten 11 0 22 0 35 428 183 428;
> #P connect 11 0 10 0;
> #P window clipboard copycount 39;
>
>

#130434
May 14, 2008 at 7:40pm

currently this is the only way i know to get alpha out of drawobjects with blend_enabled.
see patch, i later inverse it using inverse.jxs and with cc.alphaglue.flat.jxs to merge.

included is a zipped version with the alphaglue.flat shader

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 58 522 176 9109513 jit.gl.slab test @file cc.alphaglue.flat.jxs;
#P newex 224 496 144 9109513 jit.gl.slab test @file op.invert.jxs;
#P newex 58 545 400 9109513 jit.gl.videoplane test @transform_reset 2 @name shaded_tex @blend_enable 1 @automatic 0;
#P comment 360 475 453 9109513 < << see here for correct alpha , i latter inverse it using inverse.jxs and with cc.alphaglue.flat.jxs to merge;
#N vpatcher 35 85 542 323;
#P user gswitch 50 50 41 32 0 0;
#P user jit.pwindow 195 165 62 42 0 0 0 0 1 0;
#P user jit.pwindow 128 165 62 42 0 0 0 0 1 0;
#P user jit.pwindow 60 165 62 42 0 0 0 0 1 0;
#P user jit.pwindow 264 165 62 42 0 0 0 0 1 0;
#P window setfont “Sans Serif” 9.;
#P newex 61 143 285 9109513 jit.unpack;
#P window setfont “Sans Serif” 12.;
#P user jit.fpsgui 352 143 60 9109516 3;
#P window setfont “Sans Serif” 9.;
#P newex 61 119 44 9109513 jit.matrix;
#P toggle 44 98 15 0;
#P newex 61 98 27 9109513 gate;
#P inlet 65 30 15 0;
#P inlet 80 30 15 0;
#P connect 3 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 6 0;
#P connect 6 0 8 0;
#P connect 1 0 11 1;
#P fasten 11 0 2 1 55 90 83 90;
#P connect 0 0 11 2;
#P fasten 6 1 9 0 134 164 134 164;
#P fasten 6 2 10 0 202 164 201 164;
#P fasten 6 3 7 0 270 164 270 164;
#P fasten 4 0 5 0 64 140 357 140;
#P pop;
#P newobj 270 473 85 9109513 p OpenglUnpacker;
#P newex 351 73 19 9109513 t b;
#N vpatcher 25 70 232 224;
#P window setfont “Sans Serif” 9.;
#P newex 50 84 99 9109513 jit.op @op < @val 0.9;
#P newex 50 105 85 9109513 jit.pack;
#P newex 51 50 85 9109513 jit.unpack;
#P inlet 51 30 15 0;
#P outlet 50 129 15 0;
#P fasten 2 3 4 0 110 76 55 76;
#P connect 4 0 3 0;
#P connect 3 0 0 0;
#P connect 1 0 2 0;
#P connect 2 1 3 1;
#P connect 2 2 3 2;
#P connect 2 3 3 3;
#P pop;
#P newobj 100 252 68 9109513 p blueTOAlpha;
#P flonum 754 318 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 716 318 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 676 318 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 672 334 130 9109513 pak position 0.16 -0.3 0.7 0.1;
#P flonum 503 310 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 465 310 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 425 310 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 397 326 106 9109513 pak position 0.1 0.3 0.1;
#P window linecount 2;
#P newex 509 386 304 9109513 jit.gl.videoplane test @automatic 0 @name ol2_plane_alpha @texture passMe @dim 2 2 @blend_mode 11 7 @blend_enable 1 @color 1 1 1 1;
#P newex 481 353 302 9109513 jit.gl.videoplane test @automatic 0 @name ol2_plane @texture passMe @dim 2 2 @blend_mode 6 7 @color 1 1 1 1 @blend_enable 1;
#P window linecount 1;
#P newex 224 440 168 9109513 jit.gl.texture test @name fb_tex_alpha;
#P message 495 145 278 9109513 reset , drawobject ol_plane_alpha 0 , drawobject ol2_plane_alpha 0;
#P newex 495 165 216 9109513 jit.gl.sketch test @layer 1 @capture fb_tex_alpha;
#P window linecount 2;
#P newex 114 385 304 9109513 jit.gl.videoplane test @automatic 0 @name ol_plane_alpha @texture passMe @dim 2 2 @blend_mode 11 7 @blend_enable 1 @color 1 1 1 1;
#P window linecount 1;
#P newex 100 275 209 9109513 jit.gl.texture test @name passMe @dim 640 480;
#P newex 58 440 141 9109513 jit.gl.texture test @name fb_tex;
#P button 288 25 15 0;
#P newex 288 46 53 9109513 t 1 b b b;
#P window linecount 2;
#P newex 100 348 299 9109513 jit.gl.videoplane test @automatic 0 @name ol_plane @texture passMe @dim 2 2 @blend_mode 6 7 @color 1 1 1 1 @blend_enable 1;
#P window linecount 1;
#P comment 73 66 87 9109513 2. turn on qmetro;
#P flonum 165 66 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 99 210 77 9109513 read dvkite.mov;
#N vpatcher 53 128 196 272;
#P window setfont “Sans Serif” 9.;
#P newex 41 99 41 9109513 s draw;
#P newex 17 52 58 9109513 t b b erase;
#P inlet 17 32 15 0;
#P outlet 17 83 15 0;
#P connect 1 0 2 0;
#P fasten 2 2 0 0 70 75 22 75;
#P connect 2 0 0 0;
#P connect 2 1 3 0;
#P pop;
#P newobj 56 113 42 9109513 p Draw;
#P newex 55 159 181 9109513 jit.window test @size 640 480 @floating 1;
#P toggle 56 65 15 0;
#P newex 56 84 120 9109513 qmetro 33;
#P newex 56 138 165 9109513 jit.gl.render test @erase_color 0 0 0 1;
#P newex 33 618 310 9109513 jit.gl.videoplane test @transform_reset 2 @automatic 0 @name fb_plane;
#P newex 58 191 41 9109513 r draw;
#P newex 100 230 138 9109513 jit.qt.movie 640 480 @unique 1;
#P message 351 168 138 9109513 reset , drawobject shaded_tex 0;
#P message 527 101 224 9109513 reset , drawobject ol_plane 0 , drawobject ol2_plane 0;
#P newex 351 188 116 9109513 jit.gl.sketch test @layer 3;
#P newex 527 121 189 9109513 jit.gl.sketch test @layer 1 @capture fb_tex;
#P window setfont “Sans Serif” 18.;
#P comment 307 24 100 9109522 < << start;
#P window setfont “Sans Serif” 12.;
#P window linecount 2;
#P comment 432 51 255 9109516 currently this is the only way i know to get alpha out of drawobjects with blend_enable’d;
#P window setfont “Sans Serif” 9.;
#P comment 118 315 265 9109513 i capture two instances with diffrent blend_modes , one will be the color information and the second the alpha information;
#P connect 19 0 12 0;
#P connect 12 0 11 0;
#P connect 11 0 14 0;
#P connect 14 0 10 0;
#P fasten 8 0 21 0 63 446 63 446;
#P connect 21 0 43 0;
#P connect 43 0 41 0;
#P fasten 19 1 15 0 307 203 104 203;
#P fasten 8 0 7 0 63 228 105 228;
#P connect 15 0 7 0;
#P fasten 7 0 37 0 105 250 105 250;
#P connect 37 0 22 0;
#P fasten 29 0 18 0 402 346 105 346;
#P fasten 29 0 23 0 402 383 119 383;
#P connect 16 0 11 1;
#P fasten 8 0 26 0 63 430 229 430;
#P connect 26 0 42 0;
#P fasten 42 0 43 1 229 517 229 517;
#P connect 21 0 39 0;
#P connect 20 0 19 0;
#P connect 26 0 39 1;
#P fasten 19 3 38 0 335 69 356 69;
#P connect 38 0 6 0;
#P connect 6 0 4 0;
#P fasten 19 2 29 0 321 270 402 270;
#P connect 30 0 29 1;
#P connect 31 0 29 2;
#P connect 33 0 27 0;
#P connect 32 0 29 3;
#P fasten 38 0 25 0 356 118 500 118;
#P connect 25 0 24 0;
#P fasten 33 0 28 0 677 385 514 385;
#P fasten 38 0 5 0 356 96 532 96;
#P connect 5 0 3 0;
#P fasten 19 2 33 0 321 270 677 270;
#P connect 34 0 33 1;
#P connect 35 0 33 2;
#P connect 36 0 33 3;
#P window clipboard copycount 44;

#130435
May 14, 2008 at 7:57pm

to understand whats the problem im facing with this method replace this with the openglUnpacker subpatch.
for some reason there is a slight fringe on the alpha channel.

hope im not boring anyone with my patching questions, cycling!

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 67 83 128 9109513 jit.matrix @planemap 0 0 0 0;
#P newex 200 83 128 9109513 jit.matrix @planemap 0 0 0 0;
#P newex 200 113 58 9109513 jit.op @op ~;
#P newex 200 57 44 9109513 jit.matrix;
#P newex 67 57 44 9109513 jit.matrix;
#P user jit.pwindow 66 177 322 242 0 0 0 0 1 0;
#P newex 67 138 143 9109513 jit.op @op abs;
#P inlet 67 30 15 0;
#P inlet 200 30 15 0;
#P connect 8 0 2 0;
#P connect 2 0 3 0;
#P connect 6 0 2 1;
#P connect 0 0 5 0;
#P connect 7 0 6 0;
#P fasten 4 0 8 0 72 79 72 79;
#P connect 5 0 7 0;
#P connect 1 0 4 0;
#P window clipboard copycount 9;

#130436
May 17, 2008 at 12:55am

im bumping this as its a personal joykiller, if anyone can help, please

On Wed, May 14, 2008 at 10:57 PM, yair reshef wrote:

>
> to understand whats the problem im facing with this method replace this
> with the openglUnpacker subpatch.
> for some reason there is a slight fringe on the alpha channel.
>
> hope im not boring anyone with my patching questions, cycling!
>
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P newex 67 83 128 9109513 jit.matrix @planemap 0 0 0 0;
> #P newex 200 83 128 9109513 jit.matrix @planemap 0 0 0 0;
> #P newex 200 113 58 9109513 jit.op @op ~;
> #P newex 200 57 44 9109513 jit.matrix;
> #P newex 67 57 44 9109513 jit.matrix;
> #P user jit.pwindow 66 177 322 242 0 0 0 0 1 0;
> #P newex 67 138 143 9109513 jit.op @op abs;
> #P inlet 67 30 15 0;
> #P inlet 200 30 15 0;
> #P connect 8 0 2 0;
> #P connect 2 0 3 0;
> #P connect 6 0 2 1;
> #P connect 0 0 5 0;
> #P connect 7 0 6 0;
> #P fasten 4 0 8 0 72 79 72 79;
> #P connect 5 0 7 0;
> #P connect 1 0 4 0;
> #P window clipboard copycount 9;
>
>

#130437
May 17, 2008 at 2:07am

wouldn’t putting a jit.fastblur or something similar on the alpha channel in matrix land help?

once again, forgive me if i don’t understand the problem. perhaps you should restate it.

#130438
May 17, 2008 at 2:15am

this became a personal conversation, so i thought i was clear:)

if you look at the first patch posted, the movie arrives at the videoplane already alpha.
the problem is the alpha captured to the fb_tex texture is only the outline, as show at bottom.
later in the thread i hacked a solution but its ugly and still there is some alpha fringe

#130439
May 17, 2008 at 3:47am

hmmmm, i think i see what you’re talking about but it seems to be expected behavior. or maybe i don’t see.

wouldn’t using the chromakey shader make more sense for something like this? at least it should help get rid of the fringe no?

#130440
May 17, 2008 at 8:42pm

Hi Yair,
I have been following this thread, but I’m failing to understand what your ultimate goal in this patch is. If all you are doing is compositing, why not just use some jit.gl.slab objects instead of mucking around with the drawobject stuff? You mention readback in one of your posts. Are you trying to rasterize your scene back to a matrix? In order for us to provide you with useful help in this instance, we’ll first need to know what you are trying to accomplish. Maybe taking a moment to outline the process you are expecting will help.

Best,
Andrew B.

#130441
May 17, 2008 at 9:20pm

andrew , im using drawobjects as i need to do manual depth sorting becuase
of textures with alpha channels.
following trail and error , list discussion and your recpies i chose to use
drawobjects. i usualy use to_texture for capturing but i need alpha
readback is a term i used to refer to capturing to texture of opengl
objects. probebly not the right way of puting it.

here is why i cant use to_texture, it doesnt put out alpha.
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 350 164 99 9109513 jit.op @op < @val 0.9;
#P newex 350 185 85 9109513 jit.pack;
#P newex 351 130 85 9109513 jit.unpack;
#P user jit.pwindow 577 308 62 42 0 0 0 0 1 0;
#P user jit.pwindow 501 308 62 42 0 0 0 0 1 0;
#P user jit.pwindow 417 310 82 62 1 0 0 0 1 0;
#P newex 419 266 66 9109513 jit.matrix;
#P user jit.pwindow 656 308 62 42 0 0 0 0 1 0;
#P newex 418 287 314 9109513 jit.unpack;
#P window setfont “Sans Serif” 18.;
#P window linecount 2;
#P comment 285 300 123 9109522 whats up with the alpha? >>;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 334 100 27 9109513 t b l;
#P message 346 59 73 9109513 read dozer.mov;
#P newex 334 78 55 9109513 jit.qt.movie;
#P window linecount 2;
#P newex 334 208 159 9109513 jit.gl.videoplane colli @color 1 1 1 1
@blend_enable 1 @automatic 0;
#P window linecount 1;
#P hidden newex 25 -9 45 9109513 loadbang;
#P newex 6 39 502 9109513 t b b b erase;
#P toggle 6 -6 15 0;
#P newex 6 15 50 9109513 qmetro 40;
#P comment 2 -64 100 9109513 keystone maker;
#P newex 91 74 29 9109513 t b b;
#P window linecount 2;
#P newex 91 191 168 9109513 jit.gl.videoplane colli @depth_enable 1
@blend_enable 0 @automatic 0;
#P window linecount 1;
#P message 110 98 161 9109513 usetexture targetx , to_texture , erase;
#P newex 91 140 27 9109513 t b b;
#P newex 108 163 186 9109513 jit.gl.texture colli @name targetx @adapt 1;
#P window linecount 2;
#P newex 4 297 264 9109513 jit.window colli @depthbuffer 2 @idlemouse 1
@sync 0 @floating 1 @fsaa 2 @fsmenubar 0 @border 1 @pos 50 500;
#P window linecount 1;
#P newex 6 266 73 9109513 jit.gl.render colli;
#P objectname jit.gl.slab[1];
#P fasten 2 0 5 0 113 188 96 188;
#P connect 2 0 19 0;
#P fasten 23 3 25 0 410 156 355 156;
#P connect 23 3 24 3;
#P connect 3 1 2 0;
#P connect 6 0 3 0;
#P connect 3 0 5 0;
#P connect 4 0 0 0;
#P fasten 10 2 13 0 339 66 339 66;
#P fasten 10 3 0 0 503 252 11 252;
#P connect 10 0 0 0;
#P fasten 17 3 18 0 651 309 662 309;
#P connect 23 2 24 2;
#P connect 23 1 24 1;
#P connect 15 1 23 0;
#P connect 25 0 24 0;
#P connect 24 0 12 0;
#P connect 15 0 12 0;
#P connect 13 0 15 0;
#P connect 14 0 13 0;
#P connect 17 2 22 0;
#P connect 17 1 21 0;
#P connect 17 0 20 0;
#P connect 19 0 17 0;
#P connect 6 1 4 0;
#P fasten 10 1 6 0 175 61 96 61;
#P fasten 8 0 10 0 11 36 11 36;
#P connect 9 0 8 0;
#P hidden connect 11 0 9 0;
#P window clipboard copycount 26;

On 5/17/08, Andrew Benson wrote:
>
>
> Hi Yair,
> I have been following this thread, but I’m failing to understand what your
> ultimate goal in this patch is. If all you are doing is compositing, why
> not just use some jit.gl.slab objects instead of mucking around with the
> drawobject stuff? You mention readback in one of your posts. Are you trying
> to rasterize your scene back to a matrix? In order for us to provide you
> with useful help in this instance, we’ll first need to know what you are
> trying to accomplish. Maybe taking a moment to outline the process you are
> expecting will help.
>
> Best,
> Andrew B.
>
>
>
>

#130442

You must be logged in to reply to this topic.