Removing white premultiplication?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  06 June 2007
Removing white premultiplication?

How can i remove the white border from an image that is premultiplied on white? After Effects allows to select a color when using premultiplied images, thus removing white border effects on images that were rendererd on white. How can i replicate that using shake?

thanks in advance
  06 June 2007
Not the nicest of things to work with, but easily fixable...

Create a white solid using a Color node (white colour, but 0 in the alpha)

Create an Outside node. Plug the white colour into the first input, and your image (with alpha) into the second input.

Then create an ISub node - plug your image (on white) into the first input, and the result of the Outside node into the second.

Your result will be your image on black.

If you don't believe me that this will work, here's a faked-up example:

Color1 = Color(500, 500, 1, 1, red, red, 0, 0);
ColorWheel1 = ColorWheel(500, 500, 1, 0, 1, 1, 1);
Blur52 = Blur(ColorWheel1, 90, xPixels/GetDefaultAspect(), 0,
"gauss", xFilter, "rgba");
Over10 = Over(Blur52, Color1, 1, 0, 0);
Outside19 = Outside(Color1, Over10, 1);
ISub5 = ISub(Over10, Outside19, 1, 100);

In this, the result of the Over is effectively what you've got to begin with.
Hugh Macdonald
  06 June 2007
Thank you, Hugh!! Solved my problem
  06 June 2007
also there is an aepremult macro on highend3d that fixes any AE images that are premultipled by anything other then black. Though it probably does the same thing that Hugh's script does.
  06 June 2007
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:33 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.