<p>here is what worked for me:</p>

<p>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</p>

<p>The final result should look something like this
<a href="https://i.sstatic.net/8c3gU.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/8c3gU.jpg" alt="enter image description here"></a></p>

CC BY-SA 3.0
2017-04-14T14:43:06.780Z
2017-04-14T14:43:06.780Z
Pepys
<p>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 <code>stroke</code> effect to the layer, using the mask as the source.</p>

<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2017-03-23T13:03:36.327Z
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
CC BY-SA 3.0
2017-03-27T00:36:24.610Z
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
CC BY-SA 3.0
2017-03-28T07:04:41.197Z
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
CC BY-SA 3.0
2017-03-23T11:09:08.210Z
2017-03-23T11:09:08.210Z
stib
<p>Complete noob here with After Effects but I feel I am so close of achieving it yet... </p>

<p>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:
<a href="https://i.sstatic.net/CX9cF.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/CX9cF.png" alt="enter image description here"></a></p>

<p>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. </p>

<p>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? </p>

<p>Thanks! </p>

<after-effects><premiere><motion><tracking>
Drawing a line over video that is camera tracked
Pepys
# Drawing a line over video that is camera tracked

(Asked by: username_0 on 2017-03-22)

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](https://i.sstatic.net/CX9cF.png)](https://i.sstatic.net/CX9cF.png)

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?

Thanks!

**Tags:** after-effects, premiere, motion, tracking


---

## 2 answers

### Answer by username_0 on 2017-04-14. Score: 0 | Accepted answer

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](https://i.sstatic.net/8c3gU.jpg)](https://i.sstatic.net/8c3gU.jpg)


---

### Answer by username_1 on 2017-03-23. Score: 2

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.

> **Comments:**
> **username_0**: Thanks @username_1 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  
> **username_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.  
> **username_0**: 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  

---

