Forums > Jitter

Jit.gl.sketch

June 11, 2007 | 3:49 pm

Hi,
I have been trying to use jit.gl.sketch to create a drawing area over the top of vaious moving jit.gl.videoplanes objects. So far I have been unable to place the videoplanes behind the drawing. Does anybody know if and how this can be achieved? I have the render set to ortho2 as I am not interested in the Z axis.

Thanks

Andy


June 11, 2007 | 4:36 pm

im taking a guess here you will have to specify your render order,
either with @layer, or @automatic 0 and controlling your bangs for
render order with t b b b b b b b b b b b b b b b b b b b b and the like

but without a patch its hard to know

On Jun 11, 2007, at 11:49 AM, Andy Brennan wrote:

>
> Hi,
> I have been trying to use jit.gl.sketch to create a drawing area
> over the top of vaious moving jit.gl.videoplanes objects. So far I
> have been unable to place the videoplanes behind the drawing. Does
> anybody know if and how this can be achieved? I have the render set
> to ortho2 as I am not interested in the Z axis.
>
> Thanks
>
> Andy

v a d e //

http://www.vade.info
abstrakt.vade.info


June 11, 2007 | 4:51 pm

I have not seen "@layer, or @automatic 0" before. I have always order banged the "drawto" message to set videoplane render ordering in the past. This does not work on jit.gl.sketch though. An example patch is:

