Forums > Jitter

drawto and automatic 0 don't work together?

November 7, 2006 | 3:35 pm

It seems like drawto and automatic 0 don’t work together on a jit.gl.gridshape. Steps to reproduce are in the patch.

Max 4.5.7, Jitter 1.5.2, confirmed for both Windows XP & Mac OSX

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 185 83 56 9109513 loadmess 1;
#P newex 61 51 60 9109513 loadmess 1;
#P toggle 44 51 15 0;
#P newex 44 71 57 9109513 qmetro 40;
#P newex 44 92 74 9109513 t b b rnd1 erase;
#P newex 155 123 27 9109513 !- 1;
#P message 185 123 62 9109513 automatic $1;
#P toggle 185 105 15 0;
#P newex 53 158 29 9109513 gate;
#P newex 89 158 80 9109513 prepend drawto;
#P newex 53 184 350 9109513 jit.gl.gridshape @automatic 1 @shape plane @color 0. 0. 1. @rotatexyz 0. 24. 54.;
#P newex 44 254 154 9109513 jit.window rnd1 @depthbuffer 1;
#P newex 44 231 169 9109513 jit.gl.render rnd1 @camera 0. 0. 3.;
#P newex 97 205 87 9109513 jit.gl.handle rnd1;
#P comment 202 105 302 9109513 setting automatic off (and banging ‘manually’) stops rendering.. why?;
#P connect 7 0 9 0;
#P connect 7 0 8 0;
#P connect 14 0 7 0;
#P connect 10 2 5 0;
#P connect 10 1 6 1;
#P connect 1 0 4 0;
#P fasten 8 0 4 0 190 180 58 180;
#P connect 6 0 4 0;
#P fasten 5 0 4 0 94 180 58 180;
#P fasten 9 0 6 0 160 152 58 152;
#P connect 10 0 2 0;
#P connect 10 3 2 0;
#P connect 11 0 10 0;
#P connect 12 0 11 0;
#P connect 13 0 12 0;
#P window clipboard copycount 15;

I’m curios if anyone can explain this behaviour.

Cheers,
Mattijs


November 7, 2006 | 4:03 pm

Thanks Mattijs,
When I saw the postings about this in the other thread, I noticed this
as well. I was surprised that drawto and @automatic 0 didn’t play
well together. Anyway, the workaround for right now is to not use
@automatic 0 abd use @layer instead or to have multiple instances of
your objects.

wes

On 11/7/06, Mattijs Kneppers wrote:
>
> It seems like drawto and automatic 0 don’t work together on a jit.gl.gridshape. Steps to reproduce are in the patch.
>
> Max 4.5.7, Jitter 1.5.2, confirmed for both Windows XP & Mac OSX
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 185 83 56 9109513 loadmess 1;
> #P newex 61 51 60 9109513 loadmess 1;
> #P toggle 44 51 15 0;
> #P newex 44 71 57 9109513 qmetro 40;
> #P newex 44 92 74 9109513 t b b rnd1 erase;
> #P newex 155 123 27 9109513 !- 1;
> #P message 185 123 62 9109513 automatic $1;
> #P toggle 185 105 15 0;
> #P newex 53 158 29 9109513 gate;
> #P newex 89 158 80 9109513 prepend drawto;
> #P newex 53 184 350 9109513 jit.gl.gridshape @automatic 1 @shape plane @color 0. 0. 1. @rotatexyz 0. 24. 54.;
> #P newex 44 254 154 9109513 jit.window rnd1 @depthbuffer 1;
> #P newex 44 231 169 9109513 jit.gl.render rnd1 @camera 0. 0. 3.;
> #P newex 97 205 87 9109513 jit.gl.handle rnd1;
> #P comment 202 105 302 9109513 setting automatic off (and banging ‘manually’) stops rendering.. why?;
> #P connect 7 0 9 0;
> #P connect 7 0 8 0;
> #P connect 14 0 7 0;
> #P connect 10 2 5 0;
> #P connect 10 1 6 1;
> #P connect 1 0 4 0;
> #P fasten 8 0 4 0 190 180 58 180;
> #P connect 6 0 4 0;
> #P fasten 5 0 4 0 94 180 58 180;
> #P fasten 9 0 6 0 160 152 58 152;
> #P connect 10 0 2 0;
> #P connect 10 3 2 0;
> #P connect 11 0 10 0;
> #P connect 12 0 11 0;
> #P connect 13 0 12 0;
> #P window clipboard copycount 15;
>
> I’m curios if anyone can explain this behaviour.
>
> Cheers,
> Mattijs
> –
> SmadSteck – http://www.smadsteck.nl
> Interactive audiovisual sampling soft- and hardware
>
>


