individual white subtraction

Mar 15, 2006 at 1:45am

individual white subtraction

hello

I am trying to subtract the white color of drawings to be able to blend them, but I am confused. Is it possible to attribute that to each individual one, without having to fade one with another one? I mean, I want to do that individually to each one, maintaining the rest of the colors.
I am trying to do that with the video plane, but that blends the whole image. (As far as I know… I am a total Jitter beginner) and all the others objects such as the alpha blend, etc, rely on a second image or jitqt movie to do that.

any ideas of the object (s) that might feet in here?

Thanks,
Daniela

#24887
Mar 15, 2006 at 2:05am

Use jit.chromakey with a target color of white (and probblay a small
tolerance and xfade amount) to generate an alpha channel for your
movie. If you’re not familiar with chromakeying or alpha channels,
I’d suggest researching online and running through the Jitter
tutorials on the subject.

If you like you could use the chromakey shader on the GPU to this end.

-Joshua

#72579
Mar 16, 2006 at 5:23pm

Hello Joshua
Thanks for your respond. but I think that I am not making myself
clear� and because I am total beginner, and it takes me a long them
to understand the shader, video planes.. etc,… I want to make sure
that I am in the right direction �.

I have a red outline on a white background� so in that case there is
no a problem because it is just one image. But when I another image
is read, for example.. it appears on top of that image, let’s say a
blue outline on a white background� that image is covering the first
one.

I want the colors to merge, meaning, I want to see outlines, the blue
and the red �one on top of the other�. With no white colors
interfering� (Just the matrix background)

So what I aiming for and because of the way each sub patch of my image
works, I would like to load the image to read only the outline,
forgetting about the image’s white background�

The alpha channel and the chromakey is great, but it requires of a
second image inside the subpatch to blend it with�

I am sorry if I am not making sense, �I do not know how else to explain this�
Thanks
Daniela

#72580
Mar 16, 2006 at 5:51pm

This can be handled by using mode 2 of jit.chromakey to generate an
alpha channel for blending.

-
Andrew B.

#72581
Mar 16, 2006 at 8:27pm

#72582
Mar 20, 2006 at 10:33pm

Hello
I still cannot do it….
I do not get it…
I tried without the gl.render and it works only using the example pat… but when I apply it to my patch it does not work.. So I finally decided to use the gl.render stuff and
I changed my matrix to a float 32. I get how to send the gl.render to the matrix… but it still does not work!!.. Maybe I am having problems with the color values now that I am working with gl render… If you tell me what to read I will…

Here is the sub patch and also I attached the example patch that I was basing my work from. . Because maybe I do not need the gl render stuff? knowing that I could have much more visual effects using the different video planes? but for then moment I just want to see my outlines images without the white!

