Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects toComp, nested object inside a Corner Pin effect

  • toComp, nested object inside a Corner Pin effect

    Posted by Andy Talbot on March 14, 2018 at 9:56 pm

    Hi there

    I’m using toComp to get the 2D screen position of a nested child object.
    I’m having trouble with a Corner Pin effect in the hierarchy.

    Sorry for the long-winded post, just explaining what I’ve tried.

    The structure:

    MAIN (I want the OBJECT’s screen position in this comp)
    / NESTED (has a Corner Pin effect applied)
    / / OBJECT

    All comps are 2D.

    I’m using the following expression:

    c = comp(“NESTED”).layer(“OBJECT”);
    c.toWorld(c.transform.anchorPoint)

    But all I’m getting is the OBJECT’s position, ignoring the Corner Pin.

    A couple of clips –
    Corner Pin turned off https://jmp.sh/i3sJtnJ
    Corner Pin active https://jmp.sh/cESI8SL

    I’ve also tried pre-comping NESTED (so the corner pin effect is pre-composed) with the following expression, but I get the same results.

    L1 = comp(“NESTED precomp”).layer(“OBJECT”);
    P = L1.toWorld(L1.transform.anchorPoint);
    L2 = thisComp.layer(“NESTED”);
    L2.toComp(P);

    Any ideas how I can get the screen position of the dot (OBJECT) when it’s been pinned?

    I fear the easy answer is toComp somehow doesn’t ‘see’ the effect of corner-pinning, but hope it’s down to my mistakes!

    Thank you.

    Andy Talbot replied 8 years, 5 months ago 2 Members · 3 Replies
  • 3 Replies
  • Andy Talbot

    March 14, 2018 at 11:15 pm

    I know what you mean, but I don’t want the following objects in the main comp to be skewed.

    In essence, I’m after a 3D-appearance in the map and for various labels to follow points on the map as it rotates etc.
    (the You Are Here label in the clip above is just one of many)

    If I pinned the whole lot, all the labels would skew as well, and I thought ‘reversing’ that on each label would be trickier.

    Hope that makes sense.

  • Steve Bentley

    March 15, 2018 at 12:48 am

    I too am a little foggy on what you are after but here’s a few thoughts that might help.

    I don’t think the expressions are going to pick up any shift in the pixels that an effect like corner pin will have on them. Applying the effect doesn’t change where the corner pinned objects anchor is, and depending on how that corner pin was created or how extreme the warp, those pixels can be a mile from where they were originally but the anchor point hasn’t’ shifted at all.

    Conversely getting the position of a dot and putting a corner pinned object at that spot may not align the way you might think since all the pixels of the effected subcomp have been skewed and no longer match its original anchor point – which is what the expression is really interested in to match the dot position (but if they are all warped the same you could build in an offset to compensate).

    If you can cheat, the transform effect (in distortion) might keep that shifted position data as it processes its skew a little differently than corner pin.

    Lastly if you can help it don’t use the corner pin effect. Its quite soft. I don’t think its bicubic math is near as good/sharp as the CCpower pin the comes with AE.

  • Andy Talbot

    March 15, 2018 at 3:01 am

    I thought this was a pretty simple mess but clearly I’ve gone down one of those AE rabbit holes!

    Your suggestion that the expression isn’t picking up the shifted pixels explains it perfectly.
    I recreated with CC Power Pin and unfortunately, the same thing happens.

    I can track the points for now – dirty, but quick enough.

    Thanks for your help.

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