Hello, Here the patch with a little description inside. Before to capture what you you need, you have to wait they are rendered. Add a float after [gemhead 50] as argument to force to draw the sphere and the cube first and then send a bang to [pix_snap] to capture them (with the help of [gemhead 51]). ++
Jack Le vendredi 27 novembre 2009 à 15:24 +0100, Matteo Sisti Sette a écrit : > Hi, > > I have the impression that GEM documentation is very poor. Please prove > I'm wrong, that would make me very happy. > > I don't understand how to use pix_snap (and I'm quite surprised to see > that the help patch doesn't provide any example like most help patches do). > > In my ignorance, I would expect the attached patch to "capture" a > "photo" of the red sphere and this photo to appear as a texture on the > rectangle in the background, as soon as you click on the "snap" message > box. On the contrary, I only see a black rectangle. > > What am I doing wrong? > > Thanks > m. > > > pièce jointe document texte brut (prove.pd) > #N canvas 623 111 725 579 12; > #X obj 508 125 pix_snap; > #X obj 22 147 gemhead; > #X obj 506 174 pix_texture; > #X obj 314 362 rectangle 5.3333 4; > #X obj 36 338 rotateXYZ 0 0 0; > #X floatatom 54 304 5 0 0 0 - - -; > #X floatatom 101 302 5 0 0 0 - - -; > #X obj 37 453 color 1 0 0; > #X obj 34 494 sphere; > #X obj 429 492 gemwin; > #X msg 385 434 create \, 1; > #X msg 484 457 destroy; > #X msg 509 83 snap; > #X obj 29 397 translateXYZ 0 0 -6; > #X obj 302 315 translateXYZ 0 0 -8; > #X obj 441 36 gemhead; > #X obj 303 118 gemhead; > #X obj 306 256 pix_texture; > #X connect 0 0 2 0; > #X connect 1 0 4 0; > #X connect 2 1 17 1; > #X connect 4 0 13 0; > #X connect 5 0 4 1; > #X connect 6 0 4 2; > #X connect 7 0 8 0; > #X connect 10 0 9 0; > #X connect 11 0 9 0; > #X connect 12 0 0 0; > #X connect 13 0 7 0; > #X connect 14 0 3 0; > #X connect 15 0 0 0; > #X connect 16 0 17 0; > #X connect 17 0 14 0; > _______________________________________________ > [email protected] mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list
#N canvas 550 158 725 579 12; #X obj 269 242 pix_texture; #X obj 59 209 rotateXYZ 0 0 0; #X floatatom 77 175 5 0 0 0 - - -; #X floatatom 124 173 5 0 0 0 - - -; #X obj 59 267 color 1 0 0; #X obj 59 298 sphere; #X obj 59 82 gemwin; #X msg 59 21 create \, 1; #X msg 73 51 destroy; #X obj 59 238 translateXYZ 0 0 -6; #X obj 394 275 pix_texture; #X obj 269 51 gemhead 51; #X obj 394 237 gemhead 52; #X obj 269 193 pix_snap 0 0 500 500; #X obj 301 122 spigot; #X obj 340 97 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 269 96 t a b; #X obj 301 149 t b b; #X floatatom 512 282 5 0 0 0 - - -; #X text 560 281 2) move; #X obj 394 354 rectangle 4 4; #X obj 59 419 rotateXYZ 0 0 0; #X floatatom 77 385 5 0 0 0 - - -; #X floatatom 124 383 5 0 0 0 - - -; #X text 365 94 1) capture everything with gemhead < 51 rendered.; #X obj 59 477 color 0 1 0; #X obj 59 508 cube 0.5; #X obj 59 448 translateXYZ -4 0 -6; #X obj 394 314 translateXYZ 0 0 -8; #X obj 59 132 gemhead 50; #X obj 59 342 gemhead 50; #X connect 0 1 10 1; #X connect 1 0 9 0; #X connect 2 0 1 1; #X connect 3 0 1 2; #X connect 4 0 5 0; #X connect 7 0 6 0; #X connect 8 0 6 0; #X connect 9 0 4 0; #X connect 10 0 28 0; #X connect 11 0 16 0; #X connect 12 0 10 0; #X connect 13 0 0 0; #X connect 14 0 17 0; #X connect 15 0 14 1; #X connect 16 0 13 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 15 0; #X connect 18 0 28 1; #X connect 21 0 27 0; #X connect 22 0 21 1; #X connect 23 0 21 2; #X connect 25 0 26 0; #X connect 27 0 25 0; #X connect 28 0 20 0; #X connect 29 0 1 0; #X connect 30 0 21 0;
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
