Transcription
Whether you're using the free version of Da Vinci Resolve or the Studio version, there's going to come a time in your projects where you might need to mask out something in your footage.
When we say masking, we're really talking about cutting around something in your footage to isolate it from the rest of what's going on in that video clip.
Now, there are different reasons you might want to do that in your project. Sometimes it's to put text behind something in your footage, and sometimes it's to take someone in your footage completely out of the element that they're in and replace the background or change the sky.
Those methods are called rotoscoping, and there are a lot of reasons why you might want to learn how to do that for your project.
So today, I want to talk to you about how you can do it in the free version and the paid version, and you can decide which version might be better for you based on your potential workflow.
Let's start with something really simple. Here in my timeline, I have a piece of footage of a sailboat just sailing across the water.
Now, let's say I wanted to put some text behind the sail of the sailboat but over the sky in the background.
Well, the way I would do that is I would left-click and hold Alt on my keyboard, and I would just drag upwards. It will make an exact copy of that footage right above it, putting it into a different track.
So now I have the exact same footage stacked on top of itself. I'm going to go to the lower track and disable that track, so the only track that's visible on the timeline is the one in the track above it.
Now I'm going to swap over to the color page, and here's where I'm going to do my masking.
Now, if you happen to have the Studio version of Da Vinci Resolve, it's got some cool AI-assisted features, and one of them is right here called the Magic Mask.
This makes rotoscoping and masking things out so much simpler than how we used to have to do it back in the day.
Let me show you. All you have to do is select that feature, go up to your preview window, and you can see how your cursor kind of turns into a little pen icon like an eyedropper.
All you need to do is sort of draw what you would like to keep in your video, and what's going to happen is Da Vinci Resolve is going to intelligently remove everything else.
Now, you might be looking right here and going, "Daniel, I didn't see anything happen." There's a reason for that.
We have to actually change the output so that we can see that mask in action and see the transparency.
The way to do that is to go to the upper right in this color node area, right-click anywhere in the gray area, and scroll down to add an alpha output.
You'll see that it adds this little blue dot over here just below the green dot output.
We just want to connect the output, the blue section, this blue dot right here, all the way over to that alpha output, and suddenly the transparency happens.
We can start seeing what's been removed from the background.
Now, just below the Magic Mask, you'll see this feature to track, and I can click the double arrows, and it'll track that piece of footage and apply that mask to the entire clip.
Now it looks black. Sometimes transparency is represented as black; sometimes it's represented as a checkerboard.
In this case, in Resolve, it's just represented as black. But if we go back to the edit page and we turn on the footage below it, suddenly we can see the sky again, and that's because in the footage below it, it still has the sky.
We didn't remove that.
Now, if I left-click and grab that top track and drag it up one more time and create an open track in between the footage I applied the Magic Mask to and then the original footage below, what we can do is go over to the title section over here on our tools menu, scroll down to Text Plus, left-click, and drag that right in between the two.
I'm going to left-click and hold on the end and stretch that out so it's the same length as everything else, and you can already see that the title's there behind the boat but in front of the sky.
Pretty cool, right? I've already masked that out so that the sailboat is on top of it.
Now you can do things like select that Text Plus, go into the upper right, and change the words.
Let's change it to something more appropriate. I'll change it to "Sailing." I'll increase the size of it a bit.
Let's change the font too. Let's try something like maybe Impact.
I'll use the settings menu to lift that up a little bit, get it just above the horizon.
We can get a little funky here. Let me get onto the cropping.
Let me crop the bottom up just a tiny bit, and let me add a little bit of softness to that too so it looks like it's dissolving just above the horizon line.
Now when we play through, you can see the sailboat moving; the text is behind it.
We've quickly masked out and put text behind an object in our footage.
You can even add some sound effects, maybe some ocean and some birds; that can really help take this entire effect to the next level, regardless of which version you're using.
Pretty fast, pretty simple.
Now, if I wanted to do that in the free version of Da Vinci Resolve, I'd have to do it slightly differently.
If you're on the free version, you don't have the Magic Mask, so what you're going to need to do is use this other option here, which is called Window or Power Windows.
These allow us to add different types of masks right inside the color page, and we can draw some of them manually.
By scrolling down, you can see this pen tool right here. Just left-click on that, and when it's highlighted in red, you can go up to your preview window and start drawing a mask all around this sail.
Let me scroll in just a little bit so we can see it a bit better.
But I'm going to start down here at this sail, and I'm going to start drawing a mask all around the sail.
Now, you might ask yourself, "Daniel, don't you need to mask out around the water too?" But all the text that we just added was above the waterline, so the only thing that's really going to come between the background and the foreground is the sail.
So we can limit ourselves to just masking around the sail.
Once we're below this waterline, I don't have to get crazy tracing the shape of the sail.
I just have to make sure I reconnect to the original starting point because the minute I do that, you can see it's now masked everything out around it.
If you don't connect your mask to the original starting point, the mask won't work, so always make sure you go back to the very first starting point when you're done with your mask and click that dot again.
Now let me scroll in just a little bit, and I want to show you that we can actually adjust this mask.
We could pull it out, pull it in if they're not exactly where we need them to be.
We can also do things like add an extra point on there just by left-clicking anywhere along this mask line, and we can create a little bit better mask and more mask points to get things a little more dialed in if perhaps they aren't exactly the way we need them to be.
But once we generally have that mask figured out and it looks halfway decent, what we want to do is go back down and right next to this Power Windows option, go to the right, and there is a Tracker window option.
Now from here, what we want to do is go down to that back-and-forth arrow that's going to track backward or forward.
So if your playhead is somewhere other than the very beginning of the footage, it'll track in both directions.
Click on that tracker, and you will see that this will now track that nice sail shape right across your entire footage.
Now, if I go back to the edit page and I turn on the track below, and if I grab that text that I created on the first version that I had used the Magic Mask for, you'll see it's a very similar mask to what had been done with the Magic Mask.
This is a situation where it took a little bit longer to do it manually, but the free version can work almost equally as well as the paid version just because of how simple the mask was.
But where things get tricky is when we start using more difficult footage and try to mask around it.
Let me give you an example of that.
Now, I do have to take a second to thank the sponsors for today's video, our good friends at Blackmagic Design, the makers of Da Vinci Resolve, who sponsor content on this channel each and every day.
Thank you so much.
But I really have to thank our good friends who provided all of the assets we used in today's project: Storyblocks.
Storyblocks is an affordable asset house where you can get things like B-roll, music, sound effects, and images that you can use royalty-free in your next YouTube video.
And Storyblocks just added an entire section of templates specifically for Da Vinci Resolve.
These include animated titles, transitions, motion graphics, and more.
Now, I've been using Storyblocks for years before they ever became a sponsor on the channel, mostly because I really like the quality of the product and how well it helps me with my workflow.
I also really like the fact that for one affordable price, you can get access to as many assets as you need there, and there are no download limits about how many high-quality videos that you can use at any given time period or how many images or pieces of music or sound effects or templates that you can download from Storyblocks.
One price gets you access to as much as you need.
I'll leave a link down below if you want to go check out Storyblocks for yourself.
Today, let's say we had footage of this fellow right here.
Let me bring him over into the timeline.
Find a young gentleman smiling out in the city street, some people walking around him, there's some background, some other people, some cars, motorcycles going by.
If we wanted to mask out the background and put him into a different environment, we would select that footage, go over to the color page, make sure you have that clip selected, and then we would begin the masking process.
Now I'll do it in reverse this time. Let's do it with the free version, and you can see what it takes to rotoscope out this individual and remove the background and replace it.
So let's start by clicking up in the right, let's add our alpha output, and connect it from that node so we'll be able to see our mask and see the transparency.
Let's go over to the Power Window and select the pen icon that will allow us to draw a freeform mask.
But before I start drawing my mask up here, do you see how his hairline is sort of out of frame? That can be potentially problematic if he comes back into frame for the tracking options that are available for us.
This is where, especially with the free version, you might want to scrub through your footage and see how the footage changes.
Right about here is a better spot where he's sort of full frame; his hair is inside the top of the frame.
If we use this frame somewhere in the middle, put the playhead in the middle of the playthrough, this might be a better spot to start making our mask and then track in each direction so that all of his hair and everything potentially is tracked a little bit better than if it starts out of frame.
Anytime something moves in or out of frame, there's a high possibility that you might lose your tracking, so be aware of those things when you do go to rotoscope something in your footage.
To build this mask is the same thing I did with the sailboat.
I'm literally going to have to click all the way around on all the points that define the outside of his shirt.
Every time I see change, I put another dot in here, and I'm going to try to follow the contours of his shirt, his clothing, his hair, and everything that I can see to the best of my ability.
I won't waste your time here; I'm going to fast forward through this and try to get this done quickly for you, but I'm going to try to do a somewhat reasonable mask.
Now I'm somewhere in the middle of this footage, which hopefully allows the tracking to be as good as it possibly can be.
I'm going to leave all the options for pan, tilt, zoom, rotate, and perspective 3D on.
What that'll do is hopefully follow the motion if he twists, turns, or does any kind of motion other than stay flat.
Hopefully, the tracker will pick up on that, and I'm going to click the back-and-forth option here and watch it track.
So it did not a terrible job. I can see some obvious problems here.
You can see the whole bottom moved up with it, so now I'm going to have to make some adjustments, and this is where it can get tricky.
Now, if you happen to have your scopes enabled over on the right, what you want to do is go over here and click on the keyframes option.
This is where the playhead is about maybe 40% of the way through the clip, which, if you look up here, that's exactly where the playhead is up here in the preview window, and this looks pretty decent here.
So what I'm going to do is I'm going to activate both the corrector and the sizing because I'm not sure what I'm going to have to change in this.
I'm going to right-click and add a dynamic keyframe.
It actually just added them into the corrector section; that's the only thing I've changed.
Now what I'm going to do is I'm going to move this playhead backwards and watch for errors.
I can see errors already. Once it gets to about here, these little markers in this mask are a little too high; they're actually above the bottom of the frame of the video.
I'm going to grab these and pull them down.
As I do that, notice over here in the keyframe window that it has added more keyframes at that point.
The reason it's doing that is because I added the first keyframe from a reference spot where things were good.
If you do not add that original keyframe, it won't add the second keyframe; it'll just start moving things.
So always make sure that you find your right spot right from the beginning, set a keyframe in if you plan on changing the shape of this mask and modifying the tracking.
Now I'm going to zoom out a little bit more, and I'm going to move a little bit more backwards and see what happens when I get to about there.
You can see it's doing some of the same thing; it's lifting up a little bit too close to the bottom here, so I'm just going to pull this out a little bit, bring them down, and you can see in the lower right it's added keyframes.
I've modified the tracking mask.
I play through; it gets to about that middle section, and it's pretty good.
It's not too bad. There are some problems with this hairline, but we can solve those too.
This isn't going to be perfect. You could spend all kinds of time sitting here and dialing this in, but you get the idea that you can manually draw a mask, you can track that mask, and then you can create keyframes that'll work with that mask if you're in the free version.
Let's grab some footage to put behind him.
Yeah, we'll stick him in a lava field.
This poor fella, he's out working the lava fields of Venicia 12, you know, that all-lava planet that we've all heard about so many times.
If we come back over here and we select this, you'll now be able to see that lava field behind him.
Now I've already showed you how to find and use the Magic Mask, so let's apply one onto this piece of footage and see if we can tell the difference.
Look how well it has cut him out.
Now let's try tracking it.
I don't have to go to a different feature; I can just use the back-and-forth arrows here, click that tracking inside of the Magic Mask, and let it do its thing.
Right off the bat, you can see what a great job it did cutting him out of the background, much better than I was doing in the amount of time that I was working on.
You can see down below here on the right, you have options to do some other things with this.
You can increase the blur radius a bit, you can increase the radius itself, tighten that up a little tighter to him, and tweak some of the edge of that mask to get a little bit more crisp or a little softer if that's what you desire.
Let me go back over to the edit page, and here's the first mask I started with myself that still needs a lot of work.
You can see the flaws there.
Let me go to the second one that the Magic Mask did in seconds.
Much better, much cleaner, much crisper, not a lot of work involved, and I got the mask that I wanted quickly.
Now, if you're using the free version and you have the time and patience to rotoscope everything and adjust each one of those mask points and keyframe them and adjust the edges and soften it up and get it just the way you want, it can be perfect, especially when you have footage like that sailboat.
But as your footage gets trickier, you're going to find that manually rotoscoping with any video editing software is always going to be harder than using some AI-assisted tools.
If you want to learn more editing tips and tricks in Da Vinci Resolve, click on the video that I have on screen now or the ones that I'll link down below.
Peace.