<p>You can access the position of a point in a mask with expressions (in AE CC 2017+) with expressions. To access the first point of a mask called "Mask 1" on layer called "my Layer" you'd use</p>

<pre><code>pts = thisComp.layer("my Layer").mask("Mask 1").maskPath.points();
pts[0]
</code></pre>

<p>note that the points are numbered from 0, so the second point is pts[1], etc.</p>

<p>I'm not 100% sure I understand what you';re trying to do, have you tried doing a standard motion track using the inbuilt motion tracker or Mocha?</p>

CC BY-SA 3.0
2018-03-22T11:40:46.877Z
2018-03-22T11:40:46.877Z
stib
<p>Finally I found this answer</p>

<p><a href="https://forums.creativecow.net/thread/2/868241" rel="nofollow noreferrer">https://forums.creativecow.net/thread/2/868241</a></p>

<p>But it's pretty involved.  Is there a better way?</p>

CC BY-SA 3.0
2018-03-22T08:53:39.113Z
2018-03-22T08:53:39.113Z
tomh
<p>I want to put a 2D hat on a video clip of a person, whose head is tilting as he speaks.</p>

<p>I can face-track the face using After Effects CC 2017.
I end up with detailed tracking data, which includes face orientation information.
I can link the orientation information to a 3D null, but how do I link the positional information of the head?
The head appears to only be expressed as a percentage (of what?).  </p>

<p>Is there an easy way to connect this percentage data to 3D positional data on a null?</p>

<p>Equally, if I do a simple face track, I get an animated mask.  What's the right way to translate one of the points from that mask into a null that could be parented to another object?</p>

<after-effects><after-effects-expressions>
How to translate face tracking offset values into a 3D null position
tomh
# How to translate face tracking offset values into a 3D null position

(Asked by: username_0 on 2017-12-12)

I want to put a 2D hat on a video clip of a person, whose head is tilting as he speaks.

I can face-track the face using After Effects CC 2017.
I end up with detailed tracking data, which includes face orientation information.
I can link the orientation information to a 3D null, but how do I link the positional information of the head?
The head appears to only be expressed as a percentage (of what?).

Is there an easy way to connect this percentage data to 3D positional data on a null?

Equally, if I do a simple face track, I get an animated mask. What's the right way to translate one of the points from that mask into a null that could be parented to another object?

**Tags:** after-effects, after-effects-expressions


---

## 2 answers

### Answer by username_1 on 2018-03-22. Score: 1 | Accepted answer

You can access the position of a point in a mask with expressions (in AE CC 2017+) with expressions. To access the first point of a mask called "Mask 1" on layer called "my Layer" you'd use
pts = thisComp.layer("my Layer").mask("Mask 1").maskPath.points();
pts[0]

note that the points are numbered from 0, so the second point is pts[1], etc.
I'm not 100% sure I understand what you';re trying to do, have you tried doing a standard motion track using the inbuilt motion tracker or Mocha?


---

### Answer by username_0 on 2018-03-22. Score: 0

Finally I found this answer

<https://forums.creativecow.net/thread/2/868241>

But it's pretty involved. Is there a better way?


---

