[GEM-dev] loop-y question

guenter geiger geiger at xdv.org
Mon Jul 28 20:22:34 CEST 2003


On Mon, 28 Jul 2003, tigital wrote:
> On Monday, July 28, 2003, at 02:16  AM, Daniel Heckenberg wrote:
> > I'm not at a machine with GEM installed at the moment so I haven't
> > checked
> > the patch you sent... but I think I understand what you're trying to
> > do.
> >
> > I've done similar things by using [counter] and the bang to trigger
> > mode of
> > [gemhead].  It's a bit ugly, but things look like this:
> >
> > [gemhead]
> >   |
> > [render_trigger]
> >   |
> > [counter 1 30]
> >   |
> > [t b f]
> >  |   |
> >  |   +------+
> >  |          |
> > [gemhead]   |
> >  |          |
> >  |          |
> > [translateXYZ]
> >  |
> > [rectangle]
> >
> > This ensures that the render chain is triggered at the appropriate time
> > (during the GEM render cycle) and does the necessary looping.  I've
> > left out
> > the 0 and 1 to enable and disable the lower gemhead from triggering at
> > its
> > normal time in the render order.
>

You have to use "until", the counter will only trigger once each cycle
(I have attached an example).
But a cool idea ... actually I doubt we need something additional.
The only "drawback" is that the first object will be rendered twice,
because if you turn off the gemhead it won't render anything, not even
with a bang. But this could be easily fixed.

Guenter


> ...hmmm, I don't think I'm getting this hooked up correctly:  at best,
> I simply get a kind of animation of a rectangle moving in the x
> direction...do you think you could send a patch?  Here's a simplistic
> sketch of what I'm trying to do:
>
> cube		cube		cube
> cube		cube		cube
> cube		cube		cube
>
> ...so we basically have a "rectangle" made out of "cubes", and have the
> ability to change the properties of individual cubes, at least through
> some kind of general function (say, apply a sin() to the size of the
> cubes)...
>
> > This would be nice if wrapped up in a [gemloop] object as you've been
> > discussing.  I think that a counter style outlet is probably more
> > useful.
> >
> > I've also been wondering if it would be good to have another gemhead
> > which
> > takes in a list of values of length n.  It would then render n times,
> > passing out a value each time before it triggers the render.  Actually,
> > you'd probably do it so that you could send sublists of length greater
> > than
> > one out at a time... and allow the possibility of using a table/array
> > as the
> > list source.   This would allow nice "asynchronous" multiple iteration
> > rendering in GEM...
>
> ...this sounds good too:  time to hit the debugger ;-)
>
> jamie
>
>
> _______________________________________________
> GEM-dev mailing list
> GEM-dev at iem.at
> http://iem.at/cgi-bin/mailman/listinfo/gem-dev
>
-------------- next part --------------
#N canvas 0 0 321 349 10;
#X obj 23 96 gemwin;
#X msg 33 29 create;
#X msg 26 44 destroy;
#X obj 129 32 gemhead;
#X obj 127 201 gemhead;
#X obj 129 56 render_trigger;
#X obj 127 182 t b f;
#X obj 127 268 translateXYZ;
#X obj 127 288 square 0.2;
#X obj 84 54 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 168 97 until;
#X obj 127 132 f;
#X obj 170 123 + 1;
#X obj 203 76 sel 0;
#X obj 169 144 mod 4;
#X obj 127 249 rotateXYZ;
#X floatatom 176 225 5 0 0 0 - - -;
#X msg 168 77 4;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 5 0;
#X connect 4 0 15 0;
#X connect 5 1 17 0;
#X connect 6 0 4 0;
#X connect 6 1 7 1;
#X connect 7 0 8 0;
#X connect 9 0 0 0;
#X connect 10 0 11 0;
#X connect 11 0 12 0;
#X connect 11 0 6 0;
#X connect 12 0 14 0;
#X connect 13 0 10 1;
#X connect 14 0 11 1;
#X connect 14 0 13 0;
#X connect 15 0 7 0;
#X connect 16 0 15 3;
#X connect 17 0 10 0;


More information about the GEM-dev mailing list