here is the individual sup patch and In attached images..
after is the example patch
thanks,
Daniela

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 313 585 32 196617 print;
#P newex 139 333 32 196617 print;
#P newex 91 590 109 196617 jit.gl.render Stamping;
#P newex 99 283 353 196617 jit.gl.videoplane Stamping @blend_enable 1@depth_disabled @matrixoutput1;
#P newex 85 255 269 196617 jit.chromakey @mode 2 @alphaignore 1 @color 1. 1. 1. 1.;
#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 5;
#P message 249 55 70 1441802 ; tol 1.3 ; fade 2.2 ; minkey 0. ; maxkey 1.;
#P window linecount 1;
#P newex 812 132 94 1441802 vexpr $i1/150.;
#P newex 812 156 83 1441802 prepend color;
#P newex 911 181 53 1441802 r minkey;
#P newex 858 181 43 1441802 r fade;
#P newex 769 167 38 1441802 r tol;
#P flonum 911 202 35 10 0. 0 1 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 858 202 35 10 0. 0 1 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 911 220 62 1441802 minkey $1;
#P message 858 220 50 1441802 fade $1;
#P flonum 769 188 35 10 0. 0 1 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 769 206 43 1441802 tol $1;
#P window setfont “Sans Serif” 12.;
#P newex 304 208 65 196620 r chroma;
#P newex 824 315 66 196620 s chroma;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 295 323 58 1441802 t amorfo;
#P newex 298 352 52 1441802 s index;
#P window setfont “Sans Serif” 9.;
#P message 644 189 14 196617 1;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 484 328 112 1441802 scale 0 615 615 0;
#P window setfont “Sans Serif” 9.;
#P flonum 528 357 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 86 226 136 1441802 jit.qt.movie 1024 768;
#P window setfont “Sans Serif” 9.;
#P number 484 353 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 440 353 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont Times 10.;
#P comment 535 376 27 1310730 scale;
#P comment 491 376 40 1310730 y origin;
#P comment 447 376 40 1310730 x origin;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 25 158 58 1441802 r amorfo;
#N vpatcher 566 44 934 327;
#P origin 0 10;
#P window setfont Times 10.;
#P comment 208 69 117 1310730 Scaling factor gets multiplied by 320 x 240 to determine size of the area in the destination matrix;
#P outlet 26 221 15 0;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 114 94 38 1441802 t b f;
#P newex 158 96 38 1441802 t b f;
#N comlet scale;
#P inlet 114 24 15 0;
#P newex 158 131 38 1441802 + 0.;
#P newex 114 131 38 1441802 + 0.;
#P newex 158 68 46 1441802 * 153.;
#P newex 114 68 46 1441802 * 255.;
#P newex 26 164 144 1441802 pak 0 0 0 0;
#N comlet y origin;
#P inlet 70 24 15 0;
#N comlet x origin;
#P inlet 26 24 15 0;
#P message 26 195 212 1441802 dstdimstart $1 $2 , dstdimend $3 $4;
#P user panel 20 18 313 225;
#X brgb 128 128 255;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 2 0 4 0;
#P connect 4 0 1 0;
#P connect 1 0 12 0;
#P connect 3 0 4 1;
#P connect 9 0 5 0;
#P connect 5 0 11 0;
#P fasten 2 0 7 0 31 124 119 124;
#P connect 11 0 7 0;
#P connect 7 0 4 2;
#P connect 11 1 7 1;
#P fasten 9 0 6 0 119 53 163 53;
#P connect 6 0 10 0;
#P fasten 3 0 8 0 75 118 163 118;
#P connect 10 0 8 0;
#P connect 8 0 4 3;
#P connect 10 1 8 1;
#P pop;
#P newobj 440 401 99 1441802 p coords;
#P newex 91 467 286 1441802 jit.matrix big_composite float 32 @usedstdim 1;
#P newex 444 155 40 1441802 buddy;
#P newex 89 137 58 1441802 loadbang;
#P newex 440 182 58 1441802 pack 0 0;
#P newex 428 70 130 1441802 unpack 0 0 0;
#P newex 377 109 106 1441802 scale 0 11 0 615;
#P newex 488 109 106 1441802 scale 0 11 0 769;
#P inlet 387 32 15 0;
#P newex 617 161 58 1441802 loadbang;
#P window setfont “Sans Serif” 9.;
#P message 617 189 23 196617 0 0;
#P user pictslider 465 199 100 100 4 4 4 4 SliderDefaultKnob.pct 1 SliderDefaultBkgnd.pct 1 2163 0 40304640 769 1. 1.;
#P window setfont Times 14.;
#P comment 3 49 209 1310734 image dimensions: 153h x 255w;
#P window setfont “Fixedwidth Serif” 10.;
#P message 89 163 100 1441802 read amorfo.png;
#P connect 27 0 40 0;
#P connect 10 0 0 0;
#P connect 10 0 39 0;
#P fasten 40 0 12 0 88 272;
#P connect 40 0 41 0;
#P connect 12 0 42 0;
#P fasten 13 0 12 0 445 419 96 419;
#P connect 20 0 40 0;
#P connect 0 0 20 0;
#P fasten 14 0 20 0 30 185 91 185;
#P connect 41 0 43 0;
#P fasten 2 0 25 0 470 312 300 312;
#P connect 25 0 24 0;
#P connect 42 0 44 0;
#P connect 8 0 7 0;
#P connect 5 0 8 0;
#P connect 11 0 9 0;
#P connect 2 0 18 0;
#P connect 18 0 13 0;
#P connect 7 0 11 0;
#P connect 9 0 2 0;
#P connect 3 0 2 0;
#P connect 6 0 11 1;
#P fasten 2 1 22 0 560 321 489 321;
#P connect 22 0 19 0;
#P connect 19 0 13 1;
#P connect 8 1 6 0;
#P connect 11 1 9 1;
#P fasten 23 0 21 0 649 349 533 349;
#P connect 21 0 13 2;
#P connect 4 0 3 0;
#P fasten 4 0 23 0 622 185 649 185;
#P connect 34 0 29 0;
#P connect 29 0 28 0;
#P connect 38 0 37 0;
#P connect 28 0 26 0;
#P fasten 31 0 26 0 916 239;
#P connect 30 0 26 0;
#P connect 37 0 26 0;
#P connect 35 0 32 0;
#P connect 32 0 30 0;
#P connect 36 0 33 0;
#P connect 33 0 31 0;
#P window clipboard copycount 45;

example patch

