Skip main navigation

New offer! Get 30% off your first 2 months of Unlimited Monthly. Start your subscription for just £35.99 £24.99. New subscribers only T&Cs apply

Find out more

Masking and cloning with HitFilm 4 Express

Simon Jones of HitFilm guides us through masking and cloning a scene that turns our cast of four people into a mob of forty
Over the last couple of weeks we’ve looked at layer compositing and how to use keys to remove specific parts of your video. Today we’re going to be looking at masking in more detail. And how it can be used to dramatically increase the apparent production value of your videos. Here’s the shot we will be making this week, some kind of post apocalyptic scenario. It doesn’t look like there are any particular visual effects here until you realise that we only actually had three or four extras on the set at any one time. We’ve used simple masking techniques to clone our small number of extras into a much larger crowd scene. This technique is useful for all kinds of projects.
So maybe you’re making a historical biopic and you need a large crowd scene of people listening to some important speech. Or perhaps you’re doing a war movie and you’ve got a beach invasion. You need hundreds of people running up the beach but you can only actually get 10 extras. Or maybe you’re doing a zombie movie and you need a big horde of zombies but you can only afford to have three people in full zombie makeup. That’s where this technique is really, really useful. We’ve got project resources for you to play with this week, but I really encourage you to try this technique out with your own footage as well.
So here you can see all the individual pieces that we will be putting together to make the final shot. The important thing here is that they’re all shot from the same angle and with a locked-off camera. This makes it far easier to then combine those layers Load up the project and you’ll find the media imported and ready to go. Let’s create a new composite shot which is what HitFilm calls its visual effects timelines. Find the video called Bottom Left Gang in the media panel, and then choose Make Composite Shot from its menu. This will create a new timeline based on the videos properties which is an easy way to make sure everything lines up.
Change the name to something like crowd scene. Hit OK to open that new timeline. You can make as many of these as you want in a project which can be useful if you’re working on something larger with multiple visual effects shots. We’re going to use this as our base. It means that if we cut lots of holes in our other layers we will always have this one at the bottom. Next up, find the video called Battles, and drag that onto the timeline above the first layer. It will sit on top of that layer so the people at the bottom left will now disappear.
So what we’re going to do is mask the Battle layer to cut everything out except the bit we actually want. With the Ellipse Mask tool up in the viewer make sure you’ve got the Battles video layer selected on the timeline, and then click and drag with the mouse to draw a loose oval shape around the people. Everything will disappear except the area inside the masked shape. You will have noticed as soon as you masked the Battle layer the layer below became visible again. So we now have six people in the shot for reusing those same extras.
Even though these shots were filmed at the same location and with a locked-off camera, there’s still a faintly visible difference between the layers which reveals the mask’s shape. This could be due to all kinds of things. In particular, shifting lighting conditions due to the sun moving. We’re going to open up the mask properties in the Controls panel, go to the Shapes section, and increase the feather. This softens the edge of the mask making it much harder to detect the dividing line. Now that you’ve put these two clips together you already understand the core concept of this entire technique. So let’s add another layer. Find the Right Edge One video and add it to the timeline.
This time we’ll use the rectangle mask tool. As before, add a slight feather to hide the edge. Now here’s an interesting thing you can do. Click on the Right Edge One layer bar and drag it to the left. This changes the timing on that layer while everything else stays the same. I’m going to change it so that these guys have already run into the shot. So far this has all been very simple, but now we’ll do something slightly trickier. Add the Right Edge Two layer to the timeline. The complication here is that these people cover the same territory as the Right Edge One layer. We need to composite them so they don’t run into each other or overlap.
Move forward until the people are next to the car, and now select the Ellipse tool. Make sure that the Right Edge Two layer is active in the timeline, and draw the shape around those people. Feather it out a bit as we’ve done with the previous masks. We’re now going to animate the mask to move with them. In the mask’s Transform section, up in the Controls panel, click the grey circle next to the Path property. It will turn blue which means we’ve activated key framing. As you know, videos are made up of multiple frames, and key frames are special frames which store changes in your settings. You may have come across them already in some form when using your editing software.
So double click the word Path in the Controls panel. This will automatically open up the corresponding property on the timeline. As you can see there’s a grey diamond icon at the playhead showing us that we have our first key frame. We can now switch to the Select tool then move forward about a second. We can click and drag on that mask shape to now move it to a new location. Know that as you do so another key frame is being created, recording that change in position. HitFilm will automatically animate the mask between those two key frames. Repeat this process for the rest of the clip. You can click and drag on the corners if you need to resize the shape.
We also need to go back before the first key frame and animate the mask until they’re off screen. OK, you can now tweak the position of the Right Edge One clip to bring them closer or move them away from the second group. It’s important to realise that the exact timing of what happens in a visual effects shot like this is entirely up to you. You don’t have to stick to the timing of the actual source layers. Something you’ll no doubt have noticed is that the guy who gets in the car promptly disappears as your mask follows the other people down the screen. Let’s fix that. From the mask’s menu select Duplicate.
You can add as many masks as you want to a layer. Open up the Transform section for the second mask then move to the frame where the mask is behind the car. Now click and drag on the timeline to select all the key frames after this point and then press the Delete key. Move the mask to the left a little if needed. This mask now remains with the driver while the other mask continues following the moving people. Another thing to watch out for when doing this kind of shot is the moment when layers start or finish. In this case I’ve got the Right Edge One layer ending before the other layers.
The moment when it disappears is visibly noticeable in the shot. Let’s make it a subtler disappearance. Find where the people leave the frame, and then in the layer’s Transform activate Key Framing for the Opacity property. Know that you can do this in the Controls panel or down on the timeline. It doesn’t matter which one you use. Now move to the end of the layer. You can press the Page Down key to skip straight there. Drop the opacity down to 0%. It’s far harder for audiences to detect a gradual change than the layer suddenly disappearing. You could also use colour grading to blend the layers together.
For example, to further blend Right Edge One with the rest of the shot, find the Brightness and Contrast effect in the Effects library and add it to the layer. By dropping the brightness down, maybe to about minus 10, it better matches the base layer. The Right Edge Two layer also benefits from this subtle grade change helping to match together the slight differences in lighting conditions. We provided you with some other clips as well, so see how many more people you can get into the shot. Or even better go and film your own version. So you now understand four of the core pillars of compositing. There’s layers, tracking, keying, and masking.
In the final week, we’re going to be bringing this all together for our big final shot. And we’re also going to be exploring the exciting world of 3D compositing. OK, many thanks for watching and I’ll see you next week.

This week we’re exploring masking in more detail. In week 2 we briefly used masking to tidy up a green screen composite, but this week masking will form the basis of the entire shot.

Visual effects aren’t always about epic action sequences or fantastical visuals. This tutorial focuses on a relatively simple shot – lots of people running through frame – and shows how visual effects can be used to increase scale and production value without increasing your budget.

As always, visual effects are at their best when they’re serving the needs of your story.

This week we really encourage you to get out your cameras and tripods and film your own material for your own version of the shot. Let us know how you get on in the comments!

You can download the project files using the link below.

Now based on this exercise, what would you like to clone? Think of a scene and share a description of it with us. It needn’t be outside of course (although it’s nice to have a big space). Also you might not want to create a lot of people. Cloning a pet rat four times in a cellar scene might be enough to imply medieval conditions, or three joggers to imply a busy park scene. So, have a think of a scene you might be able to use this technique in, and describe it to us to show you’ve got a sense of what masks and layers allow you the freedom to do!

This article is from the free online

Visual Effects for Guerrilla Filmmakers

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now