Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expressions that can be used with Face Tracker?

  • Expressions that can be used with Face Tracker?

    Posted by James Rodriguez on November 22, 2015 at 3:35 am

    I just finished tracking my face with the Face Tracker tool, and I found an expression that will make a null object rotate two-dimensionally in accordance with the corners of my mouth(below). Now, how do I go about making it so that an object – lets say, a mustache – follows my face three-dimensionally the way that real objects would? Like, if I twist my face to the left, the left side of the mustache will appear further away, while the right side will come closer? I’m a novice with expressions, and try to use them only when necessary, so any help will be greatly appreciated!

    A=thisComp.layer("20151109_170950.mp4").effect("Face Track Points")("Mouth Right");
    B=thisComp.layer("20151109_170950.mp4").effect("Face Track Points")("Mouth Left");

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

    George Tav replied 9 years, 11 months ago 4 Members · 7 Replies
  • 7 Replies
  • Kalleheikki Kannisto

    November 22, 2015 at 12:00 pm

    For 3D head tracking, this should be useful:

    https://www.youtube.com/watch?v=IbKeXYTxalc

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

  • James Rodriguez

    November 22, 2015 at 3:29 pm

    That doesn’t really help me with the Face Tracker, though. What he’s doing is tricking After Effects into mapping out his face, whereas I’m legitimately tracking my face.

  • Kalleheikki Kannisto

    November 23, 2015 at 9:31 am

    The Face Tracker is 2D, so I don’t know how you would convert that to 3D data. Probably you’ll need a slider or two wherein you add the 3D rotation information by manually keyframing the slider(s).

    I guess one could try and figure out an expression to extract the head rotation from a triangle of the nose and eyes somehow (the nose turns more than the eyes, so you’d be able to tell which side and how far the head is being turned to with some trigonometry).

    Personally, I’d rather use the 3D camera tracker to attach something 3D, and use the Face Tracker for 2D effects.

  • Robin Maguire

    May 23, 2016 at 6:33 am

    Hi James,
    Realise I’m a little late with a reply to your question.
    What you are looking for is in this tutorial:-
    Face Tracking – New in After Effects CC
    https://www.youtube.com/watch?v=jrW_V9gkgnI2015

    Cheers,

  • George Tav

    May 27, 2016 at 11:06 am

    The above video has been pulled from YouTube. Is it alright to update the link please?

    I’m looking for an expression which will use the facial details track keyframes to move a still layer (such as a moustache) by rotating and scaling in size for when the subject moves away/towards camera.

    Basically what I want to do is replace somone’s eyes with another person’s eyes using face tracker.

    Are there any tutorials out there for this or even just the expressions to use? I’m no good at maths. Maybe I should head back to the text books and learn trigonometry.

    Looking forward to your responses.

    Thank you for your time.
    George

  • Robin Maguire

    May 27, 2016 at 11:30 am

    Hi George,
    If you copy & paste “Face Tracking – New in After Effects CC” into your browser you will find the YouTube tutorial – it’s 29 minutes long and will show you how to do what you ask.
    Cheers,

  • George Tav

    May 27, 2016 at 2:09 pm

    Thank you very much Robin! =D

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