Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Change Position relative to a different layer

  • Change Position relative to a different layer

    Posted by Adam Taylor on August 5, 2009 at 2:42 pm

    I posted this earlier, but i don’t think i explained the problem correctly.

    I have two text layers, one is 800 pixels high, the other is 700 high. The anchor points or both layers at set to 400 and 350 pixels respectively.

    The two layers have identical text but with a larger font on the larger layer.

    I need to find a way of moving one layer in y, and having the other layer also move, but in such a way that the text always aligns with its corresponding text as the layers pass the centre point of the screen.

    The idea is to create a stylized Magnification of the text at the centre point. I will be doing other effects that will make using the Magnify effect useless ( i tried this and found the magnified text lost clarity, as if the font was bitmapped).

    I have been looking everywhere for expressionistic inspiration but i am just getting more and more confused.

    Please help !!!

    adam

    Adam Taylor
    Video Editor/Audio Mixer/ Compositor/Motion GFX/Barista
    Character Options Ltd
    Oldham, UK

    http://www.sculptedbliss.co.uk

    Adam Taylor replied 16 years, 10 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    August 5, 2009 at 4:57 pm

    Why not just make one the parent of the other? Or are these layers offset in z space?

    Dan

  • Adam Taylor

    August 5, 2009 at 8:49 pm

    Hi Dan,

    they are not offset in z space, but that is the kind of effect i need, only in 2d space.

    My initial thought was that i would need to set upper and lower limits for each layer, so that they both started and finished at the same point on the screen when translating in Y. Then i would need the overall distance from these two points converted into a percentage. Then by parenting both layers to a slider control i could enter a single number and both layers would translate by that percentage of the overall possible distance..
    The effect being that at the centre point of the screen, both large and small text would converge, and by using masking, i could reveal the larger text as if it were being viewed through a magnifier.

    I tried the magnify effect, but it was not right for this task.

    adam

    Adam Taylor
    Video Editor/Audio Mixer/ Compositor/Motion GFX/Barista
    Character Options Ltd
    Oldham, UK

    http://www.sculptedbliss.co.uk

  • Dan Ebberts

    August 5, 2009 at 10:24 pm

    A Slider control and a position expression like this should do the trick:

    s = effect(“Slider Control”)(“Slider”);
    startY = 100;
    endY = 400;

    y = linear(s,0,100,startY,endY);
    [value[0],y]

    You may want to modify it so that the slider is on a control null and both of your other layers link to it (use the pick whip).

    Dan

  • Adam Taylor

    August 6, 2009 at 9:34 am

    thanks very much Dan.

    works beautifully…..truly you are a scholar and a gentleman!

    regards
    Adam

    Adam Taylor
    Video Editor/Audio Mixer/ Compositor/Motion GFX/Barista
    Character Options Ltd
    Oldham, UK

    http://www.sculptedbliss.co.uk

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