Yo, I've got it, the background image had to be rendering between a snap and 
the snapped image,
so using a trigger resolved this.

 Inside the patch there is also something I don't understand it's explained 
inside,

just putting:

[gemhead]
|
[colorRGB 0 0 1]

turns background to blue

Also I'm very interested by the shader method because it's cpu wise
but I don't know enough the glsl functions for getting the same
fading effect we have by using [biquad]

----- "patko" <[email protected]> a écrit :

> but I still can't see the background image,
> 
> once I could see it but I couldn't get how I did it.
> +++++
> 
> Patrice Colet - 06 32 66 03 57 
> 
> ----- "Jack" <[email protected]> a écrit :
> 
> > OK, good ! ;)
> > ++
> > 
> > Jack
> > 
> > 
> > 
> > Le lundi 07 juin 2010 à 21:10 +0200, patko a écrit :
> > > the rendering order wasn't good in my patch, now you can see the
> > fading
> > > 
> > > Patrice Colet - 06 32 66 03 57 
> > > 
> > > ----- "patko" <[email protected]> a écrit :
> > > 
> > > > yes, that's what I'm trying to achieve, it just misses the
> pretty
> > > > fading we can obtain
> > > > with biquad processing, but that is exactly that,
> > > > 
> > > > thanks
> > > > ++++
> > > > Patrice Colet - 06 32 66 03 57
> > > > 
> > > > ----- "Jack" <[email protected]> a écrit :
> > > > 
> > > > > Here a patch using GLSL and the frame buffer for feedback.
> > > > > Hope it helps.
> > > > > ++
> > > > >
> > > > > Jack
> > > > >
> > > > >
> > > > >
> > > > > Le lundi 07 juin 2010 à 17:00 +0200, patko a écrit :
> > > > > > oupse I've mixed [pix_threshold] and [pix_alpha]
> > > > > >
> > > > > > it's about pix_alpha rather but I think you've understood,
> > > > > >
> > > > > > indeed I'd like the particle reveals background image
> > > > > >
> > > > > > the idea is about snaping the particle system over a black
> > > > rectangle
> > > > > (the mask)
> > > > > >
> > > > > > and then turning the white pixels to alpha for revelating
> the
> > > > > (purple) rectangle
> > > > > > that should be rendered first
> > > > > >
> > > > > > i've attached again the same patch but with [gemhead 5]
> > instead of
> > > > > [gemhead 0]
> > > > > >
> > > > > > +++
> > > > > >
> > > > > >
> > > > > >
> > > > > > ----- "Jack" <[email protected]> a écrit :
> > > > > >
> > > > > > > order rendering' because [gemwin 0] <=> [gemwin 50].
> > > > > > > If I understand, you want to see a background image when
> > the
> > > > > > > particles
> > > > > > > are drawn ?
> > > > > > > ++
> > > > > > >
> > > > > > > Jack
> > > > > >
> > > > > >
> > > > 
> > > > _______________________________________________
> > > > [email protected] mailing list
> > > > UNSUBSCRIBE and account-management ->
> > > > http://lists.puredata.info/listinfo/pd-list
#N canvas 785 46 450 415 10;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 184 245 destroy;
#X obj 102 239 t a;
#X obj 318 54 inlet;
#X obj 318 255 gemwin;
#X obj 318 100 t a a;
#X obj 318 287 outlet;
#X obj 350 128 route create destroy;
#X obj 350 150 t b;
#X msg 350 172 1;
#X obj 390 150 t b;
#X msg 390 172 0;
#X obj 350 195 t f;
#X msg 350 219 set \$1;
#X text 118 122 rendering;
#X msg 102 214 reset \, dimen 1024 768 \, create \, 1;
#X connect 1 0 2 0;
#X connect 2 0 17 0;
#X connect 2 1 3 0;
#X connect 3 0 4 0;
#X connect 4 0 7 0;
#X connect 5 0 7 0;
#X connect 6 0 8 0;
#X connect 7 0 6 0;
#X connect 7 1 9 0;
#X connect 9 0 10 0;
#X connect 9 1 12 0;
#X connect 10 0 11 0;
#X connect 11 0 14 0;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 15 0 0 0;
#X connect 17 0 4 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 25 30 pd gemwin;
#N canvas 0 0 719 495 particle 0;
#X text 345 313 set the number per frame;
#X text 343 341 set the age to kill at;
#X text 349 225 the velocity domain;
#X text 348 240 a sphere at 0 \, 0.2 \, 0;
#X text 349 259 radius = 0.3;
#X obj 219 381 part_render;
#X obj 220 256 part_size 1;
#X msg 310 233 2;
#X msg 280 232 1;
#X obj 219 313 part_source 10;
#X obj 218 227 part_head;
#X obj 219 281 part_velocity sphere 0 0 0 0.05;
#X obj 219 411 sphere 0.015;
#X obj 214 154 translateXYZ 0 0 0;
#X floatatom 295 34 5 0 0 0 - - -;
#X floatatom 352 36 5 0 0 0 - - -;
#X obj 449 27 gemmouse;
#X floatatom 451 53 5 0 0 0 - - -;
#X floatatom 492 53 5 0 0 0 - - -;
#X obj 428 79 / 1024;
#X obj 487 80 / 768;
#X obj 423 103 * 10.66;
#X obj 420 125 - 5.33;
#X obj 487 104 * -8;
#X obj 491 132 + 4;
#X obj 211 121 inlet;
#X floatatom 339 111 5 0 0 0 - - -;
#X obj 219 343 part_killold 30;
#X connect 5 0 12 0;
#X connect 6 0 11 0;
#X connect 7 0 6 1;
#X connect 8 0 6 1;
#X connect 9 0 27 0;
#X connect 10 0 6 0;
#X connect 11 0 9 0;
#X connect 13 0 10 0;
#X connect 14 0 13 1;
#X connect 15 0 13 2;
#X connect 16 0 17 0;
#X connect 16 1 18 0;
#X connect 17 0 19 0;
#X connect 18 0 20 0;
#X connect 19 0 21 0;
#X connect 20 0 23 0;
#X connect 21 0 22 0;
#X connect 22 0 14 0;
#X connect 23 0 24 0;
#X connect 24 0 15 0;
#X connect 25 0 13 0;
#X connect 26 0 13 3;
#X connect 27 0 5 0;
#X restore 148 72 pd particle system;
#N canvas 475 175 541 421 biquad 0;
#X obj 111 356 pix_texture;
#X text 161 143 draw the snapped texture;
#X floatatom 246 194 3 0 1 2 fb0 - -;
#X floatatom 270 194 3 0 1 2 fb1 - -;
#X floatatom 294 194 3 0 1 2 fb2 - -;
#X floatatom 323 194 3 0 1 2 ff1 - -;
#X floatatom 347 194 3 0 1 2 ff2 - -;
#N canvas 0 0 450 300 init 0;
#X obj 104 258 outlet;
#X obj 154 258 outlet;
#X obj 204 258 outlet;
#X obj 254 258 outlet;
#X obj 304 258 outlet;
#X obj 244 59 inlet;
#X obj 388 158 t b;
#X msg 378 201 1;
#X msg 413 201 0;
#X obj 246 88 route 1;
#X obj 353 258 outlet;
#X obj 238 127 t b;
#X obj 193 105 t b b;
#X obj 277 115 t b b;
#X msg 277 135 1;
#X msg 140 213 0.4;
#X msg 104 214 0.7;
#X msg 175 214 0.6;
#X msg 277 215 0.6;
#X msg 312 213 0.6;
#X msg 247 215 0.5;
#X connect 5 0 9 0;
#X connect 6 0 7 0;
#X connect 6 0 8 0;
#X connect 7 0 3 0;
#X connect 8 0 1 0;
#X connect 8 0 2 0;
#X connect 8 0 4 0;
#X connect 8 0 10 0;
#X connect 9 0 12 0;
#X connect 9 1 13 0;
#X connect 11 0 17 0;
#X connect 11 0 20 0;
#X connect 11 0 18 0;
#X connect 11 0 19 0;
#X connect 11 0 15 0;
#X connect 12 0 16 0;
#X connect 12 1 11 0;
#X connect 13 0 14 0;
#X connect 13 1 6 0;
#X connect 14 0 0 0;
#X connect 15 0 1 0;
#X connect 16 0 0 0;
#X connect 17 0 2 0;
#X connect 18 0 4 0;
#X connect 19 0 10 0;
#X connect 20 0 3 0;
#X restore 356 121 pd init;
#X obj 110 234 pix_biquad;
#X floatatom 371 194 3 0 1 2 ff3 - -;
#X obj 246 212 pack 1 0 0 1 0 0;
#X obj 111 202 pix_snap 0 0 1024 768;
#X obj 296 248 cnv 15 160 120 empty empty empty 20 12 0 14 -24198 -66577
0;
#X floatatom 185 246 5 0 1 1 pass - -;
#X floatatom 241 246 5 0 1 1 other - -;
#X obj 111 324 pix_alpha;
#X obj 112 381 rectangle 5.33 4;
#X obj 360 94 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X msg 23 49 quality \$1;
#X obj 23 30 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X obj 400 224 loadbang;
#X obj 355 71 loadbang;
#X msg 327 236 0;
#X msg 329 258 1;
#X obj 106 34 inlet;
#X obj 108 143 t a b b;
#X obj 126 169 outlet;
#X text 166 125 snap \, draw a background and;
#X obj 72 175 alpha;
#X obj 106 89 translateXYZ 0 0 0;
#X floatatom 208 48 5 0 0 0 - - -;
#X msg 331 280 1 1 1;
#X msg 330 300 0.7 0.7 0.7;
#X connect 0 0 16 0;
#X connect 2 0 10 0;
#X connect 3 0 10 1;
#X connect 4 0 10 2;
#X connect 5 0 10 3;
#X connect 6 0 10 4;
#X connect 7 0 2 0;
#X connect 7 1 3 0;
#X connect 7 2 4 0;
#X connect 7 3 5 0;
#X connect 7 4 6 0;
#X connect 7 5 9 0;
#X connect 8 0 15 0;
#X connect 9 0 10 5;
#X connect 10 0 8 0;
#X connect 11 0 8 0;
#X connect 13 0 15 1;
#X connect 14 0 15 2;
#X connect 15 0 0 0;
#X connect 17 0 7 0;
#X connect 18 0 0 0;
#X connect 19 0 18 0;
#X connect 20 0 22 0;
#X connect 20 0 23 0;
#X connect 20 0 31 0;
#X connect 20 0 32 0;
#X connect 21 0 17 0;
#X connect 22 0 15 1;
#X connect 23 0 15 2;
#X connect 24 0 29 0;
#X connect 25 0 28 0;
#X connect 25 1 26 0;
#X connect 25 2 11 0;
#X connect 28 0 11 0;
#X connect 29 0 25 0;
#X connect 30 0 29 3;
#X connect 31 0 15 3;
#X connect 32 0 15 4;
#X restore 149 153 pd biquad;
#N canvas 0 0 463 300 background 0;
#X obj 154 42 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X obj 155 209 rectangle 5.34 4;
#X obj 184 20 loadbang;
#X msg 184 45 0;
#X obj 28 18 inlet;
#X obj 155 72 gemhead;
#X obj 156 145 pix_image;
#X msg 72 107 open \$1;
#X obj 73 85 openpanel;
#X obj 87 69 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 157 174 pix_texture;
#X obj 274 153 colorRGB 0 0 1;
#X obj 156 102 spigot 1;
#X obj 211 73 == 0;
#X obj 305 77 == 1;
#X obj 273 111 spigot;
#X obj 299 44 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 82 21 inlet;
#X text 244 20 why this turn background to blue?;
#X connect 0 0 5 0;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
#X connect 4 0 5 0;
#X connect 5 0 12 0;
#X connect 5 0 15 0;
#X connect 6 0 10 0;
#X connect 7 0 6 0;
#X connect 8 0 7 0;
#X connect 9 0 8 0;
#X connect 10 0 1 0;
#X connect 12 0 6 0;
#X connect 13 0 12 1;
#X connect 14 0 15 1;
#X connect 15 0 11 0;
#X connect 16 0 13 0;
#X connect 16 0 14 0;
#X connect 17 0 8 0;
#X restore 149 229 pd background image;
#X obj 148 47 gemhead 40;
#X obj 149 123 gemhead;
#X obj 255 208 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X text 279 205 <--open image;
#X text 272 228 <-- problem exposed inside;
#X text 36 100 pix_alpha turns white pixels to alpha then reveal background
image;
#X connect 2 0 3 0;
#X connect 4 0 1 0;
#X connect 5 0 2 0;
#X connect 6 0 3 1;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to