[PD] Possible to mask a rectangle with a rectangle using GEM?

Jack jack at rybn.org
Sat Jun 12 01:23:22 CEST 2010


Hello,

You have several possibilities to do what you are looking for :
- use (as Patrick describe) two rectangles to create a mask (with
[gemframebuffer], [pix_snap] and [pix_buffer], [pix_buffer_read],
[pix_buffer_write]) then [pix_mask] or [pix_multiply];
- use four [rectangle]s to build 'lines' of the rectangle;
- use GLSL to create the mask and the final image.
Surely, there are other ways (like openGL objects with GEM for
example)...
See in help > browser > examples > GEM (in Pd-extended) to understand
what this objects do.
Hope that helps somewhat.
++

Jack




Le vendredi 11 juin 2010 à 10:03 -0700, Ryan Trigg a écrit :
> Patrice,
> 
> 
> Thanks for your reply, sounds like interesting options (especially the
> snapping two rectangles together)...could you be more specific with
> instructions on what objects to use?  Pardon my novice GEM skills.
> 
> 
> Merci! 
> 
> 
> Ryan
> 
> On Fri, Jun 11, 2010 at 9:49 AM, patko <colet.patrice at free.fr> wrote:
>         hello,
>          you can put an image texture with a rectangle made of alpha
>         pixels,
>          or draw an alpha rectangle using  gridflow and then load it
>         as a texture
>         with #to_pix,
>          or snap two rectangles with different colors,
>          and turn to alpha all pixels matching the inner rectangle.
>         
>         Patrice Colet - 06 32 66 03 57
>         
>         ----- "Ryan Trigg" <ryan.trigg at gmail.com> a écrit : 
>         
>         
>         > I am trying to mask [rectangle] using GEM with another
>         smaller
>         > [rectangle] (that controls the first rectangle's alpha value
>         wherever
>         > it is placed) in order to create an adjustable rectangle
>         outline (that
>         > has a border of my desired thickness). I noticed that you
>         can choose
>         > [draw line( and [width $1( for a rectangle but the maximum
>         thickness
>         > of the line is much too small. Does anyone have any thoughts
>         or ideas?
>         >
>         >
>         > Or maybe there's an object like [disk] (using 4 segments)
>         but with the
>         > ability to adjust the height and width just like [rectangle]
>         >
>         >
>         >
>         > Cheers!
>         >
>         >
>         > Ryan
>         
>         > _______________________________________________
>         > Pd-list at iem.at mailing list
>         > UNSUBSCRIBE and account-management ->
>         > http://lists.puredata.info/listinfo/pd-list 
> 
> 
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list






More information about the Pd-list mailing list