Complete noob here with After Effects but I feel I am so close of achieving it yet...

I am trying to draw a line using the pen tool and get this line to follow along with the camera movements. Something like this: enter image description here

I have created this using Track Camera on the footage, then selecting a target, right click and create null object. Then I draw the line on the null object using the pen tool, so it creates it as a Mask. All I want is that mask to stay in the footage, no effects, nothing special. Just this yellow line.

So it does work fine if I have the mask selected and I play the footage, but it disappears when I see the video from Premiere (they are linked) What am I missing?



Masks do not render in after effects, the lines and boxes are UI elements of the program. To render a mask you have to apply an effect such as the stroke effect to the layer, using the mask as the source.

You could also add a stroke as a drawing on a new layer. You can do that by using the pen tool when there are no layers selected. That will create a shape layer with the current fill and stroke settings, so you may have to turn off the fill.

The boxes around the points would also have to be drawn as individual elments. You could use the square shape tool to draw them as either a source for the stroke effect or on the shape layer.

  • Thanks @stib adding a shape layer with the pen tool worked! Now all I need is to parent that to the tracked video. Do you know how to do that? I tried parenting it to my Null object that I created by right clicking on a tracked points. But it doesn't work – Pepys Mar 23 '17 at 13:03
  • 1
    Did you create a camera as well? If you create a tracked camera and make the shape layer a 3D object it will track. However there is a slight problem: the pen is not drawing a 3D shape, it's drawing a 2d line that matches the perspective in one frame, on a plane parallel to the viewport, rather than horizontal. You may have to make a shape layer and rotate it 90 degrees on the x axis to make it flat to the ground, then draw your shape. – stib Mar 27 '17 at 0:36
  • I ended up with creating a solid layer from the camera points and a Mask for it using the stroke effect. Not the best but will do the job. Gonna write it as an answer to all the others – Pepys Mar 28 '17 at 7:04

here is what worked for me:

Use track camera on the video, select a target point and right click to create a Solid. Expand the solid layer as needed. Draw a mask with the pen tool while having the solid layer selected. This will create Mask 1 Click Mask and add Stroke effect to it Select the Stroke effect and change the Paint Style to 'On transparent' so the solid layer will not be visible

The final result should look something like this enter image description here

Your Answer

