Point tracking to hide particles behind objects?

ElCuajinaisElCuajinais Website User Posts: 18
edited January 2015 in Post-production techniques


I have a steadicam circling shot where I've added atmospheric particles. I would like to hide some particles behind trees where appropriate. So far, I've been able to use the HitFilm point tracking to follow some particles. I also have the same live action shot without the particles in a layer "behind" the shot with the particles.

What I would like is to create a mask at the particle (tracked point) and keyframe it to create a "hole" in the front layer, so when the particle is to pass behind a tree the "hole" shows the layer behind without the particle.

Now that I have the tracked particles, what is next? I need to add a layer to the particle right? What type of layer?  Which "effect" or mask  do I use to simply make a hole in my current layer?



  • RobinRobin Website User, HitFilm Beta Tester Posts: 1,671 Enthusiast

    I guess this would probably way easier by masking out the tree in a copy of the footage layer (especially if it itself hasn't got much movement), and then place the copy in 3D space so the paricles automatically get occluded by the layer, as they exist in the same genuine 3D space.

  • ElCuajinaisElCuajinais Website User Posts: 18

    Thanks for the reply Robin. Both the particles and trees move a lot. Is is not possible to do what I intend? It seems rather straight forward. I already have the tracked particles. All I need is to keyframe "holes" in the tracked points at some moments in the shot. 

  • RobinRobin Website User, HitFilm Beta Tester Posts: 1,671 Enthusiast
    edited January 2015

    Well to actually punch holes into a layer masks are indeed the easiest option, but in HitFilm they can't yet be parented to another layer. So you could just keyframe them manually to appear and disappear, which will involve a lot of work depending on your shot.

    I just found another way to do this, though, which involves using the clone stamp. Basically, you will have to create a plane which will act as your mask, so mask that plane to match the particle. Precomp it (so that you get the alpha from the mask, and not the original plane), and parent the pre-composited plane to your tracking point. Then apply the clone stamp effect to the front layer of your composition, choose the precomped plane as your clone mask, and choose "Selectable Layer" for the "clone from" property. You'll have to go through this process for each tracking point you have individually. It is a bit more complicated and probably more resource intensive than masking, but it allows you to use your tracking data.

  • ElCuajinaisElCuajinais Website User Posts: 18

    I'll look into this. Thanks!

  • ElCuajinaisElCuajinais Website User Posts: 18
    edited January 2015

    I have not been able to follow your instructions since I'm still a beginner. I have managed however to get a small plane on top of the tracked particle. I don't know what to do from there.

    Also Robin, at this point I don't have a problem rotoscoping the movement of each particle if that makes the "punching the hole" aspect easy. Can I create a small mask for each particle and roto each one frame by frame and then punch the holes at different times on the different masks somehow?  It would be like doing lightsabers frame by frame, but instead of making them glow, I would need them to punch a hole in the top layer, and I need to be able to turn the hole punching on and off.

  • rgbiirgbii Website User Posts: 965 Just Starting Out

    @Robin, not sure if you've seen this yet, but in HF3P, you can cut and past position keyframes to a mask.  For example, you can track something, apply to a point, then cut and paste the position information under the new transform/position information associated with a mask.  You may need to use the masks anchor point to adjust it's initial position, but this is a great new feature for masks that I sure was added to support the new mocha features.

    If you do already know about this, ignore this :)

  • RobinRobin Website User, HitFilm Beta Tester Posts: 1,671 Enthusiast
    edited January 2015

    @rgbii Oooooooh. I was not aware of this until now, well that's indeed a handy feature! One step closer to a good masking system.

    @ElCuajinais If it is not too much work manually rotoscoping them will indeed be more straight forward. In this case, create as many masks as you need to cover all "holes" you want on the top layer, and just keyframe their paths to be on-canvas and following the particles as long as they're behind the tree, and just drag them off-canvas if they're not needed for a certain time. Make sure you turn on keyframing on the path-property of each mask BEFORE you do any rotoscoping. You'll really regret not having done that and then rotoscoping for an hour only to notice the program didn't record anything of what you just did into keyframes.

    To get the result you want you just have to fiddle with the blend modes of the masks a little bit - in the masks stack of the top layer, where all your individual masks are, make sure the topmost mask is set to be inverted and has the blend mode "add", all other masks need to be set to be not inverted and have the blend mode "subtract". That way, each mask will punch another hole into the layer, just as you want.

    Your layer setup should look like this: https://onedrive.live.com/redir?resid=E9353018DD50981!53189&authkey=!ACrlrPiEsKHPJhs&v=3&ithint=photo,png

  • ElCuajinaisElCuajinais Website User Posts: 18
    edited January 2015

    Hi Robin, The picture is not showing. Could you please post it again?

    *edit* Ok got it working now with the rotoscoping. BIG THANK Robin! You've been extremely helpful.

    Would still like to see the pic if you have the time. Maybe your layer setup is better.

    Now to see if I can borrow some party lights from a DJ for the day of the shoot...

  • RobinRobin Website User, HitFilm Beta Tester Posts: 1,671 Enthusiast

    Ah dammit, should've known onedrive wouldn't properly allow hardlinking to images. I've edited my original post to include a (hopefully) working link!

    Glad I could help! If you have any more questions don't hesitate to ask!

  • SimonKJonesSimonKJones Moderator Website User, HitFilm Beta Tester Posts: 4,450 Enthusiast

     Also, don't forget about using mocha HitFilm if you do need to rotoscope an animated mask shape.

Sign In or Register to comment.