Forums > Jitter

full screen jit.gl.text2d when capturing with jit.gl.texture / slab

September 28, 2006 | 2:44 am

Hi there,

I have been working with Andrew Benson’s SceneProcess recipe
(21.SceneProcess.mxt). When playing with the original patch (an
animated nurbs surface), full-screen mode seems to scale quite
nicely. When I replaced the nurbs with a jit.gl.text2d object, the
full-screen mode does not scale the gl-text correctly. It basically
moves the text up into the upper left-hand corner and becomes
pixelated. It seems that the center [0. 0.] does not scale to the
full-screen setup correctly. When I set a new position (using the
jit.gl.text2d ‘position’ message) I can get it to re-center in full-
screen mode, but it is still pixelated.

Any ideas? Ultimately, I want to process jit.gl.text2d with various
jit.gl.slab effects.

I am using Max/MSP/Jitter 4.6.2 on a Dual G5 running OS X 10.4.7.

Thanks,

Christopher P Baker
Graduate Researcher; Time and Interactivity
Department of Art, University of Minnesota

http://www.base8.org

max v2;
#N vpatcher 194 458 1334 863;
#P origin -76 0;
#P setbglock 1;
#P window setfont "Sans Serif" 9.;
#P flonum 359 166 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 311 167 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 269 196 87 196617 pak position 0. 0.;
#P newex 152 173 55 196617 delay 500;
#P message 152 195 99 196617 text fading , size 50;
#P newex 152 151 32 196617 sel 1;
#P window linecount 2;
#P newex 129 228 284 196617 jit.gl.text2d cracks @blend_enable 1
@position 0. 0. 0. @align 1 @capture super @automatic 0 @rotate 20.
60. 0. 0.;
#B color 5;
#P window linecount 1;
#P message 301 64 68 196617 fullscreen $1;
#P toggle 284 64 15 0;
#P newex 326 39 35 196617 sel 27;
#P newex 284 39 40 196617 key;
#P window linecount 4;
#P comment 541 335 371 196617 This patch demonstrates a technique for
doing matrix-style processing on an openGL scene without reading back
to the CPU. This allows you to add a variety of processing effects to
your live OpenGL patch without encountering much loss of frame rate.
Another incentive to look at those shaders…;
#P window linecount 1;
#P comment 951 348 169 196617 andrewb@cycling74.com;
#P comment 789 279 80 196617 scale_bias filter;
#P comment 609 179 132 196617 dodge composite (feedback);
#P comment 702 233 64 196617 gaussian blur;
#P comment 601 79 201 196617 this is our render destination for the
nurbs;
#P user jit.fpsgui 34 351 60 196617 0;
#P flonum 624 113 42 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 624 133 88 196617 param amount $1;
#P message 1053 155 43 196617 $1 400;
#P newex 1053 174 40 196617 line 0.;
#P newex 1053 136 41 196617 * 0.03;
#P newex 1053 116 64 196617 random 100;
#P message 988 155 43 196617 $1 400;
#P newex 988 174 40 196617 line 0.;
#P newex 988 136 41 196617 * 0.03;
#P newex 988 116 64 196617 random 100;
#P message 923 155 43 196617 $1 400;
#P newex 923 174 40 196617 line 0.;
#P newex 923 136 41 196617 * 0.03;
#P newex 923 116 64 196617 random 100;
#P message 814 154 43 196617 $1 400;
#P newex 814 172 40 196617 line 0.;
#P newex 833 69 50 196617 qlim 500;
#P hidden newex 491 15 48 196617 loadbang;
#P hidden message 491 35 14 196617 0;
#P toggle 541 14 47 0;
#P newex 541 107 27 196617 + 1;
#P newex 541 135 38 196617 gate 2;
#P flonum 1005 210 38 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 966 210 38 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 923 210 42 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 922 231 135 196617 pak param scale 1. 1. 1.;
#P newex 569 260 300 196617 jit.gl.slab cracks @file cc.scalebias.jxs
@dim 320 240 @adapt 0;
#P newex 569 160 171 196617 jit.gl.slab cracks @file co.dodge.jxs;
#P newex 814 94 29 196617 gate;
#P newex 814 135 103 196617 expr $i1*0.02-0.01;
#P newex 814 115 64 196617 random 200;
#P message 813 195 81 196617 param width $1;
#P newex 569 288 203 196617 jit.gl.videoplane cracks @scale 1.333 1. 1.;
#P newex 569 214 197 196617 jit.gl.slab cracks @file cf.gaussian.2p.jxs;
#P newex 569 92 233 196617 jit.gl.texture cracks @name super @dim 640
480;
#P newex 34 45 74 196617 t erase b b b b;
#P newex 34 330 229 196617 jit.gl.render cracks @erase_color 0.2 0.1
0.1 1.;
#P newex 86 25 162 196617 jit.window cracks @size 640 480;
#P toggle 4 25 29 0;
#P newex 34 25 51 196617 qmetro 5;
#P window linecount 3;
#P comment 589 19 57 196617 turn on/off slab processing;
#P window setfont "Sans Serif" 24.;
#P window linecount 1;
#P comment 950 320 169 196632 SceneProcess;
#P user panel 0 0 538 389;
#X brgb 150 218 112;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P user panel 537 0 587 389;
#X brgb 255 250 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P hidden connect 5 0 4 0;
#P connect 4 0 8 0;
#P fasten 8 1 7 0 55 196 39 196;
#P connect 8 0 7 0;
#P connect 7 0 44 0;
#P connect 54 0 6 0;
#P connect 59 0 55 0;
#P connect 8 2 55 0;
#P connect 57 0 55 0;
#P connect 5 0 56 0;
#P connect 56 0 58 0;
#P connect 58 0 57 0;
#P fasten 52 0 53 0 331 61 289 61;
#P fasten 53 0 54 0 300 79 300 64;
#P connect 60 0 59 1;
#P fasten 51 0 52 0 325 56 325 41;
#P connect 61 0 59 2;
#P hidden connect 26 0 25 0;
#P connect 24 0 23 0;
#P hidden fasten 25 0 23 0 496 104 546 104;
#P connect 23 0 22 0;
#P fasten 8 3 9 0 87 81 574 81;
#P connect 9 0 22 1;
#P fasten 42 0 16 0 629 155 574 155;
#P connect 22 1 16 0;
#P connect 16 0 10 0;
#P fasten 12 0 10 0 818 210 574 210;
#P fasten 18 0 17 0 927 255 574 255;
#P connect 10 0 17 0;
#P connect 17 0 11 0;
#P fasten 22 0 11 0 546 281 574 281;
#P connect 43 0 42 0;
#P fasten 17 0 16 1 574 281 561 281 561 155 735 155;
#P connect 28 0 12 0;
#P fasten 24 0 15 0 546 65 819 65;
#P connect 15 0 13 0;
#P connect 13 0 14 0;
#P connect 14 0 29 0;
#P connect 29 0 28 0;
#P hidden fasten 8 4 27 0 103 65 838 65;
#P connect 27 0 15 1;
#P fasten 15 0 30 0 819 112 928 112;
#P connect 30 0 31 0;
#P connect 31 0 33 0;
#P connect 33 0 32 0;
#P connect 32 0 19 0;
#P connect 36 0 20 0;
#P fasten 19 0 18 2 928 227 989 227;
#P fasten 15 0 34 0 822 112 993 112;
#P connect 34 0 35 0;
#P connect 35 0 37 0;
#P connect 37 0 36 0;
#P connect 40 0 21 0;
#P fasten 20 0 18 3 971 227 1020 227;
#P fasten 21 0 18 4 1010 227 1051 227;
#P fasten 15 0 38 0 820 112 1058 112;
#P connect 38 0 39 0;
#P connect 39 0 41 0;
#P connect 41 0 40 0;
#P pop;


