Forums > Jitter

mask over a qt.movie


VG
May 4, 2006 | 11:43 am

hi,

i’d like to create a mask with a hole that let only a part of a qt.movie
appear,
be able to move that mask position on the video, and *draw* with that piece
of video to feed a texture.
- 1st solution:
moving a gl object -say a circle- with (*on?*) a texture and putting
the render output in a matrix…pretty heavy solution
- 2 solution:
I tried to extract a small part of the video with jit.submatrix, but
then I didn’t find any way to insert that submatrix in a bigger one
at a specific position (could it be a feature of jit.fill to aslo accept
matrix of a smaller or equal size than the filled matrix?)

-3rd solution??
Is there any shader/slab capable of doing that?

Any advice welcome..
Thanks..

Vincent


May 4, 2006 | 12:30 pm

alpha channels in the matrix being drawn by the jit.qt.videoplane
with @blend_enable 1.


May 4, 2006 | 4:11 pm

there’s also the quick ‘n’ dirty jit.lcd. see the help file on
overlaying lcd-generated graphics over a jitter video matrix.
there’s also this nifty thing I cooked up:

#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 143 244 212 196617 patch by peter nyboer
pnyboer-at-slambassador.com;
#P button 26 40 15 0;
#P window linecount 1;
#P newex 121 98 57 196617 t 1 b 1.9 b;
#P toggle 37 105 15 0;
#P newex 34 185 54 196617 jit.change;
#P newex 37 125 46 196617 metro 2;
#P message 50 146 80 196617 read dozer.mov;
#P newex 119 73 48 196617 loadbang;
#P newex 51 165 63 196617 jit.qt.movie;
#P user jit.pwindow 72 295 82 62 0 1 0 0 1 0;
#P flonum 122 200 35 9 0. 2. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 32 204 27 196617 t l b;
#N vpatcher 147 410 822 799;
#N comlet loadbang;
#P inlet 183 37 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 10 59 432 340;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 101 44 203 196617 < -- this would be setup in the "main"
patch;
#P button 83 90 15 0;
#P newex 36 40 61 196617 r resolution;
#P inlet 105 31 15 0;
#P newex 139 183 62 196617 prepend dim;
#N comlet dim;
#P outlet 139 212 15 0;
#N comlet res y;
#P outlet 87 210 15 0;
#N comlet res.x;
#P outlet 59 210 15 0;
#N comlet resolutionlist;
#P outlet 36 209 15 0;
#P newex 59 123 81 196617 unpack 320 240;
#P newex 36 88 18 196617 t l;
#P newex 105 62 63 196617 v resolution;
#P window linecount 0;
#P comment 167 64 203 196617 < -- this would be setup in the "main"
patch;
#P connect 10 0 2 0;
#P fasten 1 0 2 0 110 83 41 83;
#P connect 2 0 4 0;
#P fasten 2 0 3 0 41 112 64 112;
#P connect 11 0 3 0;
#P connect 3 0 5 0;
#P connect 3 1 6 0;
#P connect 9 0 1 0;
#P fasten 2 0 8 0 41 107 144 107;
#P connect 8 0 7 0;
#P pop;
#P newobj 152 60 53 196617 p res;
#P newex 255 184 27 196617 !- 1.;
#P window linecount 0;
#P message 157 237 128 196617 zoom_x $1 , zoom_y $1 , bang;
#N vpatcher 45 100 343 301;
#P window setfont "Sans Serif" 9.;
#P newex 123 93 83 196617 prepend anchor_y;
#P newex 29 100 82 196617 prepend anchor_x;
#P newex 50 78 54 196617 unpack 0 0;
#P newex 52 50 55 196617 vexpr $i1/2;
#P inlet 52 30 15 0;
#P outlet 52 128 15 0;
#P connect 3 0 4 0;
#P connect 2 0 3 0;
#P connect 1 0 2 0;
#P connect 5 0 0 0;
#P connect 4 0 0 0;
#P connect 3 1 5 0;
#P pop;
#P newobj 152 188 44 196617 p anchor;
#P window linecount 1;
#P newex 119 294 263 196617 jit.rota @anchor_x 160 @anchor_y 120
@boundmode 1;
#P window linecount 0;
#P newex 307 188 27 196617 !- 1.;
#P newex 309 213 27 196617 * 4.;
#N comlet radius;
#P inlet 306 156 15 0;
#P flonum 502 209 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 343 194 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 295 266 50 196617 tosymbol;
#P newex 292 239 299 196617 pak pow ( 3. – hypot ( snorm[0] * 4. \,
snorm[1] * 4. ) \, 3. );
#P flonum 348 33 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 298 60 113 196617 pak sin ( 0. * norm[0]);
#P newex 298 85 50 196617 tosymbol;
#P newex 298 107 68 196617 prepend expr;
#P inlet 103 137 15 0;
#P outlet 103 345 15 0;
#P newex 144 40 20 196617 t b;
#P newex 116 213 133 196617 jit.matrix 1 char 320 240;
#P button 120 98 15 0;
#P newex 140 117 149 196617 jit.matrix 2 float32 320 240;
#P newex 137 141 458 196617 jit.expr @expr "pow ( 3.9400 – hypot (
snorm[0] * 4.0000 \, snorm[1] * 4.0000 ) \, 0.6600 )";
#P window linecount 0;
#P comment 217 322 223 196617 just so you know , there is DEFINITELY
some extra patching here from other experiements…;
#P connect 19 0 6 0;
#P connect 23 3 4 0;
#P connect 1 0 4 0;
#P connect 7 0 4 0;
#P connect 20 0 19 0;
#P connect 21 0 19 0;
#P connect 4 0 19 0;
#P connect 5 0 3 0;
#P connect 13 0 3 0;
#P connect 23 3 3 0;
#P connect 2 0 1 0;
#P connect 8 0 1 0;
#P connect 3 0 2 0;
#P connect 23 3 2 0;
#P connect 24 0 5 0;
#P connect 5 0 23 0;
#P connect 23 0 20 0;
#P connect 22 0 21 0;
#P connect 16 0 22 0;
#P connect 12 0 13 0;
#P connect 10 0 9 0;
#P connect 13 0 8 0;
#P connect 9 0 8 0;
#P connect 18 0 17 0;
#P connect 14 0 12 2;
#P connect 17 0 12 2;
#P connect 11 0 10 2;
#P connect 15 0 12 15;
#P pop;
#P newobj 72 231 43 196617 p gauss;
#P newex 32 257 65 196617 jit.op @op *;
#P outlet 33 281 15 0;
#P comment 44 40 212 196617 begin (if you cut an pasted this from the
list);
#P connect 11 0 4 0;
#P connect 4 0 2 0;
#P connect 2 0 1 0;
#P connect 7 0 11 0;
#P connect 13 0 12 0;
#P connect 12 0 10 0;
#P connect 13 1 9 0;
#P connect 10 0 7 0;
#P connect 9 0 7 0;
#P connect 4 1 3 0;
#P connect 2 0 6 0;
#P connect 3 0 2 1;
#P connect 13 3 3 1;
#P connect 5 0 3 2;
#P connect 14 0 8 0;
#P connect 8 0 13 0;
#P connect 13 2 5 0;
#P window clipboard copycount 16;

p


Viewing 3 posts - 1 through 3 (of 3 total)