CGTalk > More Forums > Click Here for: > Apple Shake
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 06-04-2007, 10:41 AM   #1
StefanAlbertz
Frequenter
 
StefanAlbertz's Avatar
portfolio
Stefan Albertz
Digital Artist & Instructor
Pictorion Das Werk & Duesseldorf University of Applied Sciences
Viersen, Germany
 
Join Date: Aug 2006
Posts: 185
Send a message via ICQ to StefanAlbertz
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
stefan
 
Old 06-04-2007, 12:37 PM   #2
Hugh
Compositor
 
Hugh's Avatar
Hugh Macdonald
2D Supervisor
Nvizible
United Kingdom
 
Join Date: Nov 2002
Posts: 1,465
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
nvizible
 
Old 06-04-2007, 03:22 PM   #3
StefanAlbertz
Frequenter
 
StefanAlbertz's Avatar
portfolio
Stefan Albertz
Digital Artist & Instructor
Pictorion Das Werk & Duesseldorf University of Applied Sciences
Viersen, Germany
 
Join Date: Aug 2006
Posts: 185
Send a message via ICQ to StefanAlbertz
Thank you, Hugh!! Solved my problem
 
Old 06-06-2007, 01:08 AM   #4
beaker
Meep!
 
beaker's Avatar
CGSociety Member
portfolio
Deke Kincaid
VR Pipeline Supervisor
DD
Los Angeles, USA
 
Join Date: Apr 2002
Posts: 8,538
Send a message via ICQ to beaker Send a message via AIM to beaker Send a message via MSN to beaker Send a message via Yahoo to beaker
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.
__________________
-deke
 
Old 06-06-2007, 01:08 AM   #5
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 09:58 PM.


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