# Premultiplied color

 02 February 2010 ruddiger52 Expert   portfolio ....... 3d Artist Los Angeles, USA Premultiplied color How can I change the premultiplied color of some premultiplied rendered footage. In combustion this is very easy to do. I just cant find it in nuke. I need to change it from black to white. Thanks share quote
 02 February 2010 MasonDoran uhh... portfolio Mason Doran Digital Artist Freelance Wien, Austria make friends with the tab key......will bring up a hotbox where you can type Premult or unpremult Unfortunately though, Nuke assumes the color of the alpha channel for the premult. ie: black for 0, and white is 1. You will have to setup your own network if you want a different color. __________________ : my website : share quote
 02 February 2010 scrawford Frequenter Sarah Orlado, USA this thread has a workaround for you http://www.vfxtalk.com/forum/do-you...ghlight=premult share quote
 02 February 2010 ChristopherP Frequenter portfolio Dude Dude United States the actual solution (other than the workaround posted) is also in this linked thread...one really shouldn't use any other background-color than black to premultiply against when rendering c. share quote
 02 February 2010 thatoneguy Interesting User Title   portfolio Gavin Greenwalt Exec. VP of Pixel Mergers and Acquisitions Straightface Studios Seattle, USA (fg * a) + (bg * (1-a) = Comp. This is the most important equation to know in compositing. It's the equation for a standard "Over" composite. If you know it and understand it you'll be able to solve many a problem. In plain english it's: (Premultiplied Foreground) + (Background * Inverted Alpha) = Composite. In this case you've already composited your fg over your bg (white). So you have: (fg * a) + (1 * (1-a)) = comp. What you want is just the (fg*a) part so what you do is simply subtract the other term: (fg * a) + (1 * (1-a)) - (1 * (1-a)) = (fg * a) That still can look a little intimidating so written out more simply you can see it as: A + B = C but we just want A so we subtract "B" and get: A + B - B = A In this case "B" = the inverted alpha. In short. Invert the alpha and subtract it from the fg. Class Dismissed! Go make some art! P.S. Christopher's solution though is the best. Last edited by thatoneguy : 02 February 2010 at 08:08 AM. share quote
 03 March 2010 ruddiger52 Expert   portfolio ....... 3d Artist Los Angeles, USA Wow thanks for the info. I dont see a link for ChristopherP? share quote
 03 March 2010 ChristopherP Frequenter portfolio Dude Dude United States i was talking about the linked vfxtalk-thread scrawford posted...sorry for the confusion share quote
 03 March 2010 ruddiger52 Expert   portfolio ....... 3d Artist Los Angeles, USA Cool thanks for clarifying. So I understand the overall concept described in the thread, but I don't get how the following translates into anything in nuke. set cut_paste_input [stack 0] version 5.1200 push \$cut_paste_input Dot { name Dot1 selected true xpos 345 ypos -141 } set N28375e50 [stack 0] Dot { name Dot2 selected true xpos 479 ypos -141 } push \$N28375e50 push \$N28375e50 Invert { channels rgba name Invert1 selected true xpos 227 ypos -145 } Constant { inputs 0 channels rgb color {1 0 0 0} name BG_COLOR selected true xpos 168 ypos -238 } Copy { inputs 2 from0 rgba.alpha to0 rgba.alpha name Copy1 selected true xpos 168 ypos -108 } Premult { name Premult2 selected true xpos 168 ypos -69 } Merge2 { inputs 2 operation minus name Merge1 selected true xpos 311 ypos -69 } Dot { name Dot3 selected true xpos 345 ypos -6 } Copy { inputs 2 from0 rgba.alpha to0 rgba.alpha name Copy2 selected true xpos 445 ypos -16 } Dot { name Dot4 selected true xpos 479 ypos 57 } Is this a script I need to input somewhere? share quote
 03 March 2010 alkali22 import nuke portfolio Nathan Pipeline TD Los Angeles, USA That's how Nuke comps are stored. Just copy all that (don't miss any brackets) and paste it into your Nuke DAG. share quote
 03 March 2010 ChristopherP Frequenter portfolio Dude Dude United States you can literally just copy&paste that segment into nuke. or save it as a .nk file somewhere and import it back into nuke via file->import script. edit: doh, replied a little too late c. Last edited by ChristopherP : 03 March 2010 at 08:49 PM. share quote
 03 March 2010 CGTalk Moderation Expert 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. share quote

 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 vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.