Moved this to the Hitfilm community support thread- below post explains my question.
Hi All, I'm new here and I'm trying to teach myself how to do some basic video editing.
I want to make an edit where a still object is placed behind a moving object. The actual screenshot is below...
The character is walking from left to right and stops in the middle and I've added the pink image on top of the original video.
What I've tried so far:
Can someone please help me or point me towards a tutorial that shows how to do this? I'm a total beginner but have tried over several hours (pretty much half of the whole day) trying to figure this out on my own :(
Many thanks in advance!
Hi you need to learn how to use the keyframes in Hitfilm. It's pretty powerful,
Ok, you've figured out you need to "mask" or Rotoscope Stewie's head, but let's discuss "masks" vs "mattes."
A mask uses data drawn on layer "A" to define a transparent area on layer A.
A matte uses information on layer "B" to define a transparent area on layer A. The matte can use data from a choice of channels - Red, Green, Blue, Luminance, Alpha, etc. In general most mattes are designed to use data from Luminance or Alpha to drive a single transparency. You can use colored layers to embed multiple mattes in a single image, but that's advanced work.
I haven't watched this particular tutorial yet, but I'll assume it's helpful.
Here's an old Javert tutorial from before he worked for FXhome that's a good basic talk on Set Matte.
And my own tutorial, which gets into masks, mattes and keys and the differences/similarities between all. This tutorial was done in Hitfilm Pro 2017, so the section on Mask controls is now obsolete (mask controls have changed), but the principles are correct.
The FilmSensei tutorial Andy linked above is current, so it shows the proper controls for HF 2021.
Ok, intro aside, now we can talk about your issue.
You can't track a mask. The data on the mask is embedded in the image layer. You've already encountered this. The mask itself would have to be animated, and, with Stewart bobbing up an down and his head wiggling from side to side, that's a pain.
However, you can track a LAYER, and, since a Matte uses layer B to apply transparency to Layer A, creating a MATTE layer is the way to go.
You'll need to track two points on Stewie. Probably his eyes. You'll create a white plane layer, put it above Stewie, set its opacity to something like 25% (you want to see Stewie under the plane, but want to be able to see where the plane is. then mask the plane to Stewie's head. Then parent the plane layer to the tracked point.
Now the plane will follow the track. If Stewie doesn't turn his head left to right you might be done. You might still have to animate the mask, but, since the plane layer is tracked, it'll be a lot easier since the track is handling the motion.
Once the mask is roto'd you can turn its opacity up to 100%, select the plane layer, move it all the way to the bottom of the layer stack and add a Grade Layer just above the plane. You'll need this Grade Layer for the next step.
Ok, now DUPLICATE the Stewie video and put this ABOVE your insert. Add the Set Matte effect to this top copy, use the Grade Layer as the Source Layer, the Matte Source to Alpha and the Blend to Replace.
Stewie's head should now be above the insert.
Why are we using the Grade Layer? Effects in Hitfilm using a "Source Layer" look at the "raw state" of a layer. The raw state is the layer before effects and masks are added, so, if you used the plane layer as the Matte Source the Set Matte effect would see a perfect white plane. A Grade Layer renders everything below itself first, so the "raw state" of the Grade is that render. This means the Grade Layer "bakes in" the mask on the plane, so the Set Matte sees it. You could also convert the Plane Layer and its tracked point to a Composite Shot which would also bake in the transparency.
Film Sensei has this tutorial, which will cover, in video, what I've discussed here. Yup, despite the title, Jay is gonna use Set Matte.
That should get you going.
Last bit - above I said you could use a color matte to define multiple areas of transparency? Here's a tutorial I did for FXhome as an example. I'll use a Comp Shot with text and a colored outline so I can use one matte layer to create two different matted areas for effects and color treatment.
When I saw this question, I thought you were going to say something like make each layer into 3D and move the character layer in Z-space in front of the others. Then the character can just walk by. But is seems I may have, probably have a misconception of 3D layers maybe? What is the short answer? Thanks.
@DataDesign That could work if there were multiple layers, but the original background being used is a clip from the TV show "Family Guy" where the OP is replacing a painting inside the original image. So, to separate things into 3D layers would be rotoscoping the ENTIRE body of Stewie. In this case it's just better to roto the head as a 2D layer.
And, if Stewie (the baby character) was already isolated on a layer, then he could just be popped on top as a 2D layer, anyway.
Ahhhso! I thought (not always a good idea) that the character was already on separate layer because I scanned the post and assumed just from the picture. Who was it that said "Don't assume stuff."? :-)