Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Slider used in sub-comp which is sub-comped again 2nd slider won’t keyframe

  • Slider used in sub-comp which is sub-comped again 2nd slider won’t keyframe

    Posted by Ash Kappel on July 23, 2013 at 10:25 pm

    I have viewed posts similar to this but I can’t find an answer. This has been a re-occuring problem so I must be doing something wrong.

    I am using an expression slider in a sub-comp which has in it more sub comps that have sliders. The second tier of subcomps will not animate. I have a comp containing 10 heads. I have a slider that controls which head appears.

    Each head that is in that comp has sliders affecting: eyes, mouth, lids

    The time on these individual head comps will not align to the main comp and the slider for the “eyes” will not animate.

    a=comp("Ron.main").layer("Controler").effect("heads")("Slider") *.1
    framesToTime(a)

    2nd tier code:

    a=comp("Ron.main").layer("Controler").effect("eyes.rt")("Slider") *.1
    framesToTime(a)

    Ash Kappel replied 12 years, 1 month ago 4 Members · 10 Replies
  • 10 Replies
  • Dan Ebberts

    July 23, 2013 at 10:46 pm

    I’m guessing that your precomp layer in your main comp doesn’t start at time zero. If not, you’ll have to do something like this (not tested, so there may be typos):

    C = comp(“Ron.main”);
    ctrl = C.layer(“Controler”).effect(“heads”)(“Slider”);
    L = C.layer(thisComp.name);
    a = ctrl.valueAtTime(time+L.startTime)*.1;
    framesToTime(a)

    Dan

  • Ash Kappel

    July 23, 2013 at 11:24 pm

    Thank you for your quick response Dan. I am getting an error in Line 3. “can’t find layer “head4″”.

    “head4” is the comp I am working in. The layer it is being applied to is the composition eyeball.rt
    I am unclear why I am getting this message. Your code seems correct.

    I saw the other post with this similar answer but could not figure out how to implement it here.

    My comps start at zero. My “heads” comp has multiple head comps in it. Each head comp is reduced to one frame and sequenced. I use the slider to control which head is available. When I look at those individual head comps e.g. “head4” they are offset in time by their order in the other comp (in this case -3secs).

    I am wondering if I am applying this code in the wrong sub-comp.

    I have to solve this as all of my characters rely on expressions going into multiple sub-comps. Please let me know if I can provide any additional information.

    Thank you,
    Ash

  • Dan Ebberts

    July 24, 2013 at 12:00 am

    I’m lost. Maybe you could make a hierarchy map of comps and layers that shows what’s nested in what, where the slider is and where the expression goes (and the expression itself).

    Dan

  • Ash Kappel

    July 24, 2013 at 12:36 am

    Hi Dan,
    Thank you for your continued attention. I made a map:

    Hierarchy of comps starting on top: Ron.main–>Ron.full–>Ron.head–>ron.heads–>head4–>face.head4–>”layer” face1

    Ron.main: Has Slider expression Controller on a Null object contains Ron.full

    Ron.full: contains Ron.head

    Ron.head: Contains comp “ron.heads” which has Time remapping applied to it and the expression code:

    a=comp(“Ron.main”).layer(“Controler”).effect(“heads”)(“Slider”)*.1
    framesToTime(a)

    ron.heads: Contains comps “head1-head9” each comp is one frame and sequenced, (time is extended to end of comp).

    head4: Contains comps: face.head4, eyeball.rt, eyeball.lt, lids.rt.head4, lids.lt.head4
    These comps have time remapping applied to them and slider expressions code eg.

    a=comp(“Ron.main”).layer(“Controler”).effect(“mouth”)(“Slider”) *.1
    framesToTime(a)

    face.head4: contains twenty layers of different facial expressions. Each is one frame long and all are sequenced.

    All will work untill it is key framed. The lower tier sequence will not animate. I have this problem in multiple projects always the same issue with nested slider expressions on time remapping.

    Thank you for your time on this.

    Best,
    Ash

  • Dan Ebberts

    July 24, 2013 at 1:23 am

    Yikes. That’s not something I could easily reproduce here. I’d look at the nested time remapping. It’s hard to even wrap your head around that. Maybe making the calculations more visible by applying the same expression to a text layer in the same comp would shed some light on what’s actually going on. Sorry I don’t have more ideas.

    Dan

  • Mitch Mann

    July 24, 2013 at 12:19 pm

    I don’t know if this helps, but its a point of interest on this topic:

    If you time remap a precomp, and then try to get a slider value from within that precomp, it gets the value from the main comp’s current time, NOT the precomp’s time remapped time. So it seems that time remapping is not respected when getting values between comps. This has been very bothersome to me.

  • Ash Kappel

    July 24, 2013 at 5:38 pm

    Hi Mitch,

    Thanks for your thoughts. The problem is when you are using replacement animation that is nested. The comp has a bunch of single frame comps in it. Each one of these comps takes on the time it has within the sequence.

    If I have comps 1-10 all one frame and sequenced then the tenth comp will not be at zero like the main comp. This is fine untill you try to do replacement animation within one of those sequenced comps.

    My programming skills are weak so I don’t know how to fix it.

    Thank you,
    Ash

  • Leslie Van berkel

    April 4, 2014 at 9:54 am

    Hi Ash,

    I saw your thread about this pre-comp animation issue.
    Did you find a solution? I have the same problem and I can’t fix it!
    Hope to hear from you.

    Leslie

  • Ash Kappel

    April 4, 2014 at 7:46 pm

    Hi Lesile,

    It’s funny I was just thinking about this post. I have been using a workaround that doesn’t work so well. I was thinking about reposting the problem with a project file using text. Maybe dan would take another look at it.

    The work around: I use on/off expression switches for the parent comps. It is more work and is starting to show its limitations.

    When I get back to my desk I will put together a project. It is an issue that I really need solved. Please repost if you find a solution.

    Best,
    Ash

  • Ash Kappel

    April 4, 2014 at 9:45 pm

    I put together a sample project using text. The project is linked below.

    The eight sliders controls eight letters in a word. Another slider controls six versions of the word with effects applied. After you keyframe the letters and the versions of the words …only the word effects remain key framed.

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

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