Hi James

In addition to what Michael wrote:

- If you're adding a mask to a movie, unless you can add alpha to the movie file (i'm not aware of a format that supports it, but perhaps there is one) the best way to add a mask is to have a separate mask image. I usually make it so black = transparent, white = opaque (greys will fall inbetween, so you can have semi-transparent areas, essential for anti-aliasing the mask). In the filter, you sample the movie, sample say the red channel of the mask image as a float (use something like "float mask = sample(maskimage, samplerCoord(maskimage)).r;"). Then just multiply the two and return the result ("return image * mask;"). If you do that in an CI Filter, beware of premultiplication. I wrote a bit about premultiplication issues and how to avoid them on my demoscene site here: http://psonice.untergrund.net/tutorials.html (scroll down a bit until you see "Premultiply your alpha!".

- You can't access the image data directly in javascript. It's great for handling groups of images and such, but there's no pixel access. It would be slow anyway if you could.

Chris


On 16 Dec 2008, at 05:51, James Sheridan wrote:

Hi All,

Sorry for the dual posting (due to messing up thread and posting a composition with custom plug-in - fixed now)

Is it possible with a shader or otherwise to stop a border/frame that is all the same color (as in the attached composition) from rendering. Ie can I use a shader to say don't render (or set alpha to 0) any pixels of color X?

Are there any movie types that support transparency? or can I use javascript to mess with a picture (read pixel color values and set alpha)

I'd like to put a frame around a movie so it doesn't have the square edges but am running into trouble when they move over each other and I can see the masking frame occluding the other movie

Cheers for any help, much appreciated - James
<frame_test.qtz> _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected] )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/psonice%40gmail.com

This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to