Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Cant find the missing key for this expression…

  • Cant find the missing key for this expression…

    Posted by Jm Chadillon on January 16, 2013 at 8:41 pm

    Hey all,

    I copied an expression Dan posted a while back for someone looking to control Y rotation based off of luminance. Well Im after the same thing but want to use it for X pos. Ive already changed the code to work with my project and things are working well. The only problem is i want the object to move quick rather than nice and slow. What is controlling the speed of the movement? My guess is time. Ive been trying to adjust the final math.Max(time-t,0) to add inPoint or multiply it by 2, but then all of my objects move together.

    Could it be that my anchor points aren’t sourcing luminance as i thought? A little insight to this code would be GREATLY appreciated.

    sampleSize = [2,2];
    L = thisComp.layer("BW");
    t = inPoint;
    while (t < time){   P = transform.anchorPoint;   lum = rgbToHsl(L.sampleImage(P,sampleSize/2,true,t))[2];   if (lum > .25) break;   t += thisComp.frameDuration; } t2 = Math.max(time*2,0); xControl = transform.position[0]; offsetResult = (xControl+295) offset = ease (t2,0,1,xControl, offsetResult); [offset, value[1]]

    Dan Ebberts
    replied 13 years, 3 months ago
    2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    January 16, 2013 at 10:29 pm

    I don’t remember that specific expression, but it looks like it goes to a lot of trouble to find the time where the luminance triggers (variable t), but then doesn’t use it.

    Maybe the line that defines t2 should use t instead of time.

    Dan

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