Perfect! Thanks for that!

I'm not sure what you mean about editing it to have an alpha channel, do you
mean doing the key somewhere like photoshop or can that be done with quartz
composer? I was trying to blend the image with a mask and I tried converting
to monochrome, then using the mask to alpha. But I got lost and wasn't sure
what should go where.

In any case, this is exactly what I was wanting to do.

tsd

On Tue, Sep 23, 2008 at 5:23 PM, Christopher Wright <[EMAIL PROTECTED]>wrote:

> So I need an alpha channel. My question is, how exactly do I convert the
>> black areas of the picture to an alpha of 0? What should the blending mode
>> be? Is it better to use a sprite than a billboard?
>>
>
>
> If it's a static image, you'd be best off editing it to have an alpha
> channel, and then setting the alpha appropriately.  That's beyond the scope
> of this reply, of course :)
>
> Next best, you're gonna have to filter the image -- you want blend mode to
> be Over (so that alpha is honoured), and you need to generate the alpha
> data.
>
> To generate the alpha data, you'll want to whip up a core image filter,
> like this:
>
> kernel vec4 darkToTransparent(sampler image)
> {
>        vec4 color = sample(image, samplerCoord(image));
>        color.a = (color.r+color.g+color.b) > 0.005 ? 1.0:0.;
>        return color;
> }
>
> the 0.005 is the cutoff -- depending on your hardware, image, and color
> depth, you may need to set this higher to properly cut out the black parts.
>
> Hope that helps -- there's probably a better way out there, but this should
> get you started at least.
>
> --
> [ christopher wright ]
> [EMAIL PROTECTED]
> http://kineme.net/
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
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