Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions 3D point to 2D position in 3D layer

  • 3D point to 2D position in 3D layer

    Posted by Ilya Sire on October 23, 2018 at 10:41 am

    Hello all,
    Im trying to pin each corner
    I have a situation to convert Corner Pin position to other 3d layer point (example at edge of other layer)
    please take a look of my sample file here (from motionscript Dan Ebbert example) Using this, will work if the all axis rotation at 0 degrees.
    12827_3dto2dand3dlayer.aep.zip
    how to match position when it rotate X or Y?

    Thanks
    Sire

    Amstane Tindi replied 6 years, 5 months ago 3 Members · 3 Replies
  • 3 Replies
  • Filip Vandueren

    October 23, 2018 at 12:00 pm

    Because your layer is 3D, it will get a 3D point using the fromComp() method.
    Corner-pin expects a 2D value and throws away the Z-information, without actually projecting it on to the 2D plan…

    Luckily, there exists the method fromCompToSurface() which solves this.

    target = thisComp.layer("Green");
    fromCompToSurface(target.toComp([0,0,0]));

  • Ilya Sire

    October 23, 2018 at 12:07 pm

    Oh man, i didn’t realize this method use for. Thank you for your help. It solved!!

  • Amstane Tindi

    December 10, 2019 at 11:03 am

    THANK YOU ! I’ve been searching for this for hours!

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