#P window setfont Times 10.;
#P window linecount 1;
#P comment 357 131 42 1310730 Image B;
#P comment 457 47 43 1310730 Initialize;
#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 5;
#P message 456 75 70 1441802 ; tol 1.3 ; fade 2.2 ; minkey 0. ; maxkey 1.;
#P window linecount 1;
#P newex 239 492 53 1441802 r maxkey;
#P newex 172 493 53 1441802 r minkey;
#P newex 119 493 43 1441802 r fade;
#P newex 73 493 38 1441802 r tol;
#P newex 404 45 53 1441802 loadbang;
#P flonum 239 514 35 10 0. 0 1 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 172 514 35 10 0. 0 1 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 119 514 35 10 0. 0 1 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 239 532 62 1441802 maxkey $1;
#P message 172 532 62 1441802 minkey $1;
#P message 119 532 50 1441802 fade $1;
#P flonum 73 514 35 10 0. 0 1 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 73 532 43 1441802 tol $1;
#P user jit.pwindow 404 152 322 242 0 1 0 0 1 0;
#P user jit.pwindow 225 263 162 122 0 1 0 0 1 0;
#P user jit.pwindow 58 263 162 122 0 1 0 0 1 0;
#P newex 67 615 130 1441802 jit.chromakey @mode2;
#B color 5;
#P message 244 97 34 1441802 read;
#P message 76 98 34 1441802 read;
#P toggle 62 29 13 0;
#P newex 66 40 53 1441802 metro 50;
#P newex 229 128 128 1441802 jit.qt.movie 320 240;
#P newex 62 128 128 1441802 jit.qt.movie 320 240;
#P window setfont Times 10.;
#P comment 77 29 49 1310730 Start/Stop;
#P fasten 19 0 5 0 409 66 160 66 147 79 81 79;
#P fasten 19 0 6 0 409 66 249 66;
#P connect 19 0 24 0;
#P fasten 7 0 10 0 72 560 401 560 401 150 410 150;
#P connect 18 0 15 0;
#P connect 23 0 18 0;
#P connect 3 0 1 0;
#P fasten 3 0 2 0 71 72 234 72;
#P connect 6 0 2 0;
#P fasten 2 0 9 0 234 149 231 149;
#P connect 2 0 7 1;
#P connect 17 0 14 0;
#P connect 22 0 17 0;
#P connect 16 0 13 0;
#P connect 21 0 16 0;
#P connect 12 0 11 0;
#P connect 20 0 12 0;
#P fasten 15 0 7 0 244 557 72 557;
#P fasten 14 0 7 0 177 557 72 557;
#P fasten 13 0 7 0 124 557 72 557;
#P fasten 11 0 7 0 78 557 72 557;
#P fasten 1 0 8 0 67 149 64 149;
#P connect 1 0 7 0;
#P connect 4 0 3 0;
#P connect 5 0 1 0;
#P window clipboard copycount 27;

#72583
Mar 20, 2006 at 10:52pm

Hi Daniela,

Several things you are doing improperly here. It seems like you need
to spend a little bit more time learning the fundamentals before
approaching this task.

1. I’m not sure why you have the matrix output of jit.chromakey
connected to jit.gl.render. This is converting the image to geometry
(and improperly so if that is what you would be trying to achieve).
Also your arguments to “jit.matrix big_composite float 32 @usedstdim
1″ do not make sense. they should be
. You have an incorrect type (must be
float32 *no space*), and no dimensions.

2. you don’t have proper spaces in your jit.gl.videoplane arguments.
this is *important*. “jit.gl.videoplane Stamping @blend_enable
1@depth_disabled @matrixoutput1″ should be “jit.gl.videoplane
Stamping @blend_enable 1 @depth_enable 0″ (note that there must be a
space between the 1 and the @ symbol, depth_diabled is not an
attribute, and you shouldn’t be using matrix output for this putpose)

Hope this helps. Please take some time to walk through the tutorials
carefully. I think you’ll find this easier once you have done so.

-Joshua

#72584
Mar 21, 2006 at 2:51pm

Hi Joshua Thanks. It did help.
And also looking at all the render examples patches have been a
revelation to me! I think that know that things are starting to be in
place the blending etc should become an easier task…
Daniela

#72585
Mar 28, 2006 at 12:09am

Hello

I have a couple of questions

I do not understand if you can send send render message from my 6
sub patches to one jit.slab to read the chromakey shader and then to
one video plane stamping to render the whole movie. Because I still
cannot achieve any blending to work and if I do not have the blending
I cannot do any effects because I do not see how the images blends..?
I want to make an organize patch? and be economical?. But it is not
working?

Or should I treat each subpatch individually and have 6 simultaneous
rendered video planes?

