[PD] GEM - alpha blending of images over movies

Item State itemstatechanged at yahoo.de
Fri Feb 16 20:19:08 CET 2007


hi,

i'm on osx 10.4 intel with pd-0.39.2-extended-test7,
gem says "GEM: ver: 0.91-cvs", "GEM: compiled: Jan  5
2007".

the wrong colours appear equally when using TIFF
images. to which object should i send the colorspace
message? if i put it into [pix_movie], i get:

"error: pix_movieDarwin: no method for 'colorspace'".


interestingly, if i remove all the [pix_texture]
objects and use [pix_draw] instead, the colours are
displayed correctly (only i'm worried since the help
says pix_draw is very slow compared to pix_texture,
and i need to draw lots of CPU for audio later on).

also, if i use [pix_draw] instead of [pix_texture], i
am able to use [pix_mix] (doesn't work with
pix_texture?), so i can crossfade to a totally
transparent picture, which does almost the fade-in/out
i want. however, the pixel mixing is strange: the
image becomes white before it's faded out. that is,
pix_mix seems to to be assuming something like "alpha
premultiplied", like stolidly multiplying each channel
separately and not using alpha information for R/G/B
multiplication:

http://sciss.de/test/Bild%203.png
(you see the background of the text in the second
screen from the left has gotten white instead of
staying black ; this is the patch "gemTest2G.pd",
using this transparent image :
http://sciss.de/test/transp.png)

last not least, the images appear 180 degrees rotated
when using pix_draw instead of pix_texture (see also
Bild 3.png)

ciao, -sciss-



--- chris clepper <cgclepper at gmail.com> wrote:

> What OS and GEM version?
> 
> On OSX the pix_film/movie object defaults to YUV. 
> Send a 'colorspace RGBA'
> message to the object before loading the clip if you
> need the alpha from the
> clip.  pix_image uses RGBA by default.  If you have
> problems with PNG the
> try uncompressed or TIFF.
> 
> Also, put the alpha object after the pix_objects.
> 
> On 2/16/07, Item State <itemstatechanged at yahoo.de>
> wrote:
> >
> > hi,
> >
> > i'm trying to port a former jitter patch to pd/gem
> >
>
(http://lists.puredata.info/pipermail/pd-list/2006-11/043853.html).
> > i have problems getting overlayed images to
> display
> > properly. i have four rectangles fed by pix_movie,
> > then i need to fade in and out a rendered text
> image.
> > i tried using pix_image -> pix_texture and [alpha
> 1].
> > the images are .png with transparent portions. i
> once
> > got it to display correctly, but now if i open the
> > patch, the videos all show up with wrong colours:
> >
> > http://sciss.de/test/Bild%201.png
> > (see attached patch gemTest2.pd)
> >
> > once i remove the pix_image and pix_texture, save
> the
> > patch and re-open it, the videos show up correctly
> > again:
> >
> > http://sciss.de/test/Bild%205.png
> > (see attached patch gemTest2B.pd)
> >
> > ... also, i don't know how to fade in the text
> (the
> > "action" string). is there an alpha-channel
> multiplier
> > for pix_image? thanks for hints!
> >
> > is it possible to stretch the video so that the
> > rectangle stays the same, but only the top part of
> the
> > video is shown (vertically zoomed without
> > interpolation, so that you can see the pixels)?
> >
> > ciao, -sciss-
> >
> >
> >
> > Send instant messages to your online friends
> http://au.messenger.yahoo.com
> > _______________________________________________
> > PD-list at iem.at mailing list
> > UNSUBSCRIBE and account-management ->
> > http://lists.puredata.info/listinfo/pd-list
> >
> >
> >
> 


Send instant messages to your online friends http://au.messenger.yahoo.com 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gemTest2F.pd
Type: application/octet-stream
Size: 5339 bytes
Desc: 1097526413-gemTest2F.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070217/8f2997cd/attachment.obj>


More information about the Pd-list mailing list