Corner pinning is a very useful process for many situations, including replacing signage
to create locations that you can’t access or which don’t exist, screen replacements
for computers or mobile devices, or window replacements to change the exterior seen through
them. I’m Axel Wilkinson from FXhome, and in this video we will look at how to perform
a basic corner pin using Mocha HitFilm. HitFilm 13 will include an update to Mocha HitFilm
6, which I will be previewing in this video. But the process and tools used are identical
in earlier versions of Mocha, so you can use any version of Mocha HitFilm to follow along.
If you are using HitFilm Express, you will need the mocha HitFilm add-on for this tutorial.
The project file and media are linked in the description below, so you can download them
and follow along. Here in our project, we have our footage,
which contains a random sign we want to replace. This is a very common situation, where you
shoot the exterior of one building intending it to serve as a different location in your
film. So you replace the signage with new images you create, using corner pinning to
place the new sign into the video. We have a composite shot containing our video already,
and the image we want to replace the sign with is in the media panel. Now that we have
our bearings, we can proceed with the tracking. In the Effects panel, add Mocha HitFilm to
the video layer. Double-click it to open the controls, and click the Launch Mocha UI button.
The appearance of Mocha HitFilm has changed a bit in version 6, but everything you need
is still readily available. If you have trouble adapting to the improved interface, though,
you can select Classic from this menu to switch back to the layout used by earlier versions.
A few controls to remember for Mocha: Hold Z, and your mouse movement controls the Zoom.
Hold X, and you can drag with the mouse to reposition the image. We want to create an
X-spline, using this tool, right around the outside of the sign. So we select the X-spline
tool, and click just outside each corner, then right-click to close the shape. Notice
the corners are rounded, the blue handle at the corner controls the radius of the X-spline,
and we can drag it to make the corner more square. Hold CTRL, and you can adjust all
corners at once. That isn’t so critical for this case, but its good to know for other
projects you might be working on, with more detailed spline shapes.
Before we track our shape, we want to set up our planar surface. With corner pinning,
the corner data we export is based on the exact corner positions of the planar surface,
so it is vital that we get this aligned correctly. So, Show Planar Surface, and we get a blue
rectangle inside our spline, and Show Planar Grid, and we get a pink grid that aids in
the alignment. Next, drag each corner of the blue planar surface to align then with the
corners of the sign. In the View menu, select Overlays, and enable the Zoom Windows. Then
when we move each point, we get a closely zoomed view of its position, to more precisely
align the points with the corners. Favor placing the corners outside the sign, rather than
inside, because if any of the original sign is outside the planar surface, it will be
visible in the final shot. As we position the corners, the grid is warped based on the
perspective of the surface, and when we are done, the grid perspective should nicely align
with the rest of the shot. Hold Z and double-click, if you are zoomed in, to reset the view, and
check the perspective of the grid against the video. That looks good. In the Track Motion
Options, enable Perspective, since the perspective on the sign changes through the shot. Then,
in the Track controls, click Track Forward. Give Mocha a few moments to work through the
shot, and it does all the hard stuff for you. Once it is finished, Zoom in a bit and check
the accuracy of your points. If any of them have drifted slightly, like this, don’t
worry, we can easily adjust them. In the View menu, select Parameters, and then click the
Adjust Track tab. In the Adjust Track, click these four buttons
to get a zoomed view of each of the four corners. For any of them that need adjusting, go ahead
and reposition them to get the alignment right. Notice the red X on the corners that confirms
we are in Adjust Track mode. Once the corners are realigned on this final frame, move back
through the video, and check the accuracy on a few other frames, to make sure it remains
good. Make any necessary adjustments, until you are fully satisfied with the placement
of every corner throughout the entire shot. Once our results are good, we can export,
using the Export Tracking Data button. Note that the same button can also be accessed
in the Essentials controls, for cases where you don’t have the parameters open. Click
either instance of the button, and a window opens.
The format defaults to HitFilm Corner Pin, which is what we want, so click Save, then
we can rename the file and choose a location for it, then click Save again to complete
the export. Now we can close Mocha HitFilm, and move back to the HitFilm Pro interface.
Click Save to retain our tracking, should any further changes be necessary. Click Import
in the Media panel, select our track comp, and it opens in the software. The small blue
shape you see is a plane, corner pinned to the sign’s location. Drag our video file
onto the timeline below the plane, and you can preview the track; the sign has been replaced
with this plane. Open the Effects for the plane, and you will find a Quad Warp effect
which contains the position data for each of the corners. It looks great, so now we
just need to add in our new sign image. Drag FXhome Sign from the media panel to the
timeline, above the plane. From the effects panel, add a quad warp effect. In the timeline
search box, type “position” to view all of the position properties. Select all the
keyframes in the plane layer’s quad warp, and copy them using CTRL+C, or CMD+C on Mac.
Then select all four of the Position properties on the image’s quad warp effect, by CTRL-clicking
each one, or CMD+Clicking them on a Mac. Make sure the playhead is on frame 0, then Right-click
on one of the Position properties and select Paste. There we have it, the sign is now perfectly
pinned into the scene. Sometimes, just adding the sign isn’t all
that is required, you may need to do a bit of compositing work to blend it into the scene.
In this case, if we hide the sign and the plane, there was a bit of glare on the original
sign as the camera angle became more oblique. If we replicate this, it will improve the
realism of our results. Turn the FXhome Sign back on, then add a Fill Color effect. White
is exactly the color we need. Now keyframe the Blend Amount so it only appears when we
need it. At around 2:20, set Blend Amount to 0, and enable keyframing. Then advance
to the end, and increase it to 20%. Toggle the sign layer on and off, and compare our
glare with the original. Then you can adjust the blend amount further if you want, until
you are satisfied that they match. Once that is done, here is what our final shot looks
like. And that is basic corner pinning, which is
surprisingly easy using Mocha HitFilm. You can learn more about using Mocha HitFilm in
this video. It is also possible to handle a corner pin in our free HitFilm Express software,
using the point tracker, though it takes a few more steps. Let us know in the comments
if you would like to see a tutorial on that. Don’t forget to subscribe to get more content
like this, and thanks for watching.