Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression for duplicating Layer, each positioned further in Z space

  • Expression for duplicating Layer, each positioned further in Z space

    Posted by Marc Thomas on August 23, 2006 at 9:15 pm

    Hey everyone,
    I’m trying to make a comp with 60 or 70 layers that need to be flown through by the camera. I’d like to place the first layer, then add an expression that places each duplicate 100 pixels further away from the camera than the layer above it. I’ve done it before, but it’s been a while since I’ve done any expressions and I can’t remember what I did. Any help will be greatly appreciated.
    Cheers,
    Marc

    Marc Thomas replied 19 years, 8 months ago 5 Members · 5 Replies
  • 5 Replies
  • Coverbee

    August 23, 2006 at 9:48 pm

    https://www.creativecow.net/articles/rabinowitz_aharon/z_scale/index.html

    I suggest you watch this tutorial by Aharon Rabinowitz (again )
    I liked it very much
    maybe you don’t need to figure out an expression after all…

    anyway
    Cheers

  • Sam Moulton

    August 23, 2006 at 10:34 pm

    z =(index -1) * 100;
    [value [0], value [1], z]

  • Mike Clasby

    August 23, 2006 at 10:45 pm

    I gotta check out that Z scale thing again, I forgot all about it.

    But with expressions, here goes. Add this expression to the position of a 3D layer (it effects the Z spread) and you get a 100 pixel spread from the top layer.

    position+[0,0,(index-1)*100]

    If you add a Null layer (put on bottom of stack) with a Slider Control and pickwhip the last “100” in the expression to the slider you make it real easy to change the spread between you layers in Z Space, change the slider and they all change evenly (right click the slider number to change the range if you want more than the 0-100 default).

    Here’s the expression with the Null and Slider:

    position+[0,0,(index-1)*thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”)]

  • Jason Watkins

    August 24, 2006 at 9:56 am

    is it possible to do this but have a different frame on each layer? eg same movie clip just advanced in 1’s 2’s or 3’s that way i would only have to rotoscope the movie and not have to convert to tga and do each frame (yes i did that before!!!)

  • Marc Thomas

    August 24, 2006 at 4:00 pm

    Thanks for th tips guys!
    I’ve got another one for ya:
    in addition to placing layers back in Z space, I’d also like to have them shift first to the right, then back to the left, then back to the right in a smooth s-like shape or pattern.
    Example (in 2-d)
    L
    L
    L
    L
    L
    L
    L
    L
    L
    L
    L
    Etc.

    It would be a huge bonus to be able to control the distance of each layers relative placement, perhaps the depth of the curve. What do you think?
    Any takers?
    Cheers,
    Marc

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