max v2;
#N vpatcher 1280 22 2560 1024;
#P origin 24 -48;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 977 372 46 196617 metro 5;
#P newex 977 318 27 196617 1;
#P newex 977 294 48 196617 loadbang;
#N vpatcher 1280 22 2560 998;
#P origin 96 -9;
#P window setfont "Sans Serif" 18.;
#P window linecount 1;
#P comment 254 89 235 196626 Some Random Videoplane;
#N comlet Mouse Info In;
#P inlet 747 104 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 1045 292 27 196617 5.;
#P newex 1045 268 48 196617 loadbang;
#P message 1011 386 79 196617 drawto window;
#P message 896 386 112 196617 glclearcolor 1. 1. 1. 1.;
#P message 781 387 112 196617 glclearcolor 0. 0. 0. 0.;
#P comment 762 219 28 196617 x , y;
#P number 911 197 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 893 197 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 875 197 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 857 197 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 839 197 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 821 197 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 784 197 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 747 197 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 747 171 166 196617 unpack 0 0 0 0 0 0 0 0;
#P newex 747 145 110 196617 route mouse mouseidle;
#P comment 831 219 169 196617 button , cmd , shift , caps , opt , ctrl;
#P flonum 825 276 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 786 276 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 747 300 66 196617 pack 0. 0. 0.;
#P flonum 747 276 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 18.;
#P message 898 319 61 196626 reset;
#P window setfont "Sans Serif" 9.;
#P message 1045 342 69 196617 line_width $1;
#P flonum 1045 319 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 970 342 69 196617 point_size $1;
#P flonum 970 319 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 747 327 80 196617 lineto $1 $2 $3;
#P newex 747 434 214 196617 jit.gl.sketch window @glclearcolor 1. 1. 1. 1.;
#B color 5;
#P newex 879 244 92 196617 scale 0 720 1. -1.;
#P newex 747 243 116 196617 scale 0 960 -1.33 1.33;
#P window linecount 0;
#P newex 98 342 48 196617 loadbang;
#P newex 563 226 27 196617 0.5;
#P newex 563 203 48 196617 loadbang;
#P newex 175 264 27 196617 1;
#P newex 175 242 48 196617 loadbang;
#P newex 563 287 47 196617 * 1.333;
#P flonum 563 250 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 380 465 202 196617 jit.gl.videoplane window @colormode uyvy;
#P message 98 365 72 196617 read fucksake;
#P toggle 175 289 15 0;
#P newex 175 309 51 196617 qmetro 5;
#P flonum 261 343 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 261 364 42 196617 rate $1;
#P message 230 365 28 196617 read;
#P newex 175 400 200 196617 jit.qt.movie 1440 1080 @colormode uyvy;
#B color 5;
#P newex 563 346 40 196617 t i i i;
#P newex 563 324 27 196617 1;
#P flonum 637 373 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 600 373 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 563 373 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 526 400 121 196617 pak scale 1. 1. 1.;
#P flonum 491 373 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 454 373 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 417 373 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 380 400 121 196617 pak position 0. 0. 0.;
#P window setfont "Sans Serif" 18.;
#P comment 948 75 144 196626 Allow Drawing;
#P user panel 734 68 393 408;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 71 60 629 454;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 27 0 19 0;
#P connect 23 0 24 0;
#P connect 24 0 18 0;
#P connect 18 0 17 0;
#P connect 17 0 13 0;
#P fasten 19 0 13 0 103 391 180 391;
#P fasten 14 0 13 0 235 391 180 391;
#P fasten 15 0 13 0 266 391 180 391;
#P connect 16 0 15 0;
#P fasten 13 0 20 0 180 430 385 430;
#P connect 3 0 20 0;
#P fasten 7 0 20 0 531 430 385 430;
#P connect 4 0 3 1;
#P fasten 5 0 3 2 459 395 459 395;
#P fasten 6 0 3 3 496 395 496 395;
#P connect 25 0 26 0;
#P connect 26 0 21 0;
#P connect 21 0 22 0;
#P connect 11 0 12 0;
#P connect 22 0 8 0;
#P connect 12 0 8 0;
#P connect 8 0 7 1;
#P fasten 21 0 9 0 568 275 605 275;
#P fasten 12 1 9 0 583 368 605 368;
#P fasten 9 0 7 2 605 394 605 394;
#P fasten 12 2 10 0 598 368 642 368;
#P fasten 10 0 7 3 642 394 642 394;
#P connect 58 0 42 0;
#P fasten 42 1 43 0 802 166 752 166;
#P connect 42 0 43 0;
#P connect 43 0 44 0;
#P connect 44 0 28 0;
#P connect 28 0 37 0;
#P connect 37 0 38 0;
#P connect 38 0 31 0;
#P fasten 55 0 30 0 1016 416 752 416;
#P fasten 54 0 30 0 901 416 752 416;
#P fasten 53 0 30 0 786 416 752 416;
#P hidden fasten 31 0 30 0 752 429 752 429;
#P fasten 35 0 30 0 1050 373 752 373;
#P fasten 33 0 30 0 975 416 752 416;
#P fasten 36 0 30 0 903 373 752 373;
#P fasten 39 0 38 1 791 295 780 295;
#P fasten 43 1 45 0 774 192 789 192;
#P fasten 29 0 39 0 884 268 791 268;
#P fasten 40 0 38 2 830 295 808 295;
#P fasten 43 2 46 0 796 192 826 192;
#P fasten 43 3 47 0 818 192 844 192;
#P fasten 43 4 48 0 840 192 862 192;
#P fasten 43 5 49 0 862 192 880 192;
#P fasten 45 0 29 0 789 236 884 236;
#P fasten 43 6 50 0 884 192 898 192;
#P fasten 43 7 51 0 906 192 916 192;
#P connect 32 0 33 0;
#P connect 56 0 57 0;
#P connect 57 0 34 0;
#P connect 34 0 35 0;
#P pop;
#P newobj 968 136 85 196617 p OpenGL Visuals;
#P hidden newex 969 159 48 196617 loadbang;
#P window linecount 8;
#P hidden message 969 179 125 196617 bang ; max setslop 1 ; max setsleep 1 ; max setpollthrottle 10 ; max setqueuethrottle 10 ; max seteventinterval 2 ; max refreshrate 5 ; max enablerefresh 1 ;;
#P window setfont "Fixedwidth Serif" 10.;
#P window linecount 1;
#P message 1 111 94 1441802 colormode uyvy;
#P user jit.pwindow 0 135 962 722 1 1 0 1 1 0;
#X name window;
#P window setfont "Sans Serif" 9.;
#P user jit.fpsgui 1020 453 60 196617 0;
#P newex 976 396 43 196617 jit.qball;
#P toggle 977 347 15 0;
#P newex 976 427 55 196617 t b erase b;
#P newex 976 490 146 196617 jit.gl.render window @ortho 2;
#P window setfont "Sans Serif" 18.;
#P window linecount 2;
#P comment 99 68 895 196626 Try dragging with left button. The line drawn goes behind the videoplane. I want it to go in front of the videoplane , and the background to be transparent to allow us to see the videoplane.;
#P fasten 7 0 6 0 6 129 6 129;
#P fasten 6 1 10 0 1145 856 1145 120 973 120;
#P hidden connect 9 0 8 0;
#P connect 13 0 4 0;
#P connect 4 0 2 0;
#P fasten 2 1 1 0 1003 455 981 455;
#P connect 2 0 1 0;
#P connect 11 0 12 0;
#P connect 12 0 3 0;
#P connect 3 0 13 0;
#P connect 2 2 5 0;
#P pop;