September 28, 2006 | 2:26 pm

Set your screenmode attribute to 0, and the interp attribute to 1.

M

On Sep 27, 2006, at 22:44, Christopher P. Baker wrote:

> Hi there,
>
> I have been working with Andrew Benson’s SceneProcess recipe
> (21.SceneProcess.mxt). When playing with the original patch (an
> animated nurbs surface), full-screen mode seems to scale quite
> nicely. When I replaced the nurbs with a jit.gl.text2d object, the
> full-screen mode does not scale the gl-text correctly. It
> basically moves the text up into the upper left-hand corner and
> becomes pixelated. It seems that the center [0. 0.] does not scale
> to the full-screen setup correctly. When I set a new position
> (using the jit.gl.text2d ‘position’ message) I can get it to re-
> center in full-screen mode, but it is still pixelated.
>
> Any ideas? Ultimately, I want to process jit.gl.text2d with
> various jit.gl.slab effects.
>
> I am using Max/MSP/Jitter 4.6.2 on a Dual G5 running OS X 10.4.7.
>
> Thanks,
>
> Christopher P Baker
> Graduate Researcher; Time and Interactivity
> Department of Art, University of Minnesota
> http://www.base8.org
>
>
>
> <21.SceneProcess-withText.mxt>
>
>
>
> max v2;
> #N vpatcher 194 458 1334 863;
> #P origin -76 0;
> #P setbglock 1;
> #P window setfont "Sans Serif" 9.;
> #P flonum 359 166 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 311 167 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P newex 269 196 87 196617 pak position 0. 0.;
> #P newex 152 173 55 196617 delay 500;
> #P message 152 195 99 196617 text fading , size 50;
> #P newex 152 151 32 196617 sel 1;
> #P window linecount 2;
> #P newex 129 228 284 196617 jit.gl.text2d cracks @blend_enable 1
> @position 0. 0. 0. @align 1 @capture super @automatic 0 @rotate 20.
> 60. 0. 0.;
> #B color 5;
> #P window linecount 1;
> #P message 301 64 68 196617 fullscreen $1;
> #P toggle 284 64 15 0;
> #P newex 326 39 35 196617 sel 27;
> #P newex 284 39 40 196617 key;
> #P window linecount 4;
> #P comment 541 335 371 196617 This patch demonstrates a technique
> for doing matrix-style processing on an openGL scene without
> reading back to the CPU. This allows you to add a variety of
> processing effects to your live OpenGL patch without encountering
> much loss of frame rate. Another incentive to look at those
> shaders…;
> #P window linecount 1;
> #P comment 951 348 169 196617 andrewb@cycling74.com;
> #P comment 789 279 80 196617 scale_bias filter;
> #P comment 609 179 132 196617 dodge composite (feedback);
> #P comment 702 233 64 196617 gaussian blur;
> #P comment 601 79 201 196617 this is our render destination for the
> nurbs;
> #P user jit.fpsgui 34 351 60 196617 0;
> #P flonum 624 113 42 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 624 133 88 196617 param amount $1;
> #P message 1053 155 43 196617 $1 400;
> #P newex 1053 174 40 196617 line 0.;
> #P newex 1053 136 41 196617 * 0.03;
> #P newex 1053 116 64 196617 random 100;
> #P message 988 155 43 196617 $1 400;
> #P newex 988 174 40 196617 line 0.;
> #P newex 988 136 41 196617 * 0.03;
> #P newex 988 116 64 196617 random 100;
> #P message 923 155 43 196617 $1 400;
> #P newex 923 174 40 196617 line 0.;
> #P newex 923 136 41 196617 * 0.03;
> #P newex 923 116 64 196617 random 100;
> #P message 814 154 43 196617 $1 400;
> #P newex 814 172 40 196617 line 0.;
> #P newex 833 69 50 196617 qlim 500;
> #P hidden newex 491 15 48 196617 loadbang;
> #P hidden message 491 35 14 196617 0;
> #P toggle 541 14 47 0;
> #P newex 541 107 27 196617 + 1;
> #P newex 541 135 38 196617 gate 2;
> #P flonum 1005 210 38 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 966 210 38 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 923 210 42 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 922 231 135 196617 pak param scale 1. 1. 1.;
> #P newex 569 260 300 196617 jit.gl.slab cracks @file
> cc.scalebias.jxs @dim 320 240 @adapt 0;
> #P newex 569 160 171 196617 jit.gl.slab cracks @file co.dodge.jxs;
> #P newex 814 94 29 196617 gate;
> #P newex 814 135 103 196617 expr $i1*0.02-0.01;
> #P newex 814 115 64 196617 random 200;
> #P message 813 195 81 196617 param width $1;
> #P newex 569 288 203 196617 jit.gl.videoplane cracks @scale 1.333
> 1. 1.;
> #P newex 569 214 197 196617 jit.gl.slab cracks @file cf.gaussian.
> 2p.jxs;
> #P newex 569 92 233 196617 jit.gl.texture cracks @name super @dim
> 640 480;
> #P newex 34 45 74 196617 t erase b b b b;
> #P newex 34 330 229 196617 jit.gl.render cracks @erase_color 0.2
> 0.1 0.1 1.;
> #P newex 86 25 162 196617 jit.window cracks @size 640 480;
> #P toggle 4 25 29 0;
> #P newex 34 25 51 196617 qmetro 5;
> #P window linecount 3;
> #P comment 589 19 57 196617 turn on/off slab processing;
> #P window setfont "Sans Serif" 24.;
> #P window linecount 1;
> #P comment 950 320 169 196632 SceneProcess;
> #P user panel 0 0 538 389;
> #X brgb 150 218 112;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P background;
> #P user panel 537 0 587 389;
> #X brgb 255 250 224;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P background;
> #P hidden connect 5 0 4 0;
> #P connect 4 0 8 0;
> #P fasten 8 1 7 0 55 196 39 196;
> #P connect 8 0 7 0;
> #P connect 7 0 44 0;
> #P connect 54 0 6 0;
> #P connect 59 0 55 0;
> #P connect 8 2 55 0;
> #P connect 57 0 55 0;
> #P connect 5 0 56 0;
> #P connect 56 0 58 0;
> #P connect 58 0 57 0;
> #P fasten 52 0 53 0 331 61 289 61;
> #P fasten 53 0 54 0 300 79 300 64;
> #P connect 60 0 59 1;
> #P fasten 51 0 52 0 325 56 325 41;
> #P connect 61 0 59 2;
> #P hidden connect 26 0 25 0;
> #P connect 24 0 23 0;
> #P hidden fasten 25 0 23 0 496 104 546 104;
> #P connect 23 0 22 0;
> #P fasten 8 3 9 0 87 81 574 81;
> #P connect 9 0 22 1;
> #P fasten 42 0 16 0 629 155 574 155;
> #P connect 22 1 16 0;
> #P connect 16 0 10 0;
> #P fasten 12 0 10 0 818 210 574 210;
> #P fasten 18 0 17 0 927 255 574 255;
> #P connect 10 0 17 0;
> #P connect 17 0 11 0;
> #P fasten 22 0 11 0 546 281 574 281;
> #P connect 43 0 42 0;
> #P fasten 17 0 16 1 574 281 561 281 561 155 735 155;
> #P connect 28 0 12 0;
> #P fasten 24 0 15 0 546 65 819 65;
> #P connect 15 0 13 0;
> #P connect 13 0 14 0;
> #P connect 14 0 29 0;
> #P connect 29 0 28 0;
> #P hidden fasten 8 4 27 0 103 65 838 65;
> #P connect 27 0 15 1;
> #P fasten 15 0 30 0 819 112 928 112;
> #P connect 30 0 31 0;
> #P connect 31 0 33 0;
> #P connect 33 0 32 0;
> #P connect 32 0 19 0;
> #P connect 36 0 20 0;
> #P fasten 19 0 18 2 928 227 989 227;
> #P fasten 15 0 34 0 822 112 993 112;
> #P connect 34 0 35 0;
> #P connect 35 0 37 0;
> #P connect 37 0 36 0;
> #P connect 40 0 21 0;
> #P fasten 20 0 18 3 971 227 1020 227;
> #P fasten 21 0 18 4 1010 227 1051 227;
> #P fasten 15 0 38 0 820 112 1058 112;
> #P connect 38 0 39 0;
> #P connect 39 0 41 0;
> #P connect 41 0 40 0;
> #P pop;
>


September 28, 2006 | 4:52 pm

Hi Christopher,

Thanks for the report. We’ll need to have a look at this and see if we
can fix for a future version.

Cheers,
Andrew B.


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