Also is this correct? I do not get any error message? and it does not work..

#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 1;
#P newex 715 185 57 1441802 r render;
#P window setfont “Sans Serif” 9.;
#P message 810 207 115 196617 sendshader flush_cache;
#P message 886 177 75 196617 dump assembly;
#P message 810 177 68 196617 dump params;
#P window linecount 2;
#P newex 692 313 185 196617 jit.gl.videoplane Stamping @scale 1.333 1. 1.;
#P window linecount 1;
#P newex 690 246 115 196617 jit.gl.slab Stamping;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 177 314 53 1441802 r output;
#P window linecount 2;
#P newex 245 429 154 1441802 jit.matrix big_composite 4 char 768 1024;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 410 466 32 196617 print;
#P window setfont “Sans Serif” 10.;
#P newex 465 358 58 196618 t b b erase;
#P window linecount 4;
#P newex 423 414 144 196618 jit.gl.render big_composite @automatic 0
@depth_enable 0 @blend_enable 1;
#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 1;
#P newex 576 301 58 1441802 loadbang;
#P newex 33 370 64 1441802 r bgcolor;
#P message 33 394 130 1441802 setall 0 255 255 255;
#P window setfont Times 10.;
#P comment 592 323 27 1310730 Start;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 576 366 62 1441802 jit.qball;
#B color 5;
#P toggle 576 322 15 0;
#P newex 576 342 58 1441802 metro 50;
#N vpatcher 30 89 630 489;
#P outlet 172 272 15 0;
#P window setfont Times 10.;
#P window linecount 2;
#P comment 32 118 72 1310730 Display as floating window;
#P window linecount 1;
#P comment 276 163 88 1310730 Full Screen Display;
#P toggle 17 126 15 0;
#P window setfont “Fixedwidth Serif” 10.;
#P message 17 144 73 1441802 floating $1;
#P newex 369 129 212 1441802 sel 0 1;
#P window linecount 2;
#P message 369 150 98 1441802 ; max showmenubar;
#P message 470 150 98 1441802 ; max hidemenubar;
#P window linecount 1;
#P message 172 162 83 1441802 fullscreen $1;
#P toggle 261 162 15 0;
#P window setfont Times 10.;
#P comment 321 142 44 1310730 space bar;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 259 140 62 1441802 select 32;
#P newex 259 119 40 1441802 key;
#P window setfont Times 10.;
#P window linecount 2;
#P comment 122 118 78 1310730 Interpolate to smooth pixelation;
#P toggle 107 126 15 0;
#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 1;
#P message 107 144 62 1441802 interp $1;
#P connect 12 0 11 0;
#P connect 1 0 0 0;
#P fasten 6 0 7 0 266 180 257 180 257 158 177 158;
#P connect 11 0 15 0;
#P connect 0 0 15 0;
#P connect 7 0 15 0;
#P connect 3 0 4 0;
#P connect 4 0 6 0;
#P fasten 6 0 10 0 266 180 365 180 365 126 374 126;
#P connect 10 0 9 0;
#P connect 10 1 8 0;
#P pop;
#P newobj 79 297 82 1441802 p fullscreen;
#P window setfont “Sans Serif” 10.;
#P window linecount 2;
#P newex 1 454 133 196618 jit.matrix big_composite 4 char 768 1024;
#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 1;
#P newex -1 330 208 1441802 jit.window Stamping 0 45 1024 813;
#P window setfont “Sans Serif” 9.;
#P newex 244 378 48 196617 t clear b;
#P window linecount 4;
#P comment 315 288 100 196617 esto es un solo elemento pero tengo qye
aunmentar yn trigger;
#P connect 7 0 13 0;
#P connect 4 0 2 0;
#P connect 9 0 3 0;
#P connect 10 0 9 0;
#P fasten 16 0 1 0 182 355 249 355;
#P connect 18 0 15 0;
#P fasten 13 0 15 0 470 400 250 400;
#P connect 1 1 15 0;
#P connect 1 0 15 0;
#P connect 12 0 14 0;
#P connect 18 0 12 0;
#P fasten 13 2 12 0 518 393 428 393;
#P fasten 13 1 12 0 494 393 428 393;
#P connect 11 0 6 0;
#P connect 6 0 5 0;
#P connect 5 0 7 0;
#P fasten 21 0 17 0 815 233 695 233;
#P fasten 19 0 17 0 815 201 695 201;
#P fasten 20 0 17 0 891 201 695 201;
#P fasten 22 0 17 0 720 211 695 211;
#P connect 17 0 18 0;
#P window clipboard copycount 23;

#72586

You must be logged in to reply to this topic.