Remove Objects From Video: Content Aware + Mocha

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello in this tutorial I'll discuss Adobe After Effects newest feature content-aware fill and also show how the bundled mocha AE and its bigger sibling mocha Pro complement that workflow to save you even more time on your effects and finishing work Adobe introduced content-aware fill inside After Effects 2019 and it does quite a good job of removing foreground objects from many types of shots first create a mask set it to subtract then choose the appropriate setting in the content aware fill panel and generate a fill layer one issue to consider is you do need to animate a mask on the object that you want to remove which requires either tedious hand keying or trekking since artifacts conveniently comes with mocha AE we can use mochas fast GPU accelerated planar tracking and masking tools to get you onto the object removal much quicker so here we have a reasonably easy shot for After Effects to handle this footage shows a number of people relaxing but we want to remove them and show a clean Beach if we want to remove almost every person on the beach we need to add a mask around each of them and include their shadows this could take a while by key framing masks so instead we could do a planar tracked mask inside mocha AE select your footage layer and either select track in mocha from the animation menu or apply the effect from the effects menu under Boris effects mocha AE CC then open the mocha interface using the large friendly button at the top the effect will stay inside the mocha essentials workspace first we want to track the background this is a big sweeping move but there's a lot of sand we can track easily with the planar tracker starting from the bottom we can draw a simple box using the rectangle tool or just use the X Pine pen tool to draw a custom shape turning on the surface and grid we can align the view to help us visualize the plane of the beach as this is a large planer move we'll also turn on perspective in our motion controls tracking forwards we may need to adjust the shape as it moves out of the view to do this simply stop the track and adjust the shape then continue tracking an alternative powerful approach to this tracking method is to simply unlink the shape from the tracking data this creates an offset track relationship in other words you don't need to move it as much and you can go and make yourself a coffee just be aware if any objects get in the way such as the high contrast waves or the beachgoers you may get inaccurate results so it's a good idea to stick around and tweak as you go once we've finished tracking the next tip is to rotor out all the people you don't need to be super accurate here the shape just needs to be reasonably tight around the areas you want to fill we'll start by drawing a basic circle around the first beachgoer then we'll choose a link to track and link the circle back to the original beach track this creates a simple parent-child relationship and then all we need to do is a few keyframes to make sure the person and their shadow are covered we'll repeat this process for the other people on the beach either copying the previous layer and adjusting it to fit the next person or drawing a new shape around the person linking the layer to the beach track and adjusting the keyframes where needed I've sped up the recording for this bit so you don't have to sit through it now we have the shapes done we can go back to art effects and start the content-aware process closing and saving the first thing we want to do is go to visible layers we don't want to see the beach track so we want to check to make sure its eye is turned off and then we can close the dialog now we can click create ae masks this will convert all the shapes we made for each person into native AE splines now for the content aware step we first multi-select all our masks and change them to subtract which generates holes in the image we then choose the best fit for content-aware in this case surface is probably the best as the people are in one place most of the time we then click generate fill layer and go make some lunch while it generates once the content-aware has finished we can see the final result it's not perfect but it's done a good job at guessing where the sand should be instead of people we could tighten up the result a bit further by feathering or reducing the size of the roto mats there aren't going to be cases where content-aware fill can't guess correctly to produce great results so I'm going to show you how MOCA pros Adobe plugin can also help remove objects on tougher shots in this next example we've attempted a content-aware fill on the scaler but the film has placed a noticeable shifting ghost instead of a clean result this is because content-aware couldn't quite work out the motion so we get a little bit of unnatural ghosting and warp in these cases mocha Pro can provide a better approach because the tracking process is exposed to the user and we can use mochas planar tracking data from the scene to reconstruct the background pixels and lighting information mocha Pro has actually been around for over 10 years and was originally developed to remove wires and other objects for the film industry first off we'll use mocha Pro instead of the bundled mocha AE we've applied mocha Pro already from the Boris effects mocha directory under effects we then open the GUI as normal I already have the foreground mask tracked from this scene when I attempted the content aware film the same approach can be done here we track the skater this time and then adjusted the mask to fit their body so the only thing left to do is track the background here we're going to do quite a large track to capture the entire motion of the shot using perspective we drag this layer below our skater mocha treats anything at the bottom of the stack further away from the camera so layer order is important for removes it is almost always foreground above background we can then set our tracking parameters unlink the track if we need to and begin the tracking process once tracked we can scrub the shot with the surface to see that this is the planar motion track data we have analyzed this is another key difference between content-aware fill and mocha if the track data is slipping you'll rarely get a clean remove but content-aware fill does not expose any track data to the user now I'll select my foreground layer and switch to classic mode to enter the remove module I'll find the most revealing part of the skater shot and do a test render and it does a pretty good job to speed things up for later we're going to create a plate by hitting create on the rendered frame saving this plate out means that the frame is now locked and we don't have to render it again very similar to content aware fills reference frame I'll do the same on the first and last frames rendering the result and creating the clean plate frame we can now see the shot is behaving nicely across the frames if we're happy with these frames we can now click use clean plates exclusively and Moka will only need to reference those frames to render very fast on more complicated shots we might need to either touch-up our clean plates externally or alternatively keep used clean plates exclusively turned off to reference more frames of motion in the shot now we can either render directly in mocha Pro or go back to the After Effects timeline select the remove module render and check the render box as you can see the results are quicker and cleaner and we can even use the same process inside Premiere Pro without launching our graphics so while content-aware is a great solution when the foreground object is clearly in the frame and there's simple camera motion mocha Pro can produce more successful results when the object is partially obscured removing larger objects or there's a large camera motion content-aware fill is an amazing new feature for the After Effects community and will surely drive many levels of users to explore advanced compositing concepts now after effects users can use either the free mocha AE to save time on masking or choose mocha Pro from virus effects for advanced approaches to difficult shots either way mocha is there as always to help you save time
Info
Channel: Boris FX
Views: 6,900
Rating: undefined out of 5
Keywords: Boris FX, content aware fill, remove objects from video, adobe after effects, mokey, wire removal, shadow removal, adobe premiere pro, avid media composer, nuke, vfx, resolve, blackmagic, fusion, visual effects, tutorial, Mocha Pro, mocha AE
Id: MVAmnYdk2sw
Channel Id: undefined
Length: 8min 24sec (504 seconds)
Published: Wed Apr 24 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.