I’m Simon Jones from HitFilm.com and in this here tutorial I’ll be covering TWO
methods for adding gunfire to your shots.
This is PORTAL COMBAT, directed by Ryan Connolly, and what you’re seeing here is a version
of the film before visual effects were added.
And as you can see, during the shoot none of the guns had any muzzle flashes -it was
all added in post.
I’m going to grab a shot of one of the bad dudes firing a machine gun and show you exactly
how to bring it to life.
So there’s two approaches in HitFilm.
Let’s take a look at the more traditional approach first, which is to use stock footage.
If you’re new to filmmaking, stock footage is something you want to start collecting
RIGHT NOW.
Having a library of stock assets you can dig out is super useful.
Stock might be images, or generic location shots, or explosions or smoke or - as in this
case - muzzle flashes.
I’m using muzzle flashes which were filmed from real weapons.
Make sure you download the project files, as I’ve included some clips from the HitFilm
library to start off your collection.
There’s an info card on this video which links right to them, or you’ll find them
on the HitFilm website or in the YouTube description.
Once you’ve downloaded the files, open up the tutorial project.
You’ll find a bunch of stuff in the Media panel ready to go.
Find the item called Tutorial shot and double-click it to open it up.
This is a composite shot, which is where you create visual effects in HitFilm.
You can have as many composite shots as you want in a project.
I’ve set up a few things already for you.
So you can see we have the video clip in here, and we’ve got 2 point layers, one called
‘barrel track’ and one called ‘camera track’.
If you select the barrel track point you’ll see it pop up on the viewer.
If you now play the video, you’ll see the track point stays stuck to the front of the
gun.
We can use this to easily position our muzzle flashes.
I’m not going to cover how to do tracking in this video.
If you want to know how tracking works, check out our portal tutorial which goes into detail.
The same techniques apply here.
In the muzzle flash stock folder you’ll find a couple of clips.
If I click on it to load it into the Trimmer, you can see that it’s just a really quick
flash of fire.
I’m going to move to near the start of the shot, then drag the first muzzle flash onto
the timeline.
The crosshairs show you where the clip is going to end up, and I’m going to position
it right where the playhead is.
OK, we now have a giganto muzzle flash, which is a kind of muddy orange.
Let’s get to work.
Before we go any further, head up to the Workspaces menu, which is this icon on Windows or in
the View menu on Mac, and switch to the Compositing setup.
This will lay out the interface so that it’s nice and convenient for doing VFX.
First up, let’s get it into position.
I’m going to use the tracked point I mentioned earlier.
Point layers don’t really do anything, and aren’t visible in the shot, but they’re
perfect for controlling the position of other layers.
So I’m going to use the parent menu to link the muzzle flash to the track point.
Initially nothing changes.
So with the muzzle flash selected, head to the Controls panel and open up the Transform
group using the little triangle icon.
If you look at the Position values, you can see they’ve got crazy numbers.
This means they’re offset from the track point by that amount.
This can be really useful in a lot of cases, but for now we want the layer to be right
on top of that tracked point, so right click Position and choose ‘reset’.
This will set it to zero.
Next, click and drag on one of the ‘Scale’ values - it doesn’t matter which one.
Dragging left will reduce the scale, making the muzzle flash smaller.
You’ll see that it’s scaling the layer from the middle, and that the layer is currently
centred over the barrel of the gun.
What we really want is for it to be positioned off to the side, as if it’s coming out of
the barrel.
The best way to do this is to adjust the Anchor point.
This tells hitfilm where the main layer control should be.
At 0,0 it’s right in the centre of the layer.
But if I increase the X, or horizontal, value, it shifts the layer to the left.
The cool thing is that the scale works around this anchor point as well, so if I continue
to tweak the scale you can see that it’s now changing size without moving away from
the barrel.
The size of a muzzle flash depends on the type of gun AND the type of film you’re
making.
But it’s very easy to overdo it.
Going for a subtler look is often best.
Around 30% seems to work well for this.
We now have a cool muzzle flash, tracked onto the barrel and positioned correctly.
But it doesn’t look good.
All good visual effects require time and effort to get detail and realism into the shot - it’s
pretty rare that you can just drag and drop something and have it work straight away.
Every layer in HitFilm has something called a ‘blend mode’.
This determines how the layer is mixed with the layers below it.
Currently this muzzle flash is set to ‘Normal’, which means it’s simply sitting on top of
the video.
If you go to the Blend option in the layer’s menu, you’ll find a big list of options.
Each of these will produce a different result.
For the purposes of this tutorial, and using fire-based stock in general, you want to check
out the ‘Add’ and ‘Screen’ blend modes.
These cause a general brightening of the area, as the layer’s pixels are added to the background.
Screen is a subtler, while Add will very easily result in a blown-out, over-exposed look.
This time round, switch the layer to Add.
Over-exposure with something extreme like a muzzle flash isn’t actually a bad thing
- though what we have here is a bit much.
The easiest way to counter this is to adjust the opacity of the layer.
So in the Transform controls, lower the opacity to make it more transparent.
You don’t want to go too far - about 55% works for me.
Now, the side effect of using the Add or Screen blends is that the layer will end up looking
semi-transparent.
Sometimes this is fine, but really we want our muzzle flashes to have a bit more physicality.
So here’s the plan.
Choose ‘Duplicate’ from the muzzle flash layer’s menu.
This creates a copy of the layer.
Change the copy’s blend mode back to ‘Normal’, and make sure it’s the lower layer on the
timeline.
We’ll now use the opacity trick again to adjust the visibility of the duplicate.
We want to take this lower, to about 25%.
This brings back some solid detail to the muzzle flash, while retaining the intense,
add blended appearance.
As you can tell, a lot of this stuff is optional.
You COULD just go with the basic add blended single layer, and it’d mostly work.
But as you layer in more detail, the shot will start to look better and better.
The audience won’t know exactly what you’ve done, but it’ll just FEEL right.
Right, now let’s add some smoke.
Over in the media panel you’ll find a smoke puff clip.
Drag that down onto the timeline.
We want this to start a couple of frame after the muzzle flash.
The easiest way to position it accurately is to first drag it to the same frame as the
flash, so that HitFilm snaps them to the same frame.
You can then click the magnet icon to turn off snapping, and drag the smoke clip a couple
of frames to the right.
Note how the popup tooltip shows you have far you’re moving it.
This stock clip still has a black background.
You’ll find that some stock has been prepped for you with built-in transparency, and some
will be like this with a black background.
It’s easy to sort out, though - all you need is an effect called Demult.
This generates the transparency for the layer.
This is generally referred to as the alpha channel, so if you see tutorials referring
to ‘alpha’, they’re talking about transparency.
The smoke needs tracking into the shot, just like the muzzle flash, but linking it to the
barrel track looks weird - smoke shouldn’t stay stuck to the motion of the gun.
That’s why there’s a second track layer, called camera track.
This tracks the movement of the background, and can be used for the smoke.
This makes it look like the smoke is in the scene and reacting to the camera movement.
Like before, in the parent list set the smoke’s parent to the camera track, then use the smoke’s
Transform controls to scale and position it just in front of the gun barrel.
This particular shot clip was shot with the smoke going up through the frame, and obviously
we want it to come out to the side.
This is really simple - all you have to do is rotate the clip.
You can do this in the controls panel or in the viewer by dragging the little square tab.
I’m also
going to find the Blur effect and drop it onto the smoke, to make it less distinct and
soften the edges.
In the controls panel I’ll untick the ‘clamp to edge’ option for the blur effect, which
lets it blur all the way to the very edges of the layer.
Finally, I’m going to have the smoke fade out pretty quickly.
The simplest way to do this is to keyframe the opacity.
Keyframes are used to create animation.
By turning keyframes on, each time you change a setting it’s marked down on the timeline.
That way, if you have 100% opacity on frame 10, then 0% opacity on frame 20, the layer
will fade out between those two keyframes.
With keyframes turned off, changing a setting changes it for the entire duration of the
layer.
If you want to add keyframes, you can click the little grey circle to the left of any
setting.
I’m going to find the frame where I want the smoke to start disappearing, and turn
on keyframing for the smoke layer’s opacity.
I’ll now move forward about five frames, and drop the opacity down to 0%.
HitFilm now automatically animates between those two keyframes.
The big thing missing now is some kind of illumination.
The key to a lot of successful computer effects is having them interact somehow with the environment.
In this case, it’s abutu having the flash of the gun illuminate its surroundings.
We’re going to do this in two parts.
First up, we’ll create an intense flash right over the barrel.
There are a million different ways to do this.
I’m going to show you just one.
Check out the New Layer menu on the timeline.
This is used to generate layers directly inside HitFilm.
What we want is a new Plane layer.
Stick with the defaults and you’ll end up with a black rectangle at the same size as
the frame.
This black plane can now be used as a host for other effects.
Up in the effects panel, search for the Radial Gradient effect and drop it onto the plane.
Perfect!
No, wait.
OK, so let’s customise this thing in the controls panel.
Put the smooth slider all the way up.
That’s a tip for life, not just HitFilm.
The default radial gradient goes from white to blue, so let’s change that to yellow
and orange.
You can set a colour manually, or drag the color picker to choose directly from somewhere
on screen - for example, from the muzzle flash we’ve already comped.
In the Center group you’ll find the position property.
You can also choose a layer, so we’ll pick the barrel track.
You’ll encounter lots of effects which can be linked up like this.
You can start to see the power of using points, now - with everything being controlled from
that point, if we move it the whole effect goes as one, rather than us having to move
each piece individually.
The inner radius I’m going to drop down to 0, so that there isn’t a big solid core.
THe outer radius I’ll drop down as well, until I get something that covers the immediate
area around the barrel.
I’ll switch the blend mode of the plane layer itself to screen - and we’ve now got
a cool glow.
Currently, though, it’s a permanent glow.
Useful for a flashlight, but not so much for this.
I’ll use keyframes again to drop the opacity down to 0 over the course of 3 frames.
This makes for a sudden, quick flash that fades away fast.
Because the flash only lasts 3 frames, there’s no need to have the layer last the entire
duration of the shot.
Using the razor icon on the left of the timeline I can click to slice the layer.
After switching back to the select tool I can select the unwanted part and delete it.
This is basically optional, but it helps to keep your timeline tidy.
Time for the last step.
We’re nearly done here.
This step makes a huge difference to the realism of the shot.
We’re gonna add some pretend lighting to Tim here, as if the gunfire is lighting him
up.
Now, you could do this on set with practical lighting, which can look super cool, but if
that’s not an option….this is.
I’m going to introduce you to two massively important HitFilm features.
Open up that New Layer menu again, and this time create a Grade layer.
At first, grade layers don’t do anything.
But they have a unique power of affecting everything underneath.
So if you add, say, a brightness and contrast effect to a grade layer, you can change the
brightness of EVERY layer underneath it.
We actually only want to affect our video layer, so I’m going to move the grade layer
down to just above the source video.
And now for the other important thing: masking!
Masks are hand-drawn shapes which can be used to define specific areas of the frame.
When combined with grade layers, they are very useful for selectively grading specific
objects in a shot.
These tools up on the viewer are for drawing different mask shapes.
There’s the rectangle and ellipse shapes, but I’m going to go for the freehand tool
so that I can draw something more detailed.
I’ll first make sure I’ve got the Grade layer selected, then I’ll start clicking
in the viewer to draw around Tim’s arms, head and chest.
Onto the grade layer I’ll now drop a Gamma effect, and boost everything up, with an emphasis
on red and green.
This creates a bright, more orange tint to the masked area.
It also washes it out a bit, resulting in it looking a bit low-contrast, so I’ll aslo
find the Brightness & Contrast effect and add that on after the gamma.
I’ll use this to increase contrast to 75, counteracting the contrast drop.
Tim is moving through the shot, of course.
This can be accommodated by going into the Mask’s transform controls and turning keyframing
on for the Path.
With the Select tool activated in the Viewer, it’s now easy to click and drag the mask
to the new location on each frame.
Remember that you only need to do it for about 3 frames.
The same opacity keyframing can be used to have the illumination fade out quickly over
those frames.
And you now have a convincing muzzle flash.
For shots where you have just a handful of muzzle flashes this technique creates very
high fidelity results.
By mixing in different stock clips you can create different looks from the same techniques.
Once you’ve got a few variants you can always select and duplicate them on the timeline,
and with just a few tweaks to the illumination mask and smoke position you’ll move through
the shot pretty fast.
An alternative technique, which can be particularly effective with rapid firing automatic weapons,
is to use the Gunfire effect from the Destruction Pack.
This is a $24.99 add-on so is totally optional, but if you’re heavily into your action it’s
worth checking out.
The Gunfire effect generates muzzle flashes inside HitFilm, which means you get an infinite
variety of shapes and designs.
It all works in 3D, too, so you’ll never find yourself with a tricky angle and no matching
stock.
You can customise the look to suit different weapon types and, perhaps most usefully, there’s
a ‘rate of fire’ option.
This is a massive time saver for automatic weapons, as you can set the rate of fire and
have the muzzle flash automatically flash on and off.
OK, that’s about it for this tutorial.
Many thanks for watching this far, and have fun with your filmmaking.
Keep trying new things - remember that tutorials should only be starting point.
It’s up to you to continue experimenting and try new things.
Many thanks for watching, I’m Simon Jones, and I’ll see you over on the HitFilm.com
forums where there’s loads of friendly filmmakers and artists ready to share techniques and
help you out.
Until next time!