Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Brian Kaye on December 3, 2010 at 1:53 pm

    Hello again,

    I’m using the expression that Lloyd Alvarez used in his aetuts “turbo slide show”.

    My project consists of:

    1. A comp (“Comp 1”) that contains a series of images, 1 frame long and are sequenced.

    2. A comp (“Main”) that contains a layer (“Audio Amplitude”) with layer markers for trigger points, and “Comp 1”. I enabled time remapping for “Comp 1” and put in the expression:

    markerLayer = thisComp.layer(“Audio Amplitude”);
    myNearestKey = markerLayer.marker.nearestKey(time);
    markerCounter = 0;
    if (time >= myNearestKey.time)
    markerCounter = myNearestKey.index;
    else
    markerCounter = myNearestKey.index -1;
    framesToTime(markerCounter );

    As expected, everything works as it should. As the indicator hits each marker, the image changes. What I would like to do is add an opacity change that begins 8 frames before a marker triggers the next image change. (i.e. image 1 pops on and then 8 frames before image 2 pops on, the opacity of image 1, starts to drop to zero). I’ve tried to add an “ease” to the opacity for “Comp 1”, but that applies across the entire comp and not individual frames that are displayed between markers.

    I’m assumming I need to put something in the time remap for the comp, but I’m lost. I did search the existing expressions posts and can’t seem to find anything to fit the bill. I did try a very hacked up version of:

    if (marker.numKeys > 0){
    m = marker.nearestKey(time);
    t = m.time;
    if (m.index){
    ease(time,t,t+2*thisComp.frameDuration,100,0)
    }else{
    ease(time,t,t+3*thisComp.frameDuration,0,100)
    }
    }else{
    value
    }

    that I found in the post:
    https://forums.creativecow.net/readpost/227/15989

    It had some limited sucess, in that I could get the opacity to start changing, but once it was halfway between markers, the opacity went back to 100.

    Thanks for any guidance,
    Brian

    The link for Lloyd’s tut (if needed) is:

    https://ae.tutsplus.com/tutorials/workflow/create-a-rockin-automated-slideshow/

    Brian Kaye replied 15 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    December 3, 2010 at 5:49 pm

    Try this on the comp layer’s opacity:


    fadeTime = 8*thisComp.frameDuration;
    M = thisComp.layer("Audio Amplitude");
    t = fadeTime;
    n = 0;
    if (M.marker.numKeys > 0){
    n = M.marker.nearestKey(time).index;
    if (M.marker.key(n).time <= time){
    n++;
    if (n > M.marker.numKeys) n = 0;
    }
    if (n > 0) t = M.marker.key(n).time - time;
    }
    linear(t,0,fadeTime,0,value)

    Dan

  • Brian Kaye

    December 3, 2010 at 6:29 pm

    Dan,

    Absolutely perfect. My sincere thanks for your assistance.

    Brian

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