Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Z position offset for multiple layers

  • Z position offset for multiple layers

    Posted by Richard Dunstan on August 12, 2008 at 5:15 am

    Hihi guys =) I am real new with expressions here and truing to do something rather simple,
    I want to take 189 layers make them all 3d and then separate them on the Z axis
    using a slider control. here is what I have got already.

    thisComp.layer(thisLayer, -1).position.valueAtTime(time – .5)+(0,0,thisComp.layer(“Offset”).effect(“Slider Control”)(“Slider”))

    It is also a follow the leader type expression with the time offset.
    The slider control works, but it’s sliding along the X axis and not the Z,
    I figured by putting the +(0,0, and then pick whipping to the slider on my null object would do it…….

    I am close, and I bet it’s something real simple, I just need a nudge in the right
    direction =)

    Thanks!

    Jamie Wood replied 16 years, 5 months ago 3 Members · 8 Replies
  • 8 Replies
  • Dan Ebberts

    August 12, 2008 at 1:09 pm

    Try changing this:

    (0,0,thisComp.layer(“Offset”).effect(“Slider Control”)(“Slider”))

    to this:

    [0,0,thisComp.layer(“Offset”).effect(“Slider Control”)(“Slider”)]

    Dan

  • Richard Dunstan

    August 12, 2008 at 1:58 pm

    Lol well I knew I was close, but not that close.
    I just got to work so I will have to wait to try it tonight.

    thanks for the response Dan! =)

  • Richard Dunstan

    August 12, 2008 at 11:36 pm

    Ahh I had left the other expression on the other layers, that fixed it,
    Never work past 3am.. lol. thanks so much Dan =)

  • Dan Ebberts

    August 12, 2008 at 11:40 pm

    So you’re saying that your expression now looks like this:

    thisComp.layer(thisLayer, -1).position.valueAtTime(time – .5)+[0,0,thisComp.layer(“Offset”).effect(“Slider Control”)(“Slider”)]

    And that when you move the slider control the layers offset in the x direction as well as z – is that correct?

    Dan

  • Richard Dunstan

    August 13, 2008 at 5:17 am

    Ther expression looks just like that and is working just fine =)
    when i move the slider control all of the layers offset in the Z only now, which is what we wanted =)
    when i posted that it was still moving in the x and z, I neglected to change the expression
    for the other layers. I am using photos so I will have to add the expression to each of the layer’s position .. 300 layers of fun I tell ya!, or perhaps there is a tweak I am unaware of. /shrug

    Cheers and thanks again.

  • Dan Ebberts

    August 13, 2008 at 5:27 am

    Well, there is Edit > Copy Expression Only, select all other layers, Edit > Paste.

    Dan

  • Richard Dunstan

    August 13, 2008 at 8:36 pm

    Awsome! thanks Dan!! you saved me hours and hours of work, next
    time you’re in Calgary I’ll buy you a beer!

  • Jamie Wood

    November 27, 2009 at 9:54 am

    Hi
    Is there any way this expression can leave the x, and y positions as they are? I have a grid of icons setup in specific postions already and when I apply the expression it moves everything to 0,0 on the x and y.

    I have tried using value[0] and value[1] but the expression is still adding to their values. I’ve tried splitting the expression using variables but get an error message about arrays.

    I’m hoping I can use the slider to animate the icons in on the z-axis one after one without having to animate each one individually.

    Thanks

    Jamie

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