How To Remove Black & White Background from Stock Footage in Nuke

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone Danasa here with ActionVFX in  today's tutorial we are going to learn about   ways to remove black background on stock footage  in Nuke we will be using several action VFX asset   collections for this demonstration which you can  check out in the description below anyway without   further Ado let's get started so here I have these  three main ways you can remove a black background   on a stock footage and comping it into a plate  all of these workflows would essentially yield   the same result just in different ways so let's  start with the first method which is using the   merge operation okay so here we have our plate  and then we also have this lingering fog asset   from our atmospheric smoke and volume 2 collection  and if we merge this over our background plate our   fog which is on the a input completely covers  our plate on the B input this is because our   element here has a solid white Alpha so it  doesn't have any transparency at all it is   a solid opaque footage so how do we deal with  this one way to get rid of a black background   that doesn't have transparency on it is to just  go to the merge node and want to change our merge   operation in Photoshop or after effects you may  know this as a blending mode so let's change it   from over to let's say something like Plus and  there we go so what happens with plus is we're   just passing or adding the two color values of  the asset and the background plate so the color   black as you know has the value of zero like you  can see down here so anything that is plus with   zero like for example zero plus with the value of  the background would result into the value of the   background that's why the background is coming  through on the merge whereas anything that is   above zero has a number on it so when you plus  it with the background the result would be that   color Value Plus the background so our fog while  this may not be super noticeable is actually   getting brighter just a little bit which is not  entirely accurate for this element so plus it's   usually reserved for assets or elements that has  glow in it like for example this lens flare that   we have this is perfect for using Plus because  we have the lens flare and we want the flare   out of the glow to brighten up the scene so if  plus is not supposed to be used for compositing   smoke then what should we use well you want to  use another operation that is similar to Plus   which is screen and there we go so screen  is doing a similar thing with plus except   we don't actually have an extra brightness that  we got from plus so if we go back to plus this   is what we have you can see that the smoke is a  little bit whiter whereas if we go back to screen   we still have the transparency but we don't  get that bomb in Blackness so that was very   simple all you have to do to composite the smoke  with the black background is to just use screen   however this may not be the best workflow for  some people because you don't actually generate   an alpha transparency channel into your footage  so the footage still has a solid white Alpha   you may want the flexibility of having the element  being transparent or having a transparency before   it merges with the background play so that's  what we're going to do next we're going to find   another way to remove a black background  without changing the operation from over   okay so we're back to where we were which is  the lingering fog with a solid Alpha channel   is merging on top of our background plate so now  what we want to do is we want to generate an alpha   channel of our fog here so it will be transparent  it will have a proper smoke of a channel before   it is being merged on top of our plate so then how  do we generate that Alpha Channel because we only   have the solid white color on our Alpha thankfully  though our fog here stored other information that   can be useful to dictate our transparency on  another Channel which is the color channels so   what we're going to do is we're going to borrow  one of the color channels which is either red   green or blue and use that as Alpha and to do  that we're going to use a note called Shuffle node   plug it here so Shuffle is a node that allows you  to scramble your layers channels around currently   we don't see anything changes when we plug in our  Alpha channel here that is because our channel is   in its default position and it's reading seen as  is which is our Smoke's red channel is being read   as red Channel and the green Channel being read as  green Channel blue Channel red as blue Channel and   Alpha Reda Alpha so if we don't change anything  so I want to do is you want to change our input   here we want to scramble things around which  is using one of the color channels red green   blue as Alpha and we need to pick a candidate so  if we cycle through our RGB channel here nothing   really changes that is because we have a white  fog in computer the color white is actually a   combination of red green and blue so that's why  you don't see a lot of changes in Luminosity on   the red green blue because the light green blue  is being spread out evenly so this is perfect   that means we can just use any of the RGB to  use as our Alpha Channel but usually I would   choose the green channel so let's go to our Alpha  and let us stop reading the alpha channel from   our footage instead we want our Shuffle to borrow  the color from the green Channel as the alpha and   there we go this is our Alpha Channel now which is  identical to the green channel so then if we go to   our merge node which is set as over we didn't  change it to screen or Plus or anything like   that this is what we have which is essentially  mirror identical to just using screen but this   time we actually have our transparency taken  care of before our fog enters the merge and we   get to keep the merge set as over operation this  is more or less the proper way to remove a black   background which is you want to actually produce  an actual Alpha channel on the element however   the problem with this method is you can only  borrow the transparency from one color Channel   which in the shot is perfect because the white  smoke has all the color values that are evenly   distributed but when you have something that  has a certain hue like for example the spell   hits here that very clearly tinted towards green  it would get a little bit problematic because   if you switch through the red green and blue you  can see that the red green and blue channels are   different from one another so what you have to do  when you are adding shovel to elements like this   is to just pick one of those color that you think  suits best but again this is not a super big issue   because it's just a matter of choosing the color  it can get problematic however if you have another   element like this police like because our element  here is changing color almost every second so in   this Frame you might think that the red channel  is perfect to be used as an alpha Channel but then   when it switches to Blue the red channel is no  longer as bright as before so how do we deal with   this well we're going to use the third method  of removing a black background which is using   aluminum skin okay so we are back to square  one again now let's generate our Alpha Channel   by using the third method which is the keyer node  so on the gear node we want to make sure that the   operation is set to luminance key and then let's  go to our Alpha channel here and see what happens   when we add our luminance gear boom we get our  Alpha Channel immediately so what the gear does   is it generates an offer based on the overall  brightness of the footage so it gives you a more   quote-unquote truthful result because the gear is  not just picking one color channel to represent   the transparency it picks just a general luminance  of all the channels so this gives an identical   result to what we're doing when we use screen  and because luminance King is using the general   luminance of the shot instead of a specific color  you can use this to generate an alpha channel from   our element earlier so if we look at the alpha  here we have a great Alpha from the blue and then   when it switched to Red we still have the alpha  so that is perfect before we go further if you   are enjoying this video don't forget to hit the  Subscribe button and like this video because your   support means a lot to us and now let's go back  to the video okay one last thing I'm going to show   you is we're going to learn how to remove a white  background so here we have our plate and then we   have our smoke flute so our smoke plume here is a  black smoke with a white background so we cannot   just use the methods that we just learned earlier  because if we did what would happen is the smoke   would be the one that is transparent so we want to  find a difference workaround where we want all the   white colors to disappear and all the darker  colors to stay so the thing about this smoke   Bloom is it doesn't have an alpha Channel as you  can see from this bar here we don't have a white   bar next to it and if we check our Alpha channel  it's solid black so we don't have any opaqueness   at all this is a completely transparent footage  so what happens if we have a footage that doesn't   have any Alpha Channel and it is being merged over  into a plate well this is what we will have so it   looks weird instead of just having the smoke Bloom  covering the plate we have our smoke completely   disappear so what happens here is that over is  going to act as a plus if you don't have any   Alpha channel to back up any of the pixels so if  we switch here from over to Plus nothing happens   because again over without an alpha channel is  basically like a plus so how do we deal with this   then how do we get rid of the white and keep the  black smoke well one of the most easiest way to do   this is instead of using over or Plus or screen  we're going to use multiply so the way multiply   works is again as the name suggests is multiplying  our footage with the plate and because our footage   has a white background which has the value of one  everything that is multiplied by the value of 1   becomes that number which is the background and  anything that is multiplied by black or zero would   become zero or black again super quick cheap way  to just get rid of the white color but again that   is not what we want we want to actually generate  a transparency or an alpha channel before our   smoke plume here goes into the merge so let's do  that so here we are back to where we have before   so now let's generate our Alpha channel for the  smoke so to do that just like before we want to   generate the alpha by referring from the color  channels so we're going to do that again by using   here keep it at luminance and let's go to the  alpha channel so we have nothing here and if we   plug our luminance key we have our Alpha generated  based on the brightness of the color channels   now of course this is not what we want because  we want the smoke to be the one that has a white   Alpha so let's invert the color there we go so  then if we go to our merge here this is what we   have we have our smoke now has some opaqueness  to it but the white background here is still   there even though on the alpha Channel we already  dictated as black that's because we haven't done   what is called a pre-mult so let's get promote  and let's add it here and there we go now we have   got rid of the white background so now if we go to  our over this is what we have we are getting there   but we still have the white leftover pixels from  our white background that we want to get rid of   so to do that what I want to do is I want to get  a great note and essentially by using great node   we want to darken the white pixels on our fog so  to do that I'm going to go to gain and gain here   as you can see controls the bright areas of our  footage so we can darken it down and this is what   we have now of course this is getting too dark  so let's just keep some of our clay a little bit   there we go so then we have our fog here  and we compare to the plate our fog here   looks practically similar but the problem is the  game did not go all the way down we still have   a little bit of that white edges on our file so  let's get rid of that but instead of making the   smoke darker I'm going to use the multiply node so  the multiply node for the lack of better words is   basically just control the amount of transparency  that's because of the nature of multiplication so   here after we added our multiply we have nothing  changes on our footage because the value of the   multiply is one and the footage multiplied by  one is the footage but if we set this let's say   to zero it's going to disappear because the value  of 0 multiplied by our smoke would result to zero   but of course we don't want to reduce the opacity  of the entire fog we just want to get rid of the   opacity of these edges on the smoke here then  what we're going to do is we're going to go to   mask and we're going to select RGB Alpha so now  the multiply will only affects the inside side of   the Alpha and the multiply is getting stronger  towards the middle because the middle is where   the alpha is the most opaque so we actually want  to get the inverse of this we want to get rid of   these edges while keep the middle so let's go to  this box here and check invert so now instead of   the multiply affecting the inside of the alpha  it's going to affect the outside so if we push   down here or if gather It Off the white edges  on our smoke and this is what we have we have   got rid of the white background and at the same  time generating its own Alpha Channel and that   is how to remove a black and white background  of your stock footage in Nuke once again if you   want to purchase all the VFX assets that I used  in this tutorial you can check out our website   at actionvfx.com at action VFX we provide fast  library of high quality VFX stock footage for your   projects from fire and smoke energy effects and  explosions and many many others you can purchase   them directly or sign up to our subscription  starting at the low cost of 14.99 a month this   is the most affordable way to access our library  it's saving you at least 80 off including our   subscribers only free Collections and you can  cancel anytime no contract thank you so much for   watching I encourage you to drop a like and let  us know in the comment section below what kind   of tutorials that you'd like to see next but most  of all be sure to subscribe we are aiming for 100   000 subscribers by the end of the year and also  there are other resources on this channel such   as other VFX tutorials podcasts VFX breakdowns  and many others so be sure to check them out as   well let us be your number one resource for  official effects so see you next time bye
Info
Channel: ActionVFX
Views: 16,200
Rating: undefined out of 5
Keywords: how to remove black background, how to remove white background, nuke, how to remove black background nuke, tutorial, remove background, free stock footage, remove black background, vfx elements, how to key white background, vfx stock footage, alpha channel, how to key black background, stock footage, blending modes, solid background, actionvfx, vfx
Id: KIGOPZXr81w
Channel Id: undefined
Length: 15min 26sec (926 seconds)
Published: Mon Sep 26 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.