Forums > Jitter

Progressive paintoval alpha mask on jit.lcd


Ad.
January 9, 2011 | 12:33 pm

Hi all.
I try to make a paintoval progressive alpha mask.
My problem is that the progressive stuff is applied to my entire matrix…
I cannot make it just in my paintoval…
And an other issue: the mask is not interp… I don’t understand why…

Could you please help me with this ?
And I have to keep jit.lcd because I use cv.jit.trackpoints to determine the position of the mask, so not gl solution :)
here’s the patch:

max v2;
#N vpatcher 0 44 1680 1046;
#P origin -286 -516;
#P window setfont "Sans Serif" 20.;
#P comment 1162 121 21 196628 1;
#P window setfont "Sans Serif" 24.;
#P comment 314 429 717 196632 How could the alpha mask be applied just on the paintoval ?;
#P window setfont "Sans Serif" 9.;
#P newex 794 336 56 196617 qlim 1000;
#P window setfont "Sans Serif" 24.;
#P comment 530 573 717 196632 Why is the alpha mask not interp like>>>>>>>>>>>>>>>>>;
#P comment 195 738 370 196632 You can move the alpha mask;
#P window setfont "Sans Serif" 9.;
#N vpatcher 20 74 620 474;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P comment 201 128 27 196617 shift;
#P window linecount 2;
#P comment 154 128 51 196617 Mac cmd/ Win ctrl;
#P window linecount 1;
#P comment 73 127 28 196617 x , y;
#P number 205 110 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 171 110 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 130 110 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 87 110 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 50 110 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 69 76 249 196617 unpack 0 0 0 0 0 0 0 0;
#P newex 69 50 110 196617 route mouse mouseidle;
#P comment 122 128 33 196617 button;
#P message 235 158 162 196617 paintoval $1 $3 $2 $4 255 255 0;
#P newex 235 135 61 196617 pak 0 0 0 0;
#P newex 322 111 31 196617 + 69;
#P newex 293 111 30 196617 – 41;
#P newex 264 111 31 196617 + 32;
#P newex 235 111 30 196617 – 41;
#P inlet 69 30 15 0;
#P outlet 235 178 15 0;
#P fasten 10 0 11 0 74 102 55 102;
#P connect 1 0 9 0;
#P fasten 9 1 10 0 124 71 74 71;
#P connect 9 0 10 0;
#P fasten 10 1 12 0 108 102 92 102;
#P fasten 10 2 13 0 142 102 135 102;
#P fasten 10 3 14 0 176 102 176 102;
#P fasten 10 4 15 0 210 102 210 102;
#P connect 10 0 2 0;
#P connect 2 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 0 0;
#P connect 3 0 6 1;
#P connect 10 0 3 0;
#P connect 4 0 6 2;
#P connect 5 0 6 3;
#P connect 10 1 4 0;
#P connect 10 1 5 0;
#P pop;
#P newobj 527 692 46 196617 p mouse;
#P button 1138 132 15 0;
#P user jit.pwindow 606 742 322 242 0 1 0 0 1 0;
#P message 0 334 83 196617 read dishes.mov;
#P user jit.pwindow 1251 558 258 78 0 1 0 1 1 0;
#P newex 1314 485 118 196617 jit.matrix 1 float32 8 1;
#P newex 1314 528 53 196617 jit.concat;
#P newex 1314 505 138 196617 jit.expr @expr "1-norm[0]";
#P newex 1154 485 118 196617 jit.matrix 1 float32 3 1;
#P newex 1154 505 96 196617 jit.expr @expr "1";
#P newex 1154 528 53 196617 jit.concat;
#P newex 1021 505 117 196617 jit.expr @expr norm[0];
#P newex 782 356 27 196617 b;
#P objectname [2];
#P newex 1021 485 118 196617 jit.matrix 1 float32 8 1;
#P objectname
[1];
#P button 1021 485 15 0;
#P user jit.pwindow 197 491 322 242 0 1 0 0 1 0;
#P window setfont "Sans Serif" 18.;
#P newex 198 430 113 196626 jit.op @op *;
#P objectname
[24];
#P window setfont "Sans Serif" 9.;
#P newex 4 547 102 196617 jit.matrix @interp 1;
#P objectname
[5];
#P newex 269 112 66 196617 t b b b b b;
#P newex 270 61 57 196617 qmetro 33;
#P newex 19 380 129 196617 jit.matrix 4 char 320 240;
#P number 19 478 35 9 0 1 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 19 496 49 196617 mode $1;
#P newex 21 430 53 196617 jit.pack 4;
#P objectname
[10];
#P newex 0 521 70 196617 jit.alphablend;
#P objectname
[11];
#P newex 21 398 66 196617 jit.unpack 4;
#P objectname
[12];
#P newex 76 419 66 196617 jit.unpack 4;
#P newex 19 358 63 196617 jit.qt.movie;
#P message 260 265 34 196617 reset;
#P newex 351 281 46 196617 t l clear;
#P newex 337 304 111 196617 jit.lcd 4 char 320 240;
#P newex 1141 158 48 196617 loadbang;
#P message 255 283 57 196617 brgb 0 0 0;
#P toggle 254 21 15 0;
#P window setfont "Sans Serif" 24.;
#P comment 1290 639 149 196632 Alpha coeff;
#P window setfont "Sans Serif" 20.;
#P comment 280 22 21 196628 2;
#P fasten 4 0 32 0 1146 333 5 333;
#P fasten 12 0 11 0 26 465 5 465;
#P connect 13 0 11 0;
#P connect 11 0 18 0;
#P fasten 17 0 8 0 274 243 24 243;
#P connect 32 0 8 0;
#P connect 8 0 15 0;
#P connect 14 0 13 0;
#P connect 15 0 10 0;
#P connect 9 1 12 0;
#P connect 10 1 12 1;
#P connect 10 2 12 2;
#P connect 10 3 12 3;
#P connect 19 0 9 0;
#P connect 5 0 19 0;
#P connect 19 0 20 0;
#P fasten 4 0 3 0 1146 229 260 229;
#P connect 16 0 17 0;
#P connect 2 0 16 0;
#P fasten 31 0 19 1 700 635 700 292 628 123;
#P connect 7 0 5 0;
#P connect 3 0 5 0;
#P connect 6 1 5 0;
#P connect 6 0 5 0;
#P fasten 17 4 5 0 330 216 342 216;
#P connect 35 0 6 0;
#P connect 20 1 35 0;
#P fasten 18 0 33 0 9 742 612 742;
#P fasten 4 0 23 0 1146 265 787 265;
#P connect 38 0 23 0;
#P fasten 17 1 38 0 288 232 799 232;
#P fasten 23 0 21 0 787 429 1026 429;
#P connect 21 0 22 0;
#P connect 22 0 24 0;
#P connect 34 0 4 0;
#P fasten 23 0 27 0 787 429 1159 429;
#P connect 27 0 26 0;
#P connect 24 0 25 0;
#P connect 26 0 25 1;
#P connect 29 0 31 0;
#P fasten 23 0 30 0 787 429 1319 429;
#P connect 30 0 28 0;
#P connect 25 0 29 0;
#P connect 28 0 29 1;
#P pop;

Hope this is clear,
Thx All
Ad.



MIB
January 9, 2011 | 8:22 pm

re interpolation: I am not sure, but might it be because your alpha coeff is created using a 8 x 1 matrix that then gets up-sampled to 320 240? I would try to put your coeff into another [jit.matrix 1 float32 320 240 @interp 1]. see if that fixes it…



Ad.
January 10, 2011 | 8:56 am

You are right !
Thx for this point.
No ideas about my other deep issue ?
THx
Ad.


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