ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

3D point to 2D position in 3D layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ilya Sire
3D point to 2D position in 3D layer
on Oct 23, 2018 at 10:41:46 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


Return to posts index

Filip Vandueren
Re: 3D point to 2D position in 3D layer
on Oct 23, 2018 at 12:00:41 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]));




Return to posts index

Ilya Sire
Re: 3D point to 2D position in 3D layer
on Oct 23, 2018 at 12:07:22 pm

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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]