How to Face Swap with Mocha Pro Power Mesh

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] the name's bond james bond the name is bond james bond welcome amigos to another tutorial and i'm super excited about this one because we'll be exploring the power mesh feature in mocha pro i've been using it for the last couple weeks it's amazing you can use it to do better rotoscoping quicker and faster rotoscoping jersey swaps that'll be a future tutorial and this one which is face swap now this feature is only available in the professional version of mocha if you want to jump take that leap and go to the professional check out the description there's a code courtesy of boris effects all that info is in the description and if you want to master the fundamentals of after effects go to aemastercourse.com that is the course that i developed based on my experience to get you up and running rock solid foundation in after effects and remember that life is truly a gift make it count let's get started with this face swap control i command i to import your footage this is a clip that i shot on myself saying that my name is bond james bond and by the end of it i thought i was james bond and this clip is a clip that i downloaded from youtube now you got to make sure that the clip that you shoot and the original clip is the same frame rate 23.976 you can see 23.976 that's critical and the second thing is the same resolution as original now you can shoot this one that the one that you shoot of yourself or the talent could be 4k or 2k but you'll need to pre-comp it down to 1920 by 1080 or whatever the size of your footage let's drag this footage into the comp icon and let's move the current time indicator all the way right here and let's set the in point let's splice this layer ctrl shift d i'll delete this one let's rename this to bond and what i'll do is i'll add a marker hit the asterisk double click start and let's select green now the reason that i'm doing this and i'm not trimming the comp right here or moving it to the beginning is because when i was using this power mesh and i was pasting all that tracking data back and i had done that i had trimmed the comp or moved it there was some type of misalignment it wasn't aligning properly so if you stick to this method it'll work perfectly so just leave it at the very end we can just trim the comp to our work area let's go to the end right here and remember to subscribe and press the bell icon okay i'm going to trim the out point and we're ready to go into mocha make sure that is selected effect mocha pro click on the button and this power mesh feature is available only in mocha pro not mocha a but it's a good reason to upgrade because it's awesome it's amazing now there's two keyboard shortcuts the letter z to zoom in and zoom out and x for the hand tool to move and these are two keyboard shortcuts commit them to memory very handy when you're doing the face swap we want to subtract the area of the eyes and the mouth so we can show the natural movement of the talent so that's what we'll do first before we track the face so go to the circle tool let's draw an oval i'm going to rotate ctrl a for all the points and let's move it let's call this i and this is actually the right eye of bond go back to the circle and let's draw another oval ctrl a and let's move this and this is i lt okay let's go down to track and we only want the top three deselect shear same thing for rt and you can see that the current time indicator is here and we could have we should have done it at the very beginning but that's okay you'll see that we can track backwards and we're tracking both at the same time usually i would track one at a time but this is something that i've done several times and i know it'll work for something simple like this you can track both at the same time once you're done tracking we want to lock that tracking data so what we need to do is click on this gear icon and it'll lock it basically it'll turn off the tracking because it's already done move the cti to the beginning and let's go back to the circle let's make it pretty big rotate it ctrl a to move the points and now we can move individual points and then what i'll do is i'll go ahead and click the lasso tool to select this point these three points move it up and let's rename this layer to mouth and let's take away let's deselect shear and let's track forward i notice that the track slipped but it doesn't matter this doesn't have to be perfect what we can do is at the very end we can just move this and it'll create keyframes for us now again let's lock that tracking data we're done tracking so click on the on the little gear and the next step is to track the face now there's two things you need to take into consideration number one is when you're defining the area that you want to track that will one be the area where you'll create the mesh the power mesh and number two is mocha is a planar tracking software so if you track a plane it'll do the best job now obviously the face is not exactly a flat plane you have a nose for example that extrudes out but we can get away to a certain extent now there are some people that will go up to the hair and track the whole entire face but from my experience just trying this out for the last couple weeks just just tracking that plane the front part of the face will pretty much give you really good results so that's what we'll do let's go to the x spline tool and let's click to create these points and ctrl a and let's drag this blue handle to just curve this a little bit and we can adjust these points you can see that the current time indicator is right here so i'm actually going to delete this move this all the way to the beginning ctrl a and we can move this and we can modify these points so take your time remember that the mesh will be inside this area as well but we also want the best area to track to give us the best results and let's call this face now these layers i'm going to change the color for now to green and this one to blue if i activate this button and i bring the face all the way down to the bottom you'll see that now it's subtracting the eyes and the mouth and that's really important you you need to make sure that your face track is the bottom most layer if you had it on top let's say right here it's not going to it's not going to subtract anything so if we bring it all the way to the bottom it'll subtract any layers that is above let's go down to track if it starts drifting you may want to increase this number minimal minimum pixels used up to maybe 70 80 or 90. we'll stick to 70 for now if you have perspective movement we would check perspective but in this case there isn't much so what i'll do is just deselect it and this new option is mesh now when you click on mesh automatically mocha created this mesh for you and we have these two sections and for mode we have automatic and uniform and anytime you modify any of these properties you need to hit the generate mesh button to update so you have uniform and we have automatic now in uniform you can see that if i click on this button and this hides the mesh you can see that the mesh is outside our spline and that's because we have vertices on spline selected we deselect it it'll be inside the mesh we can make this smaller now in my experience i found that doing these face swaps automatic works really well 32 is a good size to start out with if you're working in hd and 4k so start out with 32 vertices on spline and adaptive contrast this these works really well for face swap now if you're having some issues definitely go to uniform and try out uniform uniform works i would try uniform for things like let's say a t-shirt you want to track the t-shirt and put a logo or a design on a t-shirt or a flag that's when i would use uniform but like i mentioned for face swaps automatic 32 vertices and spline adaptive contrast works well and make sure that you have warp spline selected and smoothness is how much flexibility or how much you want it to not to bend or how rigid so a low value a value of zero means it's really flexible like a flag a higher value closer to 100 is very rigid you can let mocha interpolate automatically by hitting auto but for this case we'll leave it right in the middle right at 50 and we're ready to track so what we'll do is since we're at the beginning let's just track forward okay let's check it out let's just scrub through and it looks pretty good you can see that it's mapping the movement of the chin and the cheeks pretty well there's a little movement up here and there's not a lot of detail it's right in the highlight section you can see these two are moving but that should be okay you also have the option to delete any of these points and if you do want to delete it like i said it's okay because we won't be using this section up here but if you do want to delete what you do is you go to this button it'll enable this button where you can now edit the points we can select this point hit delete and let's check it out and if you want maybe this button at this point hit delete but let's undo and let's leave it i think this should be fine now we need to select a reference frame and the reference frame will be the frame where we'll do the compositing so let's go and select a neutral pose we can select the beginning but just to show you we can select for example right here 127.15. now to set the reference frame there are two methods here in mocha number one is you can go to the surface tool let's hide the mesh um let's hide this let's deselect this and it's not working there you go so let's we'll hide the mesh and what we can do is we can apply this surface tool to the edges by clicking on the align to surface tool that's one method the other method is by going to the stabilize and here in the frame list just hit the plus and now 127 15 is our reference frame now from warp mapping let's go to meshwarp we need to select it don't worry about this we'll select it inside the plug-in in after effects and we can switch it to high but these options we can set it also inside the plug-in we're ready to close mocha we need to save it and it's all there the tracking data is in there but we'll use it in a second what we'll do right now is let's go to the footage obviously you need to match the perspective you need to time it out and this is something that i did i timed it out and i know it's around here at 30 seconds in and what i'll do is i'll trim this layer move it over and i'll hit ll so i can see the waveform and what i'll do is let's undo there you go and make sure that i only have one layer selected and let me move this and i can actually that's we can bump up the volume let's see we can bump up the volume to 10 so we can see more of the waveform and let's just line it up perfect so that looks pretty good and remember that 127 15 is our reference frame so let's add a marker label it ref for reference and let's check it out let's see [Music] if it's synced up name's bond james bond that looks pretty good okay let's create a copy of the bonded layer ctrl d or command d and let's call it ref for reference we'll select these two layers the top layer and the reference right click pre-compose move all attributes and let's call it face swap and let's go into face swap let's jump inside and we need to drag this one more now this shot of me even though i'm trying to stay still i move a little bit so i need to stabilize my head and you can use a tracker inside of after effects but since we have mocha pro mocha pro has that feature as well so let's jump into mocha pro again but this time for the shot of of my performance and let's move the cti to the very beginning and since i'm not moving my head in perspective it's just staying still i'm going to cheat it and fool the algorithm into thinking that this is one plane so in the track let's track the top three deselect shear and let's go ahead and track forward once it's done let's close it let's save it let's go to mocha pro right here the plugin module renders select stabilize and select render i'm going to solo this layer and i'm going to click on the transparency grid and i think you can see as i move that you can see that it's shifting and compensating for that small drift and it should have locked right to my head so this clip is stabilized and now what we need to do let's on solo let's pre-compose select the layer layer pre-compose and let's move all attributes let's call it stabilize and we can trim this layer now what we'll do is let's go to the pen tool and let's draw a mask like this to show the face and alt control home to move the anchor point right in the center the letter v for victory to move it s for scale scale it down to 78 and let's move it w for the rotation tool and what we can do is t for opacity to bring down the opacity we might need to move this down maybe rotate a little bit more and you can see that i wasn't looking [Music] at the right spot but still we should be able to make it work now this is important the more you get the perspective right when you're shooting this the better obviously it'll look we can tweak the mask mm to reveal the mask and the properties and let's feather this to about 35. and we're doing this in the reference frame remember 127.15 is a reference frame we're not doing it here or or anywhere else but it's right at the reference frame and let's hide it let's bring it i might want to move this a little bit more okay now we need to color correct the face so it'll match the face of bond and to do that select the layer effect go to color correction and then levels and we'll switch it to the red channel and here in the levels red channel and what we want to do is match the highlights so let's move the slider so it'll match the highlights of bond and we'll do the shadows as well so that looks pretty good let's do the same thing for the green channel let's match the highlights and then the shadows let's go to the blue channel and do the same thing let's move the slider for the highlights and let's do the shadows once we're done switch back to rgb and you can see that we need to put a little bit more red so let's move the red and we can go to rgb give it a little bit more contrast and it's looking a lot better we can tweak it further but from here to here it's looking pretty good like i said we can this is a fine tuning stage where you can just spend more time and just really fine tune if you need to adjust exposure go to color correction exposure and we can bring up the exposure a little bit or we can drop it down for example minus 0.3 drop down the exposure and we want to blur it as well give it a little bit a little blur since the bond clip is a little soft go to blur gaussian blur and give it a value of about two pixels and you can see that i need to bring this closer to the edge and we can tweak this more let's undo let's keep it here this is good for now definitely this is a stage for you to tweak you can see that the mask feather right here you can see a little bit of the edge of my face and what we can do is go back to the mask feather we can decrease the value maybe 25 bring it in a little closer and you can still see it maybe a little bit less maybe 20. this looks better and let's hide the reference layer let's hide it and this is what we have just ahead stabilize and now let's jump back into our main comp and the last stage is to apply all that tracking data and distortion mesh back to the face so to do that let's go to the bond clip go to mocha pro select it edit copy and go to the face swap and let's paste it and go to module renders for module select stabilize warp the warp quality high and finally for render for the render box let's check it now if we scrub through you can see that is sticking to the face and let's disable the audio let's do a ram preview and let's check it out let's go back and let's enable the audio and let's hear it name's bond james bond the name is born james bond [Music] you
Info
Channel: C.M. de la VEGA
Views: 35,279
Rating: undefined out of 5
Keywords: after effects tutorial, after effects, mocha pro, power mesh, face swap, head swap, vfx, how to, premiere pro, adobe
Id: ZjXKwnMn-oI
Channel Id: undefined
Length: 22min 34sec (1354 seconds)
Published: Wed Dec 02 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.