Cheers

Andy


June 11, 2007 | 5:07 pm

@automatic 0 fixes it for me

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 1161 418 41 196617 s plane;
#P newex 1176 392 47 196617 s sketch;
#P newex 1131 368 30 196617 t b b;
#P hidden message 1168 140 48 196617 loadbang;
#N thispatcher;
#Q end;
#P hidden newobj 1140 265 61 196617 thispatcher;
#P newex 1037 326 46 196617 metro 5;
#P newex 1037 272 27 196617 1;
#P newex 1037 248 48 196617 loadbang;
#N vpatcher 100 100 1380 952;
#P origin 96 -9;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 1165 425 41 196617 r plane;
#P newex 1183 399 47 196617 r sketch;
#P window setfont "Sans Serif" 18.;
#P comment 254 89 235 196626 Some Random Videoplane;
#N comlet Mouse Info In;
#P inlet 747 104 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 1045 292 27 196617 5.;
#P newex 1045 268 48 196617 loadbang;
#P message 1011 386 79 196617 drawto window;
#P message 896 386 112 196617 glclearcolor 1. 1. 1. 1.;
#P message 781 387 112 196617 glclearcolor 0. 0. 0. 0.;
#P comment 762 219 28 196617 x , y;
#P number 911 197 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 893 197 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 875 197 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 857 197 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 839 197 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 821 197 16 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 784 197 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 747 197 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 747 171 166 196617 unpack 0 0 0 0 0 0 0 0;
#P newex 747 145 110 196617 route mouse mouseidle;
#P comment 831 219 169 196617 button , cmd , shift , caps , opt
, ctrl;
#P flonum 825 276 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 786 276 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 747 300 66 196617 pack 0. 0. 0.;
#P flonum 747 276 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 18.;
#P message 898 319 61 196626 reset;
#P window setfont "Sans Serif" 9.;
#P message 1045 342 69 196617 line_width $1;
#P flonum 1045 319 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 970 342 69 196617 point_size $1;
#P flonum 970 319 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 747 327 80 196617 lineto $1 $2 $3;
#P newex 747 434 278 196617 jit.gl.sketch window @glclearcolor 1. 1.
1. 1. @automatic 0;
#B color 5;
#P newex 879 244 92 196617 scale 0 720 1. -1.;
#P newex 747 243 116 196617 scale 0 960 -1.33 1.33;
#P newex 98 342 48 196617 loadbang;
#P newex 563 226 27 196617 0.5;
#P newex 563 203 48 196617 loadbang;
#P newex 175 264 27 196617 1;
#P newex 175 242 48 196617 loadbang;
#P newex 563 287 47 196617 * 1.333;
#P flonum 563 250 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 382 465 266 196617 jit.gl.videoplane window @colormode uyvy
@automatic 0;
#P message 98 365 72 196617 read fucksake;
#P toggle 175 289 15 0;
#P newex 175 309 51 196617 qmetro 5;
#P flonum 261 343 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 261 364 42 196617 rate $1;
#P message 230 365 28 196617 read;
#P newex 175 400 200 196617 jit.qt.movie 1440 1080 @colormode uyvy;
#B color 5;
#P newex 563 346 40 196617 t i i i;
#P newex 563 324 27 196617 1;
#P flonum 637 373 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 600 373 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 563 373 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 526 400 121 196617 pak scale 1. 1. 1.;
#P flonum 491 373 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 454 373 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 417 373 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 380 400 121 196617 pak position 0. 0. 0.;
#P window setfont "Sans Serif" 18.;
#P comment 948 75 144 196626 Allow Drawing;
#P user panel 746 70 393 408;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 71 60 629 454;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 27 0 19 0;
#P connect 23 0 24 0;
#P connect 24 0 18 0;
#P connect 18 0 17 0;
#P fasten 15 0 13 0 266 391 180 391;
#P fasten 14 0 13 0 235 391 180 391;
#P fasten 19 0 13 0 103 391 180 391;
#P connect 17 0 13 0;
#P connect 16 0 15 0;
#P connect 61 0 20 0;
#P fasten 13 0 20 0 180 430 387 430;
#P connect 3 0 20 0;
#P fasten 7 0 20 0 531 430 387 430;
#P connect 4 0 3 1;
#P fasten 5 0 3 2 459 395 459 395;
#P fasten 6 0 3 3 496 395 496 395;
#P connect 25 0 26 0;
#P connect 26 0 21 0;
#P connect 21 0 22 0;
#P connect 11 0 12 0;
#P connect 12 0 8 0;
#P connect 22 0 8 0;
#P connect 8 0 7 1;
#P fasten 12 1 9 0 583 368 605 368;
#P fasten 21 0 9 0 568 275 605 275;
#P fasten 9 0 7 2 605 394 605 394;
#P fasten 12 2 10 0 598 368 642 368;
#P fasten 10 0 7 3 642 394 642 394;
#P connect 58 0 42 0;
#P connect 42 0 43 0;
#P fasten 42 1 43 0 802 166 752 166;
#P connect 43 0 44 0;
#P connect 44 0 28 0;
#P connect 28 0 37 0;
#P connect 37 0 38 0;
#P connect 38 0 31 0;
#P connect 60 0 30 0;
#P fasten 55 0 30 0 1016 416 752 416;
#P fasten 54 0 30 0 901 416 752 416;
#P fasten 53 0 30 0 786 416 752 416;
#P hidden fasten 31 0 30 0 752 429 752 429;
#P fasten 35 0 30 0 1050 373 752 373;
#P fasten 33 0 30 0 975 416 752 416;
#P fasten 36 0 30 0 903 373 752 373;
#P fasten 39 0 38 1 791 295 780 295;
#P fasten 43 1 45 0 774 192 789 192;
#P fasten 29 0 39 0 884 268 791 268;
#P fasten 40 0 38 2 830 295 808 295;
#P fasten 43 2 46 0 796 192 826 192;
#P fasten 43 3 47 0 818 192 844 192;
#P fasten 43 4 48 0 840 192 862 192;
#P fasten 43 5 49 0 862 192 880 192;
#P fasten 45 0 29 0 789 236 884 236;
#P fasten 43 6 50 0 884 192 898 192;
#P fasten 43 7 51 0 906 192 916 192;
#P connect 32 0 33 0;
#P connect 56 0 57 0;
#P connect 57 0 34 0;
#P connect 34 0 35 0;
#P pop 1;
#P newobj 1028 90 85 196617 p OpenGL Visuals;
#P hidden newex 1029 113 48 196617 loadbang;
#P window linecount 8;
#P hidden message 1029 133 125 196617 bang ; max setslop 1 ; max
setsleep 1 ; max setpollthrottle 10 ; max setqueuethrottle 10 ;
max seteventinterval 2 ; max refreshrate 5 ; max enablerefresh 1 ;;
#P window setfont "Fixedwidth Serif" 10.;
#P window linecount 1;
#P message 61 65 94 1441802 colormode uyvy;
#P user jit.pwindow 40 103 962 722 1 1 0 1 1 0;
#X name window;
#P window setfont "Sans Serif" 9.;
#P user jit.fpsgui 1080 407 60 196617 0;
#P newex 1036 350 43 196617 jit.qball;
#P toggle 1037 301 15 0;
#P newex 1036 381 55 196617 t b erase b;
#P newex 1036 444 146 196617 jit.gl.render window @ortho 2;
#P window setfont "Sans Serif" 18.;
#P window linecount 2;
#P comment 159 22 895 196626 Try dragging with left button. The line
drawn goes behind the videoplane. I want it to go in front of the
videoplane , and the background to be transparent to allow us to see
the videoplane.;
#P connect 16 0 17 0;
#P connect 16 1 18 0;
#P connect 2 0 1 0;
#P connect 2 0 16 0;
#P connect 2 2 5 0;
#P connect 15 0 14 0;
#P connect 3 0 13 0;
#P connect 12 0 3 0;
#P connect 11 0 12 0;
#P fasten 2 1 1 0 1063 409 1041 409;
#P connect 4 0 2 0;
#P connect 13 0 4 0;
#P hidden connect 9 0 8 0;
#P fasten 6 1 10 0 1205 810 1205 74 1033 74;
#P fasten 7 0 6 0 66 83 46 83;
#P window clipboard copycount 19;


June 11, 2007 | 5:33 pm

Thats great. Thanks for that.

Can I ask if you know where @automatic is defined in the documentation as I had never heard off it before and I can’t seem to see it recorded anywhere. It may be useful to know for further use.

Cheers

Andy


June 11, 2007 | 5:40 pm

In this File:
Apps/MaxMSP 4.6/patches/JitterReference/group-GL.html

wes


June 11, 2007 | 5:42 pm

Ah. Thats helpful.

Many Thanks

Andy


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