November 7, 2006 | 4:49 pm

@layer ?
first time i heard of this, any example for its use out there?

On 11/7/06, Wesley Smith wrote:
>
> Thanks Mattijs,
> When I saw the postings about this in the other thread, I noticed this
> as well. I was surprised that drawto and @automatic 0 didn’t play
> well together. Anyway, the workaround for right now is to not use
> @automatic 0 abd use @layer instead or to have multiple instances of
> your objects.
>
> wes
>
> On 11/7/06, Mattijs Kneppers wrote:
> >
> > It seems like drawto and automatic 0 don’t work together on a
> jit.gl.gridshape. Steps to reproduce are in the patch.
> >
> > Max 4.5.7, Jitter 1.5.2, confirmed for both Windows XP & Mac OSX
> >
> > #P window setfont "Sans Serif" 9.;
> > #P window linecount 1;
> > #P newex 185 83 56 9109513 loadmess 1;
> > #P newex 61 51 60 9109513 loadmess 1;
> > #P toggle 44 51 15 0;
> > #P newex 44 71 57 9109513 qmetro 40;
> > #P newex 44 92 74 9109513 t b b rnd1 erase;
> > #P newex 155 123 27 9109513 !- 1;
> > #P message 185 123 62 9109513 automatic $1;
> > #P toggle 185 105 15 0;
> > #P newex 53 158 29 9109513 gate;
> > #P newex 89 158 80 9109513 prepend drawto;
> > #P newex 53 184 350 9109513 jit.gl.gridshape @automatic 1 @shape plane
> @color 0. 0. 1. @rotatexyz 0. 24. 54.;
> > #P newex 44 254 154 9109513 jit.window rnd1 @depthbuffer 1;
> > #P newex 44 231 169 9109513 jit.gl.render rnd1 @camera 0. 0. 3.;
> > #P newex 97 205 87 9109513 jit.gl.handle rnd1;
> > #P comment 202 105 302 9109513 setting automatic off (and banging
> ‘manually’) stops rendering.. why?;
> > #P connect 7 0 9 0;
> > #P connect 7 0 8 0;
> > #P connect 14 0 7 0;
> > #P connect 10 2 5 0;
> > #P connect 10 1 6 1;
> > #P connect 1 0 4 0;
> > #P fasten 8 0 4 0 190 180 58 180;
> > #P connect 6 0 4 0;
> > #P fasten 5 0 4 0 94 180 58 180;
> > #P fasten 9 0 6 0 160 152 58 152;
> > #P connect 10 0 2 0;
> > #P connect 10 3 2 0;
> > #P connect 11 0 10 0;
> > #P connect 12 0 11 0;
> > #P connect 13 0 12 0;
> > #P window clipboard copycount 15;
> >
> > I’m curios if anyone can explain this behaviour.
> >
> > Cheers,
> > Mattijs
> > –
> > SmadSteck – http://www.smadsteck.nl
> > Interactive audiovisual sampling soft- and hardware
> >
> >
>


November 7, 2006 | 5:11 pm

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 374 179 103 196617 pak 0 1 2;
#P message 374 118 52 196617 $2 $3 $1;
#P newex 466 158 43 196617 route 1;
#P newex 420 158 43 196617 route 1;
#P newex 374 158 43 196617 route 1;
#P newex 374 137 148 196617 route 0 1 2;
#P comment 380 51 36 196617 layer;
#P user matrixctrl 374 64 50 50 MatrixDefaultCell.pct
MatrixDefaultBkgnd.pct 50 50 16 16 3 3 16 16 1 1 49 2 5120 0;
#P newex 13 232 72 196617 prepend layer;
#P newex 88 232 72 196617 prepend layer;
#P newex 165 232 72 196617 prepend layer;
#P newex 60 208 67 196617 unpack 0 1 2;
#P flonum 364 350 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 364 371 42 196617 rate $1;
#P message 245 350 83 196617 read dishes.mov;
#P message 298 371 27 196617 stop;
#P message 264 371 31 196617 start;
#P flonum 207 350 35 9 0.5 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 165 350 15 0;
#P newex 165 370 52 196617 metro 30;
#P message 328 371 31 196617 clear;
#P newex 165 397 103 196617 jit.qt.movie 320 240;
#P newex 71 422 308 196617 jit.gl.videoplane layer @depth_enable 0
@blend_enable 1 @layer 2;
#P window linecount 2;
#P newex 124 306 297 196617 jit.gl.gridshape layer @shape sphere
@color 1 1 0 0.5 @lighting_enable 1 @blend_enable 1 @position 0.5 0 0
@layer 1;
#P newex 165 270 229 196617 jit.gl.gridshape layer @shape torus @color
1 0 0 1 @lighting_enable 1 @blend_enable 1 @layer 0;
#P toggle 130 62 15 0;
#P window linecount 1;
#P message 130 82 68 196617 fullscreen $1;
#N vpatcher 30 89 166 253;
#P window setfont "Sans Serif" 9.;
#P newex 50 71 35 196617 sel 27;
#P newex 50 50 40 196617 key;
#P outlet 50 93 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P pop;
#P newobj 130 42 33 196617 p Esc;
#P newex 130 100 157 196617 jit.window layer @depthbuffer 1;
#P message 91 100 34 196617 reset;
#P newex 91 121 192 196617 jit.gl.handle layer @inherit_transform 1;
#P toggle 28 81 15 0;
#P newex 28 100 57 196617 qmetro 30;
#P newex 28 121 50 196617 t b erase;
#P newex 28 146 193 196617 jit.gl.render layer @erase_color 0 0 0 1;
#P comment 336 84 36 196617 object;
#P window linecount 5;
#P comment 433 222 217 196617 @layer specifies a grouping of objects
to draw together. Objects in different layers are guaranteed to draw
in order from the lowest numbered layer to the highest numbered layer.
Within a layer , there is no guarantee of order.;
#P fasten 25 0 28 0 65 228 18 228;
#P connect 5 0 4 0;
#P connect 4 0 3 0;
#P fasten 3 0 2 0 33 142 33 142;
#P fasten 3 1 2 0 73 142 33 142;
#P fasten 6 0 2 0 96 142 33 142;
#P fasten 36 0 25 0 379 202 65 202;
#P fasten 15 0 14 0 170 418 76 418;
#P connect 28 0 14 0;
#P connect 25 1 27 0;
#P connect 7 0 6 0;
#P connect 27 0 13 0;
#P connect 9 0 11 0;
#P connect 11 0 10 0;
#P connect 10 0 8 0;
#P fasten 25 2 26 0 121 228 170 228;
#P connect 26 0 12 0;
#P connect 18 0 17 0;
#P fasten 17 0 15 0 170 395 170 395;
#P fasten 16 0 15 0 333 392 170 392;
#P fasten 20 0 15 0 269 392 170 392;
#P fasten 21 0 15 0 303 392 170 392;
#P fasten 22 0 15 0 250 392 170 392;
#P fasten 23 0 15 0 369 392 170 392;
#P connect 19 0 17 1;
#P connect 24 0 23 0;
#P connect 29 0 35 0;
#P connect 35 0 31 0;
#P connect 31 0 32 0;
#P connect 32 0 36 0;
#P connect 31 1 33 0;
#P connect 33 0 36 1;
#P connect 31 2 34 0;
#P connect 34 0 36 2;
#P window clipboard copycount 37;

wes


November 7, 2006 | 11:29 pm

@layer was introduced in jitter 1.6 I believe.
it is part of the GL group attributes. refer to the reference page
file:///Applications/MaxMSP%204.6/patches/JitterReference/group-GL.html
it determines the order in which objects are drawn.

Once I discovered it, I prefer it over @automatic 0.
Using layers is a more declarative approach to controlling rendering
order,
whereas @automatic 0 requires additional bang sequencing logic in
your patch.

in particular when I need to reorder the objects dynamically, @layer
is very practical.

-jennek

On 7-nov-2006, at 15:49, yair reshef wrote:

> @layer ?
> first time i heard of this, any example for its use out there?
>
> On 11/7/06, Wesley Smith wrote:
> Thanks Mattijs,
> When I saw the postings about this in the other thread, I noticed this
> as well. I was surprised that drawto and @automatic 0 didn’t play
> well together. Anyway, the workaround for right now is to not use
> @automatic 0 abd use @layer instead or to have multiple instances of
> your objects.
>
> wes
>
> On 11/7/06, Mattijs Kneppers wrote:
> >
> > It seems like drawto and automatic 0 don’t work together on a
> jit.gl.gridshape . Steps to reproduce are in the patch.
> >
> > Max 4.5.7, Jitter 1.5.2, confirmed for both Windows XP & Mac OSX
>


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