Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions 3D rotation with scale+opacity according to Z position

  • 3D rotation with scale+opacity according to Z position

    Posted by Karim Daire on September 15, 2008 at 11:27 am

    Hi,

    I have made a little slideshow in which I animate photos in a circle rotating in 3d space controlled by a Null object.

    I just don’t get the circle to have depth. The photos on the backside of the circle don’t get small enough and are too confusing, so I need to scale them down, add blur and transparency the farer they are in the back on the z-axis.

    Can anyone help me with an expression? I wonder because since the photos are rotated by a Null Object there is no location other than the original one stored in the seperate photo layers until I take off the parenting to the Null… can you still access the rotated position to read the Z-Axis and use it to trigger a expression for the scale+opacity??

    Also I went nuts to arrange the layers in 3D space on a circle. when rotating them around a center I couldn’t make them auto-orient to the camera, so I had to move them by hand to their locations… I guess there must be scripts for the purpose of arranging layers in 3D space. Any hints??

    Thanks in advance,

    Karim

    Dan Ebberts
    replied 17 years, 7 months ago
    2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    September 15, 2008 at 4:08 pm

    You can get the world position of a layer like this:

    toWorld(anchorPoint)

    Are you saying that you have the child layer’s “Auto Orient Towards Camera” turned on but it’s not working?

    Dan

  • Karim Daire

    September 15, 2008 at 4:55 pm

    Hello Dan,

    thanks for your reply…
    I got auto orient on and its working now but I had to place all layers by hand. When I moved the anchor point and rotated each layer by x degrees the auto orient would not work. Is that right?? Does auto orient only work for layers which are not rotated??

    As for the expression…

    toWorld(anchorPoint)

    Where do I place it and how do i extract the z-position from it to use e.g. for transparency? Sorry, but I only use exressions rarely and always have to start from scratch.

    Karim

    -Karim-

  • Dan Ebberts

    September 15, 2008 at 5:12 pm

    If you’re moving the anchor point, that will definitely mess up the auto orient, because it’s the anchor point that gets oriented towards the camera.

    If you need the world z coordinate for your expression, you just do something like this:

    z = toWorld(anchorPoint)[2];

    Of course, again, if you’ve moved the layer’s anchor point, that will mess up the calculation.

    Then you’d have to do something like this:

    z = toWorld([width/2, height/2, 0])[2];

    Dan

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