Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Simple facial tracking in 3D?

  • Simple facial tracking in 3D?

    Posted by Derek Fitzgerald on February 3, 2020 at 4:09 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;

    Derek Fitzgerald replied 6 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Alex Printz

    February 3, 2020 at 5:59 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

  • Derek Fitzgerald

    February 3, 2020 at 6:31 pm

    Thanks, Alex. That certainly explains a lot.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy