ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# Simple facial tracking in 3D?

FAQ   •   VIEW ALL
 Simple facial tracking in 3D? on Feb 3, 2020 at 4:09:23 pm

I've been looking at some fairly basic video tutorials of the face tracking (detailed features). The tutorials I've been watching have been attaching a pair of glasses to a null object (which is exactly what I want to do), and then attaching the glasses to the null object. The problem is that the tutorials are used on a head that's straight on to the camera. In the sample video I grabbed, the talent paces back and forth, and their head turns to either side of the frame. As the head turns, the glasses stay front-facing. Is there an expression to account for (I'm assuming) a Z- axis? I'm sure you've had this question before. I've looked, and haven't been able to find it. Any help would be greatly appreciated!

Thanks :)

```//Code by Paul Carlin A=thisComp.layer("your layer here").effect("Face Track Points")("Right Nostril"); B=thisComp.layer("your layer here").effect("Face Track Points")("Left Nostril"); // Find the length of side a SideA = sub(A, B)[1]; // Find the length of side b SideB = sub(A, B)[0]; //Find the Angle between them radiansToDegrees(Math.atan2(SideA, SideB))+180;```

 Re: Simple facial tracking in 3D?on Feb 3, 2020 at 5:59:49 pm

No there is not; AE does not have a 3D tracker.

You could try and cheat it by scaling the null in one dimension and locking the other to a fixed size, but AE is not capable of understanding how the human head is a cylinder and it's actually wrapping around it.

3D head tracking is not easy, when facebook or other apps use in filters it it's because they've spent tons of money teaching AI to learn how to track just the face, whereas AE is designed to track anything you tell it to, so it only looks at changes of pixels compared to the previous frames.

Alex Printz
Mograph Designer