Preserve and Reuse Details During Clean-up in Nuke - 'Merge Divide' Technique

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign divide is a technique that is used all the time in compositing the technical term is image frequency separation it enables you to restore fine details or reuse them in other places whilst keeping the same shading and lighting of a targeted area there is a node for it in new called laplacian it is mostly used when removing elements from a shot and de-aging or aging actors like removing wrinkles or adding them it adds another layer of precision when working but also allows you to work faster the traditional method would have been to grade a patch to match the lighting and shading to the new area which is slow and less precise you can also change lighting without altering details or sharpen out of focus shots in this basic overview I'm going to show you how you can use image frequency separation here I have an image of a man he has a lot of fine detail on his face in this case we want to remove a mole here's an image frequency separation template consisting of a few operations these operations will allow us to extract the fine details from the image this is our image and we're feeding it into a blur node which is going to blur the image and therefore remove all the fine detail then we have a merge operation the operation is set to from in the node properties the merge is essentially subtracting the Blurred image from the original image leaving us with the details this enables us to separate the image into two channels here we have the low frequency Channel which represents a shading or lighting of the face and here we have the high frequency Channel where we're extracting the fine details we can adjust how fine the details are in the blur node by changing the blur size to understand the math behind this let's use the sliced Orgasmo I downloaded it is used as a visual aid for demonstration purposes and understanding what is happening to our image I found this Gizmo on Wikipedia it's a free online library of gizmos and tools that you can use in Nuke if you view the slice node you can see I've taken a slice of the image this is the line it's sampling from it will display the sampled line in graph form in the RGB values our RGB values are represented in curves those curves can be seen as frequencies our graph is composed of an overall curve which represents the low frequencies next we have loads of small variations which are the high frequency details in the Curve we can demonstrate what happens to a high frequency curves when I blur the image if we view it the blur is removing all those fine details If I deactivate the blur they reappear if you take the slice node and connect it to emerge from where we have a high frequency pass we can see that all the small variations that were removed from the image have been extracted here having separated our image into two channels we are now able to modify one or both of those channels without affecting the other then what we're doing is bringing back the image to its original form by plusing the low frequencies back on top of the high frequencies if we compare our final result with our original input we can see there's no change to the image there is also another way of doing this setup both the merge operation set to divide and we are multiplying the Blurred image back on top this is where the name merge divide comes from I prefer to use the merge from technique as it's easier to read and explain you can also extract The High Frequency details with nuke's laplacia node which is essentially doing the merge from operation with the blur node now I'm going to show you how you can use image frequency separation Yourself by creating your own setup we're going to remove this mole here on his face to begin with let's create a merge node by pressing M on your keyboard we're also going to create a blur node you can do this by pressing B on the keyboard once finished connect the blur to the source image and the merge as well but let's use the b-pipe for the a-pipe we're going to connect it to the blur node as we're going to be using it to take from the image through the merge node in the merge node let's change the operation in the node properties to from you can view a node by selecting it and then pressing any number from one to nine on your keyboard we're now viewing the merge operation as you can see our image is black and that's because our blur size hasn't been increased if we look at our blur node the blur size is zero which means it isn't doing anything we're effectively taking our image away from our image which of course will give us black if you double click on the blur node and change the node properties in size and start increasing it you can see that we're extracting all our details create another merge by pressing M again on your keyboard and connect the b-pipe to the merge from and the a to the blur now we can plus our low frequency pass which is the Blurred image and plus it on top of our high frequencies which have a fine details let's click on merge and change the operation to Plus if you view the merge plus we're getting back the original image let's tidy up our script by creating dots to do this press control on your keyboard and click on the highlighted dots you can also create one underneath a node by selecting it and pressing full stop on your keyboard now let's remove this small I'm going to show you the difference between the mole removed with image frequency separation and without let's start with out a beginner's Natural Instinct would be to use a paint node you can do this by pressing p on your keyboard we would then use the Clone tool in the paint node toolbar menu if you press Ctrl you can choose your Source let's set it something that looks similar to the skin surrounding the mole then click and drag while still pressing Ctrl to choose the area you want to clone to to increase the size of your brush press shift and drag in hardness we can modify the softness of our brush I'm decreasing it to zero to have a nice fall off the reason why I can't see anything is because I'm not viewing my paint nodes let's view it by pressing any number from one to nine you can see something has gone wrong that's because this part of the texture has a different lighting and color to this part it's not matching the source for benefit of using image frequency separation is you can keep the lighting and shading of the area you're painting in by only changing the details in this case it would be removing the mole without changing the light and shading of the area I am now going to show you the method with image frequency separation if you create a new paint node we can do the same operation over here on the fine details and if we change the blur size we can choose how fine the detail is let's now use the Clone tool again and press Ctrl and drag to set clone source and Target and shift and drag to increase the brush size we now need to modify the low frequencies let's create another paint node by pressing p and increase the blur size as we're still seeing the mole as it's a bit bigger than a fine detail we can paint here with the Clone tool to get rid of the dark spot I'm reducing the opacity as my brush is too strong let's view our final image if we compare it to our original image we can see we remove the mole whilst giving the same shading of the area and transferring details from another area if you compare it to our paint node on its own we're getting a much better result with our image frequency separation setup I'm adjusting the detail amount with the size slider in the blur node let's keep it like that we have successfully removed them all in this example I'm going to show you how to move a bigger element from the footage using image frequency separation before non-organic elements such as the bus stop sign on the road we would first go about it by moving this area up with a transfer node and place it on top the problem is is that it's not matching the lighting and shading of the area we're getting this horrible dark patch which is going to repeat here this makes it quite clear where we sample that patch from which is an issue on the left I've used this exact same method but with the image frequency setup it's working much better if we compare to the method on the right we can see it's transferring all the fine detail of the aerial samples without transferring the shading and lighting of the sampled area let's create this together we can start from the beginning by copying our plate over then create a merge node and a blur node like in the basic setup once done let's connect the merger's B input to a read node and its a input for blur and the blur to the source less tidy our script in the merge node properties we can change operation to from Once done we need to create a merge plus the merge operation is going to restore our low frequency details with the Blurred image by plusing it back on top of the high frequency details let's just set up blur size to a value over zero so that we are extracting some details if you check between the original image and the output at the ends of our setup we can see there's no difference which is what we want as we haven't made any modifications yet if you look at merge from we can see we have all the details these are the high frequencies and on the left we can see blurred our image those are the low frequencies I'm going to increase the blur size as I want the details extracted to be bigger let's start removing the bus stop sign first of all we're going to create a roto node to do this press o on your keyboard now we can cut out the area which we want to get rid of let's change our clip to no clip to avoid stretching now I can create a copy node by pressing K this will allow us to add the matte or Alpha to our image then attach it to merge from and add a pre-moped which will cut it out now if we view our pre-mults we can see we've successfully cut out the bus stop sign let's merge it back on top if we look at the results nothing has happened it looks exactly the same as before that's because we have just cut out an area and placed it back on top but now we're going to create a corner pin which will allow us to position a new area of the image in place of the bus stop sign press Tab and type corner pin to create it I always disable the corner pin at first so I can see what I'm doing you can do this by pressing D on your keyboard let's go into a from tab this will tell the corner pin where we are translating from let's position our points for the area of the image we want to replace the bus stop sign with I think a good patch to take would be underneath the bus stop where there's no sign as we have some lovely texture there now we're going to reposition this patch on top of the boss sign to do this let's go back to our corner pin node properties set the corner pin 2D tap which is essentially where we are telling it to transform to instead of repositioning the points from scratch you can click on copy from to match the point positions to the from tab now we can select all our points and move them upwards to our new position as a perspective has changed we need to modify the points to match to the new area if we look at our result meant to let the corner pin and press D to re-enable it we can see that we move the details from here to here if we click on merge plus we can see what it looks like we can see that we brought the details back but we still have one problem we can still see the Blurred bus stop sign we need to remove this in the Blurred output which is the low frequencies pass a quick way to get rid of it is to create an impaint node inpate uses surrounding pixels to fill an area marked in the alpha Channel or matte input let's create a roto format input by pressing o let's put the in paint node and Roto before the blur so if we change our blur settings we won't have to redo our Roto you can extract selected nodes from the pipe by pressing Ctrl shift X or by shaking your mouse we can also copy the router that we did before so we don't have to redo it from scratch copy it with Ctrl C and Ctrl V to paste then press Ctrl shift while hovering over the other Roto node to swap them out you could also just connect the impaint's matte input to the original Roto instead of creating a new one if you don't think you'll need to modify it separately later on now if we look at inpate node properties we can change our fill region to mat Alpha so it recognizes an alpha is being fed in if you want to modify your impact nodes you can change the amount this sets the amount of stretch applied to the edge pixels we want it to be nice and smooth so I'm just going to keep it like this we can also change the direction this option sets the direction of stretch you can use the direction to align linear features then we can change the smoothness here as you can still see the bus sign we might just have to make the Roto bigger I'm going to copy this rotary done and paste it here so that they match let's view our merge plus you will notice that we have successfully resolved the issue of the yellow bus sign coming through we're now getting a nice Road texture we still have a problem the focus of the patch doesn't match as it's not defocused enough if we switch back to what it was done before it's quite blurry as it's further away so we can imitate this by creating a blur node let's create a blur node by pressing B and then creating a ramp by typing in tab let's then attach a mask to the ramp node then we can position these two points over here P1 will be the start of the blur and P0 will be where the blur stops if we increase the size of the blur we're now getting a nice blur falloff effect the only issue now is we can see the edge of our rotor to fix this we can put a blur node after the Roto to soften the mat this concludes our bus sign removal hopefully this video has shown you how you can be more efficient and precise by using image frequency separation in your work check out more tutorials for nuke on learn.foundry.com nuke
Info
Channel: Foundry
Views: 23,401
Rating: undefined out of 5
Keywords: visual effects breakdown, visual effects artist, visual effects showreel, visual effects behind the scenes, visual effects video, visual effects course, visual effects animation, visual effects art, visual effects beginner, visual effects bts, visual effects compilation, visual effects channel, visual effects company, visual effects cgi, visual effects compositing, visual effects career, visual effects demo, visual effects examples, visual effects film
Id: 3r4fgrirP_U
Channel Id: undefined
Length: 15min 4sec (904 seconds)
Published: Wed Feb 01 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.