Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Optics Compensation position expression…

  • Optics Compensation position expression…

    Posted by Bryan Butler on February 19, 2013 at 11:07 pm

    I’m trying to create something like a magnifying glass. I’ve built a comp as a loupe that has an adjustment layer with Optics Compensation on it. I have it’s view center position quick whipped to the position of the loupe in the main comp. Under the loupe comp, I have the bit I want enlarged as an Alpha mask to something the same size as my loupe comp, which is set as a child. Basically, it makes my text look bulged and enlarged when I move the loupe comp position around.

    The problem comes in when I make multiple keyframes in the loupe position. The first one is fine, but when I make a second keyframe, the Optics Compensation view center stays with the first keyframe, so the image starts to become very distorted as it gets toward the edge of the sphere.

    I’m not exactly sure why this happens or how to fix it, as I’m not too familiar with After Effects, let alone expressions. The expressions attached are on the Optics Compensation view center. Thanks for any help!

    Cheers,
    Bryan

    [comp("Comp 1").layer("bryan loupe").transform.position[0]+(comp("Comp 1").layer("bryan loupe").transform.position[0]/2), comp("Comp 1").layer("bryan loupe").transform.position[1]+(comp("Comp 1").layer("bryan loupe").transform.position[1]/2)]

    Bryan Woods replied 13 years, 5 months ago 3 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    February 20, 2013 at 12:29 am

    I’m guessing that your “Comp 1” layer in your main comp does not start at time = 0, is that correct?

    Dan

  • Bryan Butler

    February 20, 2013 at 3:44 pm

    Hey Dan,

    Comp 1 is the main comp, so no. I should probably get better about naming everything.

    When I was leaving work last night, I thought of a different solution, which was to just take the Adjustment layer out of the loupe comp, and have it as a child of the loup comp instead. Then I could just move it manually with everything else. It’s not as elegant, but I think it should work. I’d still like to know what I was doing wrong with the expression/keyframe, though. Thanks for any insight anyone can provide.

    Cheers,
    Bryan

  • Bryan Butler

    February 20, 2013 at 6:12 pm

    I pulled the Adjustment layer out of the loupe comp, made it a child of said comp and edited the expression to keep it centered by multiplying the position by some numbers. Now when I add keyframes to the loupe comp’s position, the expression has no trouble, and doesn’t get hung up like it did when it was inside of the loupe comp. I don’t really understand the difference between why this worked and why the other didn’t, as they are doing the same thing.

    [thisComp.layer("bryan loupe").transform.position[0]*6.4,thisComp.layer("bryan loupe").transform.position[1]*3.56]

  • Bryan Woods

    February 22, 2013 at 10:38 pm

    unless I’m missing something here, couldn’t you use AE’s built-in magnify effect instead of resorting to expressions? Would probably be faster rendering than the optics compensation…

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