FORUMS TUTORIALS MAGAZINE STOCKYARD VIDEOS PODCASTS EVENTS SERVICES NEWSLETTER NEWS BLOGS
 ADOBE AFTER EFFECTS: Home Forum Basics Expressions Tutorials Podcasts AE Techniques Training Creative Cloud Debate FAQ

# 2D Layer's position moves according to 3D Layer's y-rotation

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
 2D Layer's position moves according to 3D Layer's y-rotation by Roland R. Kahlenberg on Oct 28, 2012 at 6:50:48 am

2D Layer's position moves according to 3D Layer's y-rotation - can?

Essentially, I'm trying to make the edge of a 2D layer move in tandem to the edge of a 3D layer as the 3D layer rotates on its y-axis.

TIA
Roland

Intensive mocha & AE Training in Singapore and Other Dangerous Locations

Imagineer Systems (mocha) Certified Instructor
& Adobe After Effects ACE/ACI (version 7)

 Re: 2D Layer's position moves according to 3D Layer's y-rotationby Darby Edelen on Oct 28, 2012 at 9:18:10 am

To tie the edge of a 2D layer to a 3D layer I'd convert a point along the edge of the 3D layer into comp space and apply that to the 2D layer's position, set the 2D layer's anchor point on the edge you want tied to the 3D layer's edge:

``` l = thisComp.layer("My 3D Layer"); my3dEdgePoint = [0,540,0]; l.toComp(my3dEdgePoint); ```

Of course this method makes some assumptions and has limitations. Hopefully it foots the bill in your case.

Darby Edelen

 Re: 2D Layer's position moves according to 3D Layer's y-rotationby Roland R. Kahlenberg on Oct 28, 2012 at 10:48:36 am

Thanks Darby!!! It's working as I expected.

Cheers
- Roland

Intensive mocha & AE Training in Singapore and Other Dangerous Locations

Imagineer Systems (mocha) Certified Instructor
& Adobe After Effects ACE/ACI (version 7)

 Re: 2D Layer's position moves according to 3D Layer's y-rotationby Roland R. Kahlenberg on Oct 29, 2012 at 11:25:01 pm

AccCKK!!!!!! What if my 3D layer is a child or a grandchild?

Cheers
Roland

Intensive mocha & AE Training in Singapore and Other Dangerous Locations

Imagineer Systems (mocha) Certified Instructor
& Adobe After Effects ACE/ACI (version 7)

 Re: 2D Layer's position moves according to 3D Layer's y-rotationby Dan Ebberts on Oct 29, 2012 at 11:33:59 pm

It shouldn't matter. Did you try it?

Dan

 Re: 2D Layer's position moves according to 3D Layer's y-rotationby Roland R. Kahlenberg on Oct 29, 2012 at 11:57:13 pm

I DID! And it works!!! :-D

The 3D Child Layers required more finessing with its Anchor Point. FWIW, when a 3D layer rotates a lot, two 2D solids are required, one for each of its left and right sides. BTW, I'm trying this technique so that I can use these 2D layers in Newton and then use Newton's results with 3D layers.

Thanks Dan!

Cheers
Roland

Intensive mocha & AE Training in Singapore and Other Dangerous Locations

Imagineer Systems (mocha) Certified Instructor
& Adobe After Effects ACE/ACI (version 7)