Jump to content
kgoossens

VOP COP alpha gets altered??

Recommended Posts

Hi Everybody,

I'm trying to create a contrastLum (ala shake). For that I've created a vopcop but the problem is that the alpha gets altered.

I have no idea why this happens. I have not touched (as far as i know) the alpha channel.

A screen grab is attached.

Cheers.

post-1245-125646622275_thumb.png

Share this post


Link to post
Share on other sites

Hi Everybody,

I'm trying to create a contrastLum (ala shake). For that I've created a vopcop but the problem is that the alpha gets altered.

I have no idea why this happens. I have not touched (as far as i know) the alpha channel.

A screen grab is attached.

Cheers.

Would you mind attaching a HIP? The default butterfly.pic should be fine for testing.

Multiplying by A (not C4) between fit1 and floattovec2 looks like it may fix your problem.

Share this post


Link to post
Share on other sites

Would you mind attaching a HIP? The default butterfly.pic should be fine for testing.

Multiplying by A (not C4) between fit1 and floattovec2 looks like it may fix your problem.

Hi Alan,

Thanks! I've attached the file. I have no idea what i'm doing wrong with it.

Cheers

contrastLum.hipnc

post-1245-12572465636_thumb.png

Share this post


Link to post
Share on other sites

Hi Alan,

Thanks! I've attached the file. I have no idea what i'm doing wrong with it.

Cheers

Hey, I've re-attached your file.

I modified it so the saturation effect is premultiplied against your alpha channel.

contrastLum.hipnc

Share this post


Link to post
Share on other sites

The reason this is overwriting alpha is because you're writing to Cr, Cg, Cb and C4. These represent the channels in the current plane being cooked. Color and Alpha are separate planes, so when Alpha is cooked, it gets assigned to Cr. On the other hand, R,G,B,A are always hardwired to the color plane and alpha for convenience.

If you'd like your effect to only work on Color, and no other planes, rewire your output from Cr,Cg,Cb to R,G,B. If you'd like it to operate on color and other deep raster planes, but not alpha, you'll have to compare the plane name (global input pname) to "A" and avoid the operation in that case.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×