Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Character Rig multiple angles expression

  • Character Rig multiple angles expression

    Posted by Leslie Van berkel on April 2, 2014 at 2:05 pm

    Hi there,

    This is my first post at CC and I am just a newbie with AE expressions.
    Greg Gunn was so nice by directing me to CC because of it’s great community. I am having some trouble understanding AE expression with multiple Face angles (front, three quarters) and pre-comps.
    I would like to use my Head, Eyes, Mouth controllers (null objects) in my main comp to animate different poses in all my pre-comps which are the different Face angles. For example: closing eyes in my front view as well as in my three quarters view. Right now the eyes or mouth shapes won’t animate at all while turning my head. I am using the Time Remap way to trigger different mouth and eyes shapes.
    Is there someone who can take a brief look at it?

    This is a test file of my character https://www.dropbox.com/s/pl1ic9wdip38e2z/face_test%20folder.rar

    Leslie
    AE CS6 user

    comp("ellen_head").layer("Mouth_CTRL").transform.rotation/25

    Leslie Van berkel replied 12 years ago 3 Members · 4 Replies
  • 4 Replies
  • Ash Kappel

    April 4, 2014 at 9:57 pm

    I have the same problem. I created a sample project with text… linked below. It seems nesting comps with time re-map on comps and then sub-comps does not work. I feel I am missing a code fix for this.

    https://drive.google.com/file/d/0B4M91ZSMcd59WDBabkdUNTRENVk/edit?usp=sharing

  • Leslie Van berkel

    April 5, 2014 at 1:36 pm

    Hi Ash,

    Thanks for your responds!
    For me as a newbie with no experience in expressions, I found it hard to believe that there is no simple code fix for this. I am just doing 2d character stuff with AE just a few months now and I don’t know if our workflow is so different than all other character animators out there. Having multiple faces attached with expressions is quite straight forward. I hope that someone is willing to help us out here. Fingers crossed!

    Leslie

  • James Peres

    April 11, 2014 at 7:56 pm

    Is there a specific reason you are doing time remap?

    I would make expression controls on the main node, and then all nested layers will have their opacities controlled by those controls using expressions.

    So “Eyes front open”, “Eyes front inbetween”, “Eyes front closed”, “Eyes front down” would have the following, respectively:


    // "Eyes front open":
    if ( comp("ellen_head").layer("head_CNTRL").effect("Eye_slider")("Slider") == 1 ) { opacity = 100 } else { opacity = 0 }
    // "Eyes front inbetween:
    if ( comp("ellen_head").layer("head_CNTRL").effect("Eye_slider")("Slider") == 2 ) { opacity = 100 } else { opacity = 0 }
    // "Eyes front closed":
    if ( comp("ellen_head").layer("head_CNTRL").effect("Eye_slider")("Slider") == 3 ) { opacity = 100 } else { opacity = 0 }
    // "Eyes front down":
    if ( comp("ellen_head").layer("head_CNTRL").effect("Eye_slider")("Slider") == 4 ) { opacity = 100 } else { opacity = 0 }

    Hold shift while using sliders to make it snap to integers.

    And you would do that in every comp that has those features. I do some more complicated layer name parsing sometimes to be able to name the layer with the the control I want it to follow and the expression will read the layer’s name to get the control:

    so “eyes_front_open-head_cntrl-eye_slider” could be a layer name and with

    L = thisLayer.name.split("-"); // Will split the layer name into three chunks (separated by "-").
    // L[0] = eyes_front_open
    // L[1] = head_cntrl
    // L[2] = eye_slider

    if ( comp("ellen_head").layer( L[1] ).effect( L[2] )("Slider") == 4 ) { opacity = 100 } else { opacity = 0 }

    I tend to use short names, like “eyes” just become “e”, “head” just becomes “h” and so forth. If you are going to use expressions/scripts, be consistent with names and separators. I tend to use underscores instead of spaces, and hyphens to separate stuff.


    James

    Mac Pro 4,1 Quad Core 2.66

  • Leslie Van berkel

    April 14, 2014 at 1:55 pm

    Hi James,

    First, I would like to thank you for taking your time for helping me out. I used to use time remap because I thought that was the way to go, looking at all those tutorials online. But your solution by using the opacity slider makes more sense. I tried it by deleting my time remap expressions and using your opacity expression, but the If statement is not working. I also like your ‘complicated’ layer name parsin, but I don’t understand how to use it in production and how it exactly works. I really would like to learn it! Would it be to much to ask you if you reuse my AE project file with your settings? Your help is much appreciated. Thanks!

    